Skip to content

Conversation

@jdoucett
Copy link
Contributor

What

Turns exclusion on in the live archive path — the first behavior change of the feature. make_zip_files now applies the subtractive identity+coverage filter and drops git-COVERED regenerable metadata from the zip it builds; the archive path logs and reports exactly what happened.

Builds on the primitives (#13) + orchestrator (#14). Part of the settled staged-hybrid direction, Phase 1.

Design guarantees

  • --globus-capable. The exclude_spec PATH is read on the machine that builds the zip (a compute node, which has /depot), so it works whether launched locally or from a Mac via --globus.
  • Default-safe everywhere. evaluate_exclusions never raises; a bad/unreadable spec, an unreachable git remote, or missing git on a node all degrade to "back up everything" with a recorded reason.
  • Nothing dropped without proof. A file leaves the backup only if it's classified EXCLUDE/OPTIONAL-opted-out (role-bearing regex, never extension) and git-COVERED.

Changes

  • load_config: new exclude_spec (path|null) + exclude_optional (list) keys, type-checked only (file read at run time).
  • make_zip_files: reads the spec, runs evaluate_exclusions, subtracts the COVERED set from matched_files, returns the report as a 6th value; refuses to build an empty archive. reconstruct_from_zip returns a matching 6-tuple.
  • send_to_fortress: records the full exclusion block in the run log (reclaim will read excluded_arcnames + re-gate — INV-E, next PR); [EXCLUDE]/[EXCLUDE-DEMOTE]/[EXCLUDE-CONTEST] audit lines; exclusion summary in the completion email; on a companion-guard (INV-C) trip sends a loud [EXCLUSION-ABORT] alert while continuing (everything backed up) — per your "continue + loud alert" call.
  • __main__: banner line + plumbing.
  • docs: config.example.json + CLAUDE.md (config table + an Exclusion section).

Interim note (next slice)

When an exclude_spec is configured the run always builds a fresh zip (skips resume), so the staleness guard never compares an exclusion-filtered zip against a non-exclusion source walk. Proper resume-under-exclusion (exclusion-aware enumerate_source + a spec-sha guard) is the next PR, followed by reclaim INV-E + the post-hoc re-verifier.

Tests — tests/test_exclusion_wiring.py (+9)

load_config validation; make_zip_files end-to-end against a real repo + bare remote — drops COVERED status/catalog JSON, keeps DATA (.tiff/.csv); subtractive keying (members == checksums == zip, excluded in none); unreadable spec and dirty subtree both DISABLE and back up everything. test_size_drift updated for the 6-tuple. Suite 110 → 119 green.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

🤖 Generated with Claude Code

…1b-1)

Turns the exclusion primitives on: make_zip_files now applies the subtractive
identity+coverage filter and the archive path logs/reports it. --globus-capable
(the spec PATH is read on the compute node that builds the zip) and default-safe
everywhere (evaluate_exclusions never raises -> "back up everything" on any
problem, with a recorded reason).

  - load_config: new `exclude_spec` (path|null) + `exclude_optional` (list) keys,
    type-checked only (the file is read at run time where /depot exists).
  - make_zip_files: reads exclude_spec, runs evaluate_exclusions, subtracts the
    COVERED excluded set from matched_files, and returns the report as a 6th
    value. Refuses to build an empty archive. reconstruct_from_zip returns a
    matching 6-tuple (resume marker).
  - send_to_fortress: records the full `exclusion` block in the run log (reclaim
    reads excluded_arcnames + re-gates, INV-E, next); [EXCLUDE]/[EXCLUDE-DEMOTE]/
    [EXCLUDE-CONTEST] audit lines; exclusion summary in the completion email; and
    on a companion-guard trip (INV-C) sends a loud [EXCLUSION-ABORT] alert while
    CONTINUING (exclusion already suppressed -> everything backed up) per the
    agreed policy.
  - __main__: banner line (ON/DISABLED + counts) and plumbing. INTERIM: when an
    exclude_spec is set the run always builds fresh (skips resume) so the
    staleness guard never compares an exclusion-filtered zip against a
    non-exclusion source walk; proper resume-under-exclusion is the next slice.
  - docs: config.example.json + CLAUDE.md (config table + an Exclusion section).

Tests: tests/test_exclusion_wiring.py (+9) — load_config validation; make_zip_files
end-to-end against a real repo+bare-remote (drops COVERED status/catalog JSON,
keeps DATA; subtractive keying members==checksums==zip; unreadable spec and dirty
subtree both DISABLE and back up everything). Updated test_size_drift for the
6-tuple. Suite 110 -> 119 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant