fix: exit codes & CI gating across report/coverage/deps/score/resolve/diff/changelog (closes #418, closes #419, closes #422, closes #425, closes #430, closes #431, closes #441, closes #444)#459
Open
0xLeif wants to merge 21 commits into
Conversation
…th confinement, test module wiring)
… paths) (batch 4)
…+incomplete as failures (batch 6)
…fallback, fail loud on git errors (batch 7)
…n tests (batch 8)
…t_code unit tests) (batch 10)
…h_status (batch 15)
…old boilerplate detection (batch 16)
…gate paths (batch 17)
…l merge-base (closes #418) (batch 18)
…metic, scaffold boilerplate, non-vacuous files_exist (closes #441) (batch 19)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
❌ Corvin says...
_
<(;\ .oO(oh no...)
|/(\
\(\\
" "\\
"Caw... your imports are all over the place."
CI Summary
| Check | Status |
|---|---|
| Validate action.yml | ✅ Passed |
| Packaged Action Consumer | ❌ failure |
| Dependency Audit | ✅ Passed |
| Code Coverage | ❌ failure |
| Format Check | ❌ failure |
| Docs Site | ✅ Passed |
| Spec Validation | ❌ failure |
| Tests (build, test, clippy) | ❌ failure |
| VS Code Extension | ✅ Passed |
Powered by corvid-pet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
One consolidated PR for the W1 exit-code/CI-gating cluster (the changes share a common enforcement core —
commands::default_enforcement/compute_exit_code/exit_with_status,SpecSyncConfig.enforcement_set,CoverageReport.missing_files, and main.rs wiring — so they land together).Core convention: an explicit
enforcementkey in config is honored as-is (includingwarn→ exit 0). When enforcement is UNSET, gate commands now default to gating on errors (validation failures exit non-zero) instead of the old implicit warn-everything. Wired into check, coverage, generate, comment, score, report.Issue → fix → regression tests
parse_range_fullsplits...before..; both endpoints validated viagit rev-parse --verify(exit 1 on unknown revision); three-dot uses realgit merge-base. Tests:changelog_bogus_ref_exits_1,changelog_valid_range_exits_0. Evidence:changelog HEAD..bogus-refexit before=0 → after=1.--require-coveragewired to real coverage computation and gated; scalardepends_onnormalized to a list with a warning; duplicate entries deduped at parse. Tests:deps_scalar_depends_on_is_not_silently_dropped,deps_duplicate_depends_on_entries_deduped,deps_require_coverage_gate_enforced. Evidence: scalar missing-dep exit 0→1..specsync/registry.tomlfirst with legacy fallback; sends GITHUB_TOKEN/GH_TOKEN Bearer auth; fetch failures count as failed verification (exit 1); no false green when zero registries fetched;--jsonhonored. Tests: covered by resolve suite + unit tests in registry.rs.missing_files. Tests:coverage_missing_referenced_file_exits_nonzero_by_default,coverage_missing_referenced_file_warn_enforcement_exits_zero,coverage_json_includes_missing_files. Evidence: spec referencing ghost file,coverageexit 0→1.commits_behindtracks sub-threshold drift; JSON status field; real CSV/Markdown renderers. Tests:report_require_coverage_above_actual_exits_1,report_require_coverage_at_actual_exits_0. Evidence:report --require-coverage 101exit 0→1.pull_request_reviewin the allowlist;--baseisOption<String>so explicit beats env; HEAD fallback prints a loud stderr warning;--strictrefuses the fallback (exit 1); git-diff failures exit 1 instead of silent "no drift". Tests:diff_head_fallback_prints_loud_stderr_warning,diff_strict_refuses_head_fallback. Evidence: before silent, after prints "specsync: no PR base detected … comparing against HEAD".parser::is_boilerplate_line); version/status values validated; files_exist non-vacuous;--strictexits 1 on F grades/zero specs. Tests:score_json_with_zero_specs_outputs_valid_json,score_strict_with_zero_specs_exits_1. Evidence:score --jsonon zero-spec project before=invalid JSON → after=valid JSON.util::confine_path_to_rootrejects absolute/..paths; malformedrepo@refs reported; "Local Local" heading fixed; one verdict/exit shared by text and JSON. Tests:resolve_local_missing_path_exits_1_without_strict,resolve_local_outside_root_traversal_exits_1,resolve_malformed_cross_project_ref_exits_1,resolve_all_ok_exits_0. Evidence: missing local dep exit 0→1.Plus default-enforcement tests:
check_validation_errors_exit_nonzero_by_default,check_validation_errors_warn_enforcement_exits_zero.Verification
cargo check --all-targets: cleancargo test: 1720 unit tests pass (1 pre-existing root-only failure:change::tests::non_git_walk_skips_volatile_trees_but_fails_on_relevant_walk_errors, fails on main too); 223 integration tests pass; 20 new regression tests passcargo clippy -- -D warnings(CI invocation): cleanCloses #418, closes #419, closes #422, closes #425, closes #430, closes #431, closes #441, closes #444