Skip to content

test(plugins): list marker-bearing user messages when a codex turn lacks its prompt - #2941

Merged
freeqaz merged 1 commit into
mainfrom
test/codex-prompt-evidence-diagnostics
Oct 19, 2026
Merged

freeqaz merged 1 commit into
mainfrom
test/codex-prompt-evidence-diagnostics

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Finding 2019: three kubernetes QA cells (#2916 run 39217526356, #2918 run 39218164613, #2905 run 39206960045) failed the Calendar step's Codex mirror evidence with promptSeen: false. The tool call, the result and the terminal answer were all mirrored. The failure printed only the turn object.

The evidence window starts at the last marker-bearing user message. So the failure can't tell a missing or late :prompt mirror (runtime) from a second, unmirrored copy of the prompt that moves the window past the mirrored one (test).

Change

Test-only diagnostics. The window start is unchanged.

  • The session evidence script returns markerUserMessages, the newest ten user messages carrying the marker: seq, whether each is inside the window, mirror identity and origin, idempotency key, timestamp. No content.
  • The three Codex turn checks put it in their failure messages:
    • successful tool call;
    • denied call (previously had no message);
    • disabled tool ("must include a completed marker-bearing native Codex turn").

Verification

  • New test in tests/integration/plugin-driver-real-preflight.test.mjs. It runs the real evidence script against local SQLite transcripts through a stubbed execGateway:
    • One mirrored prompt: the turn is proven (codexMirrorTurnVerified).
    • Mirrored prompt, then an unmirrored copy: reproduces the observed shape (promptSeen: false with call, result and answer seen). The message lists both rows, the mirror outside the window.
    • Disabled-tool check: lists the same rows.
  • File 2/2. eslint and prettier are clean.
  • Internal review: approve. One optional nit is not applied: the test could live under tests/conformance/. It stays in the preflight file, which checks-baseline-2 already runs.

Risks

Low. Test-only. The evidence output grows by at most ten small records.

For the owner: the next sighting will show which case it is.

  • An unmirrored copy after the mirror would justify starting the window at the first marker-bearing message (test-side).
  • No :prompt row at all would point at the runtime's prompt mirror (product).

…cks its prompt

Finding 2019: three kubernetes QA cells failed the Calendar step with
promptSeen false while the tool call, result and terminal answer were all
mirrored. The failure printed only the turn object, so it could not tell a
late or missing prompt mirror from a second, unmirrored copy of the prompt
that moves the evidence window past the mirrored one.

The evidence script now returns the newest ten marker-bearing user
messages (seq, whether inside the window, mirror identity and origin,
idempotency key, timestamp; no content). The three Codex turn checks
(tool call, denied call, disabled tool) include them in their messages.
The window start is unchanged. A stubbed-transcript test proves the
unmirrored-copy shape reproduces the observed failure and that the new
listing names both rows.
@freeqaz
freeqaz requested a review from a team as a code owner October 19, 2026 13:30
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds marker-bearing user-message metadata to Codex transcript assertion failures and tests the resulting diagnostics.

Example: The calendar-marker-2019 prompt mirror is at sequence 0, followed by an unmirrored duplicate at sequence 1.

  • Before: The assertion reports promptSeen: false without showing that the mirrored prompt precedes the evidence window.
  • After: The failure lists both messages, marking sequence 0 outside the window and sequence 1 inside it.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct diagnostic improvement with meaningful SQLite-backed coverage and passing exact-head checks; supplied execution evidence remains harness-level.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored, test-only PR is outside the ordinary live-proof gate; the inspected SQLite harness tests diagnostic behavior rather than genuine Codex execution, and the prepared UI images concern a different PR.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors cannot tell whether a failed Calendar QA assertion reflects an absent prompt mirror or a duplicate prompt that excluded it from the evidence window.
Reason: The collaborator-authored direction is established, and bounded diagnostics address the stated investigation problem without claiming to repair the unknown runtime cause.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it adds useful, focused QA diagnostics without weakening transcript assertions, and no actionable defect was found.

Priority: P3
Reviewed head: e2fc2538aa0d7354b5c00db0eb592a56f8817f3f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not demonstrate a base-fail/head-pass execution or a live Gateway diagnostic failure; those limits do not block this maintainer-authored test-only change.
Agent review details

How this fits together

The real plugin QA helper reads an Agent's SQLite transcript through execGateway, correlates native Codex turn mirrors, and produces assertions and failure diagnostics.

flowchart LR
  A[Calendar QA scenario] --> B[Native plugin assertions]
  B --> C[Gateway transcript reader]
  C --> D[SQLite transcript]
  D --> E[Turn evidence and marker metadata]
  E --> F[Assertion result or diagnostic]
Loading

Technical review

Best possible solution:

Retain the bounded metadata diagnostics and existing turn-isolation assertions so a subsequent QA failure can distinguish an excluded prompt mirror from an absent one.

Do we have a high-confidence way to reproduce the issue?

Source inspection establishes that a later marker-bearing user message excludes an earlier prompt mirror; the added SQLite scenario exercises that path, but no target code was run during this review.

Is this the best way to solve the issue?

The diagnostic-only change is appropriately narrow: it reuses the existing reader and assertion owners while preserving the isolation rule needed to reject stale turn evidence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7afa66cb5532.

Provenance checked

  • Current-turn transcript window keeps the original intent (b4b6a0e: Scope repeated-session evidence to the current user turn so previous allowed results cannot establish later approval behavior.)
  • Disabled-tool completed-turn assertion keeps the original intent (d411a30: Require a completed native Codex turn alongside zero invocations so an empty transcript cannot prove tool disablement.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • stevenlee-oai: Raw commit b4b6a0e adds tests/helpers/plugin-driver-real.mjs:490 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b4b6a0e0d870; files: tests/helpers/plugin-driver-real.mjs)
  • kevinlin-openai: Raw commit 393f466 adds tests/helpers/plugin-driver-real.mjs:511 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 393f4664925b; files: tests/helpers/plugin-driver-real.mjs)
  • Free Wortley: Raw commit f13d057 adds tests/helpers/plugin-driver-real.mjs:1284 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f13d057a26e8; files: tests/helpers/plugin-driver-real.mjs)

Review metrics

Metric Value Why it matters
Change scope Production +0/-0; test helper +34/-1; regression test +126/-0 The SQLite scenario scaffolding exercises the actual diagnostic reader without adding production seams.

Labels

Label changes:

  • add P3: This improves contributor-facing QA failure diagnostics without changing product behavior or test acceptance criteria.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This improves contributor-facing QA failure diagnostics without changing product behavior or test acceptance criteria.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 9:55 AM ET / 13:55 UTC.

@freeqaz
freeqaz merged commit 4604010 into main Oct 19, 2026
80 checks passed
@freeqaz
freeqaz deleted the test/codex-prompt-evidence-diagnostics branch October 19, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant