Skip to content

fix(ci): reobserve authenticated admission caller movement - #109

Merged
brettheap merged 1 commit into
mainfrom
016-candidate-admission-reread
Nov 16, 2026
Merged

brettheap merged 1 commit into
mainfrom
016-candidate-admission-reread

Conversation

@brettheap

@brettheap brettheap commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Scoped candidate-admission repair

Fix a deterministic artifact-reader race exposed while diagnosing stopped efficiency candidate #108. Existing final-candidate rereads already reobserve authenticated caller movement, but the earlier artifact reread returned hard full fallback for the same valid movement.

The historical log at 14:47:26Z records only candidate/incomplete-evidence. Publication at14:47:21Z and caller transition at14:47:23Z are consistent with this reproduced gap, not proof of its exact historical field.

Admission-only pending-enabled reads now independently authenticate the same first-attempt caller, discard the raced view with NO proof, then use the unchanged bounded observer to reacquire the real archive and all sources. Artifact mutation, invalid/failed/cancelled/foreign/rerun callers and qualified/historical/non-pending reads still refuse. Fixed diagnostics reveal no API/private values.

Validation

  • Before runtime edits: 7 expected failures, 12 passes in the 19-case reproducer.
  • Repaired/new 25 cases plus prior candidate stability/archive contracts: 75 passed, 6468 deselected, zero skipped (56.77s), canonical tests/run.sh in isolated task QA.
  • Paired OpenSpec stabilize-candidate-admission-reread validates strict.
  • Broader local contracts, exact-head expert/Codex review, ordinary full and reusable CI are pending, not claimed passed.

No workflow/job/coverage-baseline/policy/profile/queue/foundation/helper/provider/tool/settings/app/paid/release/assembly pin or shared-checkout change. Preserve lanes1–5. User authorized checked normal merges then a NEW owner-consented two-PR canary only after source qualification. Stopped #108 remains failed evidence; this PR does not enqueue anything.

Summary by Sourcery

Ensure candidate admission retries after authenticated caller movement so only a fresh, stable observation can provide proof.

Bug Fixes:

  • Reobserve authenticated admission callers when they change during artifact reads, preventing raced views from supplying candidate proof.
  • Preserve strict refusal behavior for invalid caller changes, mutated artifacts, and non-pending reads.

Enhancements:

  • Add a safe retry diagnostic for authenticated admission-caller movement without exposing private values.

Tests:

  • Add coverage for caller movement, invalid transitions, stale-proof prevention, diagnostic privacy, strict non-pending reads, artifact mutation, and observation-budget behavior.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai

sourcery-ai Bot commented Nov 16, 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 5 days and 9 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Treat authenticated admission-caller movement during artifact rereads as pending evidence, emit a fixed diagnostic, and preserve strict refusal for other changes.

  • .github/ci/delivery_evidence.py L200-211
  • .github/ci/delivery_route.py L53-54, L337-339

Tests

Cover caller movement, invalid callers, proof reacquisition, diagnostics, strict-read behavior, and bounded observation of the admission reread race.

  • tests/test_ci_candidate_artifact_stability.py L1-175

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

@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: ef050fa24d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T16:04:07.391739Z ef050fa 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.

@brettheap

Copy link
Copy Markdown
Contributor Author

Exact-head local expert review: CLEAN (no actionable correctness/safety findings).

Reviewed code head ef050fa against actual base288e7d0c550e5ef0828fdb17abe11a81611b160d, paired with spec77 head51fbb83b98cc4e04ee0d03fba1b8fac6e92898de/basead9ba9d5931eb9d6de9e2af9589917d3d8fef77d. Parent master plus nine independent delegated roles completed: architecture, performance, security, QA, static/Sonar, API/contracts, data integrity, reliability/concurrency and simplicity.

All roles independently inspected exact heads and reported no actionable findings. The raced admission view returns no record; same first-attempt caller authenticates before existing bounded fresh observation, and strict artifact/qualified/history/invalid-state refusal remains. No workflow/job/coverage/policy/profile/queue/helper scope changed. Historical108's generic refusal remains an unconfirmed historical cause, not falsely reported solved by a specific field.

Validation executed by coordinator using canonical isolated wrapper: initial reproducer7expected failures/12passes; repaired focused75PASS/0skip; expanded preservation selector1058PASS,5485deselected,0skip,in362.52s. Strict paired OpenSpec VALID. Experts' static reviews are separate from these actual test executions.

Sonar quality gate PASSED; four open python:S9073 composite-test-assertion suggestions at new test lines20/36/172/175 are non-blocking readability/diagnostic nits, not altered/suppressed or represented as zero issues. Genuine connector review6921712322/receipt6921710987 also completed clean at this exact head.

Ordinary full43902952450 and reusable43902952376 are still pending; this review comment is not CI, merge authority, a synthetic green status or canary acceptance. Normal merge only when latest-head/full/reuse checks pass and main still qualifies. All exclusions remain.

@brettheap
brettheap merged commit ad0a6be into main Nov 16, 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