Skip to content

Preserve safe candidate CI refusal diagnostics - #118

Merged
brettheap merged 2 commits into
mainfrom
ci/candidate-evidence-refusal-117
Nov 20, 2026
Merged

brettheap merged 2 commits into
mainfrom
ci/candidate-evidence-refusal-117

Conversation

@brettheap

@brettheap brettheap commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Candidate #117 passed SonarCloud but was not admitted; the probe logged only a generic evidence refusal and the heavy suite did not run. The underlying hosted cause is not established. The CLI and the evidence reader could also load different refusal classes, masking fixed evidence reasons.

Share the refusal classes in the trusted leaf module and emit only fixed phase/operation/error labels for generic candidate failures. Keep the existing fast-mode error text, exit semantics, full fallback, proof requirements, and timeouts. Do not log command lines, raw subprocess output, URLs, or exception text for generic failures.

Validation

  • Both CLI regressions reproduced the old behavior before the fix.
  • Isolated cutover, delivery and full-CI parity tests: 366 passed, 84 skipped in the standalone environment. Hosted full CI and reusable qualification remain required.

No queue admission, retry, source-PR edits, activation, ruleset/app settings, or release change. P08 remains held.

Summary by Sourcery

Preserve safe candidate refusal diagnostics and unify refusal handling across delivery verification components.

Bug Fixes:

  • Preserve fixed, safe diagnostics for generic candidate evidence failures while keeping sensitive command, subprocess, URL, and exception details out of CI logs.

Enhancements:

  • Share refusal types and validation helpers from the trusted scope module so the CLI and evidence reader use the same refusal classes.

Tests:

  • Add regressions covering fixed refusal output and sanitized candidate timeout diagnostics.
  • Strengthen lane-helper credential-field checks while allowing credential-like substrings in legitimate paths.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai

sourcery-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-20T22:21:40.822460Z
We couldn’t complete this review. Comment @codex review to try again.
72d65a4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai

sourcery-ai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Move the shared refusal types and validation helper into the trusted scope module, and have both delivery modules import them so fixed refusal reasons retain a consistent type.

  • .github/ci/delivery_evidence.py L23
  • .github/ci/delivery_verify.py L24, L54 (removed lines)
  • .github/ci/shadow_scope.py L28-40

Implementation

Add sanitized candidate-failure labels and track the verification phase so generic candidate refusals provide safe diagnostics while fast-mode wording remains unchanged.

  • .github/ci/delivery_verify.py L536-562, L570-573, L582-591

Tests

Add regressions for preserving fixed evidence refusal text and reporting sanitized candidate timeout diagnostics.

  • tests/test_ci_cutover.py L12, L514-560

Adjust the restart-intent test to check credential-like field names rather than rejecting credential-like substrings in legitimate path values.

  • tests/test_lane_helpers.sh L16735-16736, L16828

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@brettheap

Copy link
Copy Markdown
Contributor Author

Exact-head local Codex panel review for PR #118: head 1c1018d, base a922a12. The coordinator and ten specialists (architecture, performance, security, QA, static analysis, API integration, data integrity, reliability, maintainability and CI) found no actionable findings.

The two new regressions reproduce the previous generic refusals, then prove fixed, safe diagnostics with exit 1 and no successful proof output. The diff adds no access, admission, retry, timeout or fallback changes, and the original #117 hosted refusal is still unconfirmed.

Validation: isolated QA with the exact pinned standard passed 1,343 CI-related cases. Three Git-dependent assertions initially failed in the source archive because it lacked HEAD; all three passed in the isolated exact-commit Git checkout. SonarCloud and the parity contract passed. Full PR CI 44822279789 and reusable qualification 44822279591 must still pass completely.

This is local review evidence, not a hosted Codex review or GitHub approval. The hosted bot reported quota exhaustion. No canary retry, queue action, new scope, or P08 change is authorized by this review.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@brettheap

Copy link
Copy Markdown
Contributor Author

The earlier full-CI run failed only the no-submodule shell credential-field assertion, which searched whole TSV lines. The real restart-intent reader roundtripped a valid fixture with three path values containing key: the old assertion returned 3, the column-only assertion 0, and the replacement still detected an injected KEY field. The new test keeps a credential-like substring in its fixture path so this stays deterministic. No runtime, route, gate, or workflow code changed in this follow-up. Bash syntax and diff checks passed. New head: 72d65a4; review and both hosted qualifications must be refreshed.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Exact-head local Codex panel review for PR #118: head 72d65a4, base a922a12. Coordinator and ten reviewers (architecture, performance, security, QA, static analysis, API integration, data integrity, reliability, maintainability and CI) found no actionable findings.

The previous production-refusal fix is unchanged from the earlier panel review. This follow-up is a Bash test fixture and assertion change only. The existing runtime emits field-tab-value; the old assertion matched credential-looking substrings in whole lines. With a harmless path containing key, the real reader returned three legacy matches and zero field-name matches; an injected KEY field is still detected. The committed fixture now deliberately exercises a key-containing path. No runtime validation, coverage, admission, fallback or timeouts changed. Bash syntax/diff hygiene and both isolated verifier regression tests passed; exact-head SonarCloud passed.

Hosted Codex reported quota exhaustion again; this is local review evidence, not a hosted bot review or GitHub approval. Normal merge still requires full CI 44828291565 and reusable qualification 44828291674 to pass on this head. No canary/source event, queue action, or P08 change is authorized by this review.

@brettheap
brettheap merged commit 61110e1 into main Nov 20, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant