Repository navigation
[code-review] Repair script guards and behavioral QA claims - #7679
Merged
Merged
Conversation
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.
Task
ORB-21222 — [code-review] Repair script guards and behavioral QA claims
Description
Confirmed at pinned agent-main b7d7595 by ORB-21204. This is the single medium/low cleanup bug for module
file:scripts/agent-corpus.py,file:scripts/audit_panics.py,file:scripts/audit_panics.sh,file:scripts/bench-build-budget.sh,file:scripts/bench-compiler-cache.sh,file:scripts/build-budget.py,file:scripts/build-bundled-bwrap.sh,file:scripts/cargo-deny.sh,file:scripts/check-artifact-redaction-guardrail.sh,file:scripts/check-changelog-style.sh,file:scripts/check-ci-failure-reporting.sh,file:scripts/check-ci-macos.sh,file:scripts/check-cli-imports.sh,file:scripts/check-codeql-extension-schema.py,file:scripts/check-codeql-production-paths.py,file:scripts/check-crate-agent-guides.sh,file:scripts/check-dashboard-browser-fixtures.py,file:scripts/check-dashboard-vendor.py,file:scripts/check-dependency-direction.sh,file:scripts/check-desktop-ui.sh,file:scripts/check-doc-links.py,file:scripts/check-durability-syncs.py,file:scripts/check-embedded-asset-portability.py,file:scripts/check-error-translation.sh,file:scripts/check-goldens.sh,file:scripts/check-history-note-size.sh,file:scripts/check-installer-pubkey.sh,file:scripts/check-linux-gated-test-items.py,file:scripts/check-nextest-partitions.py,file:scripts/check-orphan-modules.sh,file:scripts/check-public-artifact-ids.py,file:scripts/check-stability.sh,file:scripts/check-terminal-state-guard.sh,file:scripts/check-test-shell-waits.py,file:scripts/check-unused-dependencies.py,file:scripts/check-web-blocking-handlers.py,file:scripts/check-windows-portability.py,file:scripts/check-workflow-action-pins.sh,file:scripts/check-workflow-yaml.py,file:scripts/check_npm_package.py,file:scripts/ci-await-jobs.py,file:scripts/ci-change-scope.sh,file:scripts/ci-download-verified.sh,file:scripts/ci-guardrails.sh,file:scripts/ci-p90.py,file:scripts/ci-repack-nextest.py,file:scripts/ci-test-affected.py,file:scripts/ci_cache_workflow_tests.py,file:scripts/cleanup-branches.sh,file:scripts/codeql-rust-local.sh,file:scripts/compiler-cache.sh,file:scripts/compiler_cache_process_regression.py,file:scripts/cpu-utilisation.sh,file:scripts/cross-revision-check.sh,file:scripts/delivery_quality_eval.py,file:scripts/delivery_quality_sampling.py,file:scripts/delivery_quality_seed.py,file:scripts/delivery_quality_study.py,file:scripts/evaluate-decision-assistance.py,file:scripts/extract_agent_log.sh,file:scripts/generate-doc-indexes.sh,file:scripts/measure-history-signal.py,file:scripts/precedent_decision_eval.py,file:scripts/probe-mcp-apps.py,file:scripts/qa-full-sweep-inventory.json,file:scripts/qa-full-sweep.sh,file:scripts/qa_full_sweep_regression.py,file:scripts/refresh-dashboard-vendor.sh,file:scripts/release-breaking-changes.py,file:scripts/release-check.sh,file:scripts/release_schema_oracle.py,file:scripts/require-python.sh,file:scripts/rustc-compiler-cache.sh,file:scripts/self_test_hang.py,file:scripts/self_test_hang_regression.py,file:scripts/smoke-claude-mcp-sandbox.sh,file:scripts/smoke-claude-mcp.sh,file:scripts/smoke-npm-install.sh,file:scripts/smoke-plugin-install.sh,file:scripts/sync-plugin-skills.sh,file:scripts/test-agent-corpus.py,file:scripts/test-audit-panics.py,file:scripts/test-auto-task-body-history.py,file:scripts/test-bench-build-budget.py,file:scripts/test-bench-compiler-cache.py. Every finding below is verified against that tree. Evidence artifacts belong to ORB-21204. No high/critical finding is grouped here.Medium — Error-translation guard silently skips paths containing whitespace.
scripts/check-error-translation.sh:115-123emits newline paths, then:186,:201and:215pass them to plain xargs, discard errors and swallow failures. The identical minimal crates tree with an unregistered translator, AutomationError mapping and TaskError mapping exits 1 under plain-root but exits 0 with "error translation guard passed" under "space root". The quoted registry checks still succeed. Workaround: a whitespace-free root. Evidence: error-path-reproduction.json and audit-scripts/reproduce-error-paths.py. Blame traces the producer and original xargs consumers to 4bf554a [ORB-10013]; task exists/done and introduced this lint. Classification defect_in_new/no_test/medium: the introducing commit has no public guard filename regression; current ErrorTranslationGuardTests also uses a whitespace-free root. Shared invariant: update all three filename-consuming scans together and fail closed on scan failures. Public callers are Makefile's ci-guards/ci-fast route through scripts/ci-guardrails.sh; fixtures are ErrorTranslationGuardTests in scripts/test-ci-fast-guards.py. docs/design-patterns/error_translation.md:118-157 promises these scans prevent caller-local translators and ad hoc foreign mapping.Medium — QA claims invalid-plugin refusal without exercising it.
scripts/qa-full-sweep-inventory.json:122declares plugin-invalid-install-is-refused for smoke-plugin-install.sh, butscripts/smoke-plugin-install.sh:10-12validates only the valid candidate;:14-68copies/checks only valid assets.scripts/test-qa-full-sweep.py:3777-3789copies that assertion into a PASS after exit 0 (the only special non-Cargo assertion validator there is npm-package). A mutation reproduction ran the exact pinned smoke with unconditional-success validator recorders and minimal valid manifests: it still exited 0 and earned invalid-plugin refusal, with no invalid fixture supplied. Evidence: plugin-assertion-reproduction.json and audit-scripts/reproduce-plugin-assertion.py. This proves missing negative coverage, not a currently broken validator. Workaround: run the existing negative validator suites separately. Culprit 53c854d [ORB-12047] added this unsupported inventory claim while requiring behavioral QA assertions. Classification incomplete/no_test/medium: its self-tests checked missing assertion labels but did not require this command to exercise a refusal. Update inventory, smoke behavior and the QA assertion/evidence fixture together; do not drop the required negative behavior to make a green report.Low — Ordinary benchmark cancellation fixture can signal a reused PID.
scripts/test-bench-build-budget.py:565saves shim/child PID numbers,:568communicates/reaps the completed benchmark, then:584-590calls pid_alive followed by numeric os.kill(SIGKILL) without reserving an incarnation. The existing pidfd identity regression at:931-934covers only spawn-window and flag-clear, not this ordinary scenario. An exact-function intercepted-process harness models successful cancellation, original PIDs disappearing before survivor inspection, then replacements appearing before finally; errors=[] while two SIGKILLs target the replacement identities after owner reaping. No real signals, PID churn or host incident were used or claimed. Evidence: examination-reproductions.json / benchmark_cancel and audit-scripts/reproduce-review-leads.py. Culprit 4a859fd [ORB-20389] introduced this scenario and raw finally loop; defect_in_new/no_test/low. ORB-21023 and ORB-21054 repair the two different window scenarios and do not cover this remaining site. Audit all three cancellation scenarios, pid_alive uses, reservation helpers and main's scenario list together; preserve timeout/assertion cleanup and descendant termination.Medium — Precedent evaluator admits recorded labels without automation=false.
scripts/precedent_decision_eval.py:159-167rejects only the singleton True;:342-355does not require/type-check automation. The public /4 score CLI on the seeded ar-correct-a case, changed to recorded_human_decision/answered_by=human, exits 2 for automation=true but exits 0 for 1, "true", null and omission, as well as the valid false control. Its own precedent-schema output at:236-238and docs/design/decision-assistance/2_evaluation.md:514-519 require automation=false. Evidence: examination-reproductions.json / actor_eligibility (public CLI cases). Workaround: validate/normalize imported labels separately. Culprit cde2eb9 [ORB-21096] introduced /4 and its non-automation writer requirement; incomplete/no_test/medium. Its tests cover model actors/JSON refusal, not malformed or missing automation. Shared predicate callers include _recorded_field_errors, validate_precedent_dataset and window_label_errors; check score, validate, precedent-schema and the /4 fixtures in test-evaluate-decision-assistance.py together. Preserve the explicitly documented pre-window actor exemption and /1-/3 behavior. ORB-21149/ORB-21177 concern different pre-window behavior, not this in-window input defect.Low — Equivalent numeric enums produce a false breaking signal.
scripts/release-breaking-changes.py:235-236stores enum values with json.dumps;:724-731compares those lexical sets. A public --offline --json survey of a tiny fixture repo changing only an MCP enum [1] to [1.0] reports "enum value 1 removed" and bump=minor although accepted values are identical. The same script already uses semantic _json_value_key for const and disjointness; test-release-breaking-changes.py:807-818 explicitly recognizes mathematical JSON enum equality, but only tests overlap, not replacement. Evidence: examination-reproductions.json / numeric_enum (full CLI report). Culprit 4d3aea3 [ORB-19278] introduced the lexical enum facts; defect_in_new/no_test/low (its tests remove string enums, not semantically equal numeric representations). Reuse one JSON equality rule across enum fact comparison, const and oneOf overlap; preserve bool-vs-number distinctions and real removals. This is an unnecessary bump/migration warning, not missed breaking behavior.All culprit tasks were confirmed with task.show; introducing diffs/blame and relevant test/gate selection were inspected. No covering open code-review work existed before filing; exact plugin assertion and ownership-symbol searches plus all-status symptom searches found no duplicate. These grouped sites have distinct culprit tasks, so each relation is separately classified. No implementation changes or dispatch are authorized by this review task. Repair through ordinary delivery and update affected docs with the same change.
Acceptance Criteria
Execution Summary
Click to expand
Implemented all five repairs:
Docs: docs/design-patterns/error_translation.md and docs/design/decision-assistance/2_evaluation.md already state the repaired contracts, so no text change needed there; release runbook updated for the new smoke behavior.
Validation: python3 scripts/test-ci-fast-guards.py (101 tests OK, from repo root); python3 scripts/test-qa-full-sweep.py --self-test (ok, includes plugin_install_self_test); python3 scripts/test-bench-build-budget.py (all 11 scenarios passed); precedent suite 34 tests OK; release suite 43 tests OK (run from scripts/ so sibling imports resolve); bash scripts/smoke-plugin-install.sh (valid + refusal markers, exit 0); bash scripts/check-error-translation.sh (passed); make ci-guards (exit 0). task.final_validation_commands: none present in envelope (final_validation flag only), so owned checks above are reported as run. No .rs files changed, so cargo fmt/clippy/doc gates not applicable. Reconciliation: 10 modified paths, all deliverable and within task intent (8 task-declared plus companion test/docs paths); git diff --check clean; scratch only under .orbit/tmp/.
Validation
Branch Freshness
origin/agent-mainorbit/ORB-21222-62ae5e0d