feat(exclusion): re-land --globus robustness layer dropped from #13 merge #14
+417
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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--globusrobustness layer you asked for (evaluate_exclusions/companion_guard+ hardening + 11 tests) — was left behind (the merge's second parent is1abc8e0, not the later0095a27). Somaincurrently 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):statusOFF/DISABLED(→ back up everything, withdisabled_reason)/ON; plusexcluded[],demoted[],contested_data[],counts{},excluded_bytes. Targeted handlers for malformed spec / missingrepo_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].gitunavailable (rc 127 — likely compute-node PATH gap) reported distinctly from "repo missing," never a falseUNTRACKED.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