Skip to content

Conversation

@jdoucett
Copy link
Contributor

Why this exists

The merge of #13 captured only its first commit (1abc8e0, the classifier + git gate). The follow-up commit I pushed afterward — the --globus robustness layer you asked for (evaluate_exclusions / companion_guard + hardening + 11 tests) — was left behind (the merge's second parent is 1abc8e0, not the later 0095a27). So main currently has the primitives but not the orchestrator.

This PR re-lands exactly that dropped commit, unchanged, on top of current main. Still behavior-neutral (nothing calls it yet).

What it adds (the same content reviewed on #13)

The gate runs on a compute node under --globus, so the contract is: exclusion can never fail an archive, and the reason must travel back to the launcher.

  • evaluate_exclusions(...) — never raises. Returns one fully JSON-serializable diagnostic report (crosses the Compute boundary back to the launcher): status OFF/DISABLED(→ back up everything, with disabled_reason)/ON; plus excluded[], demoted[], contested_data[], counts{}, excluded_bytes. Targeted handlers for malformed spec / missing repo_root / precondition failure / per-file gate error, plus an absolute catch-all backstop.
  • companion_guard (INV-C): on violation, suppresses exclusion run-wide (drops nothing) and reports it for a loud [EXCLUSION-ABORT].
  • Distinct failure reporting: git unavailable (rc 127 — likely compute-node PATH gap) reported distinctly from "repo missing," never a false UNTRACKED.

Tests

+11 (suite 99 → 110 green): OFF/DISABLED matrix incl. git-missing-reported-distinctly and never-raises-on-injected-error; live end-to-end (covered→excluded, committed-not-pushed→STALE-demoted, DATA kept, dirty-subtree disables the whole run, contested DATA logged, companion guard suppresses, report serializes).

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

🤖 Generated with Claude Code

…-globus

Exclusion must work under --globus (gate runs on a compute node), so any failure
there must NEVER take down the archive, and the *reason* must travel back to the
launcher. This adds the robust layer (still behavior-neutral — nothing calls it
yet):

  - evaluate_exclusions(matched_members, source_folder, spec, ...) — decides the
    excluded set and returns a fully serializable diagnostic report; NEVER raises.
    status OFF (no spec) / DISABLED (could not run safely -> back up everything,
    with disabled_reason) / ON. Reports excluded[] (+blob_oid/remote_ref),
    demoted[] (candidate kept, with verdict+reason), contested_data[] (DATA that
    also matched a sub-rule — proof precedence, not luck, kept it), counts{}, and
    excluded_bytes. Targeted handlers for malformed spec, missing repo_root,
    precondition failure, and per-file gate errors, plus an absolute catch-all
    backstop -> DISABLED + error recorded, drop nothing.
  - companion_guard (INV-C): a directory that had matched files must ship >=1
    member and never have a DATA member excluded; on violation, exclusion is
    suppressed run-wide (drop nothing) and reported for the wiring to raise
    [EXCLUSION-ABORT].
  - Distinguish git-unavailable (rc 127, a likely --globus compute-node gap) from
    repo-missing in preconditions, and from a false UNTRACKED in git_file_verdict
    -> COV_ERROR "git unavailable", so a disabled run is diagnosable.

Tests (+11, suite 99 -> 110): OFF/DISABLED matrix (no spec, malformed spec, no
repo_root, repo missing, git-missing reported distinctly, never-raises on an
injected internal error), and live end-to-end (covered->excluded,
committed-not-pushed->STALE-demoted, DATA kept, dirty-subtree disables the whole
run, contested DATA logged, companion guard suppresses, report JSON-serializes).

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