Repository navigation
fix(claimant): _send_prompt verifies prompt delivery by read-back (#16992) - #16994
Merged
Merged
Conversation
…6992) _send_prompt documented 'confirmed delivered' but returned True on a 2xx prompt POST alone; the read-back reconcile only ran when the POST failed. That is #16939's live-evidence shape (POST ok, session read-backs empty) on the standing claimant loop (step 4d) and on the stall-nudge path, which injects _send_prompt as its delivery oracle. Now every True is backed by a _get_messages read-back showing the prompt landed: a proven-empty read-back earns exactly one resend (nothing landed, so nothing can double-execute) whose delivery is verified the same way; an unreadable read-back never resends and never claims delivery. Mirrors PR #16989's verified prompt_ok for launch_one, at the shared transport. nudges.py's delivery-discipline doc updated to the verified contract. Tests: TestSendPromptReadBack (7 cases) pins the verdict and the exact POST count per scenario; 3 of the 7 fail against the pre-fix _send_prompt (the 2xx success-path cases). Cross-checked against PR #16989's 40-test launch_one suite, which passes unchanged against this claimant.py.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
3 tasks
Contributor
Author
Contributor
Author
|
Hermetic gate verdict — Felix lane 0640-DZ: GREEN. Run 46316104364 read firsthand: checkout at 3b527a2, Ran 270 tests OK (babysitter/nudges/poll/mode/prompt-constants suites included). Verification complete; ready for Felix's merge call. |
developing-today-fleet
Bot
deleted the
felix/claimant-prompt-readback
branch
November 29, 2026 22:14
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.
Closes #16992. Follow-up to #16939 (gap 2 fixed this shape in
launch_one.py, PR #16989) — the standing-loop half, from lane 0640-DP's out-of-scope observation.Problem
claimant._send_prompt— step 4d's prompt send, also injected into the stall-nudge step as its delivery oracle — documents "Returns True iff the prompt is confirmed delivered" but returned True on a 2xx prompt POST alone. The_get_messagesreconcile only ran when the POST failed. A 2xx POST over a session whose messages stay empty (exactly #16939's live evidence: record saidprompt_ok: true, three server read-backs returned{"data":[]}) counted as delivered, so the standing loop could bind a session, report a successful launch, and leave the task silently unprompted.Change
_send_promptnow verifies every delivery claim by read-back, via a new_prompt_landedtri-state helper over_get_messages(non-empty = landed; proven empty = not landed; unreadable = unknown):nudges.py's delivery-discipline doc updated from the old contract ("a 2xx POST, or a reconcile…") to the verified one.prompt_failed; supervision owns the session).Tests
test_claimant.pygainsTestSendPromptReadBack(7 cases) pinning the verdict and the exact POST count per scenario against a scripted_server_request:Evidence gathered while iterating (local runs are iterating checks only; the remote run below is the verification of record):
test_claimant.py: 84 tests OK, including the 7 new ones;claimant.pyfail exactly the 3 success-path cases;test_launch_one.pypasses unchanged against thisclaimant.py(its fake server's landed-prompt read-back default keeps existing cases' meaning), so the two PRs are compatible in either merge order.Verification: remote fleet-command run against this branch (id on #16992 when dispatched; verdict read firsthand from the full log before merge).
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T22:00:18Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.