CIS490/scripts
max 5c0bc9af8e meta.json: stamp code_version (commit, branch, dirty) per episode
Closes a real reproducibility gap. Three weeks of bug fixes have
shipped (probe fix in 2707709, multi-signal classifier in 321ea63,
mandatory tier-4 in 265f3ad, etc.); without a per-episode
code_version, trainers can't tell which episodes came from buggy
pre-fix code and have to scan every tarball to guess.

Resolution priority (cached across episodes):
  1. $INSTALL_ROOT/VERSION (production — install-lab-host.sh writes
     it at install time since /opt/cis490 is a flat copy with no .git)
  2. git rev-parse HEAD from the repo root (dev clones)
  3. {"commit": "unknown", source: "unknown"} so the field is always
     present (filterable)

Output shape, always present in meta.json:
  "code_version": {
    "commit": "<40-hex>" | "unknown",
    "branch": "<name>" | null,
    "dirty":  bool | null,
    "source": "VERSION-file" | "git" | "unknown"
  }

install-lab-host.sh writes VERSION at install time with the source
repo's git rev-parse HEAD + branch + clean-tree flag + install
timestamp. Lab-host agents that pull main + re-run install-lab-host.sh
get a fresh stamp automatically.

148/148 tests pass; test_episode_against_self_pid_produces_full_directory
asserts the field's presence + valid `source` value.
2026-05-01 01:29:01 -05:00
..
fetch-alpine-baseline.sh Close out the deployment-readiness gaps 2026-04-30 00:31:55 -05:00
fetch-metasploitable2.sh Tier 3 + Tier 4 auto-deploy: zero operator interaction 2026-04-30 23:12:08 -05:00
install-lab-host.sh meta.json: stamp code_version (commit, branch, dirty) per episode 2026-05-01 01:29:01 -05:00
install-msfrpcd.sh Tier 3 + Tier 4 auto-deploy: zero operator interaction 2026-04-30 23:12:08 -05:00
install-receiver.sh bootstrap: auto-issue mTLS leaves to enrolled lab hosts (closes #9, refs #3) 2026-04-30 01:30:29 -05:00
install-tier-3-4.sh Tier-4 sample source: theZoo (no auth, no operator action) 2026-05-01 01:17:50 -05:00
issue-cis490-client-cert-wrapper.sh bootstrap: auto-issue mTLS leaves to enrolled lab hosts (closes #9, refs #3) 2026-04-30 01:30:29 -05:00