~bigbes/agents-dev · parade

main · last commit 13 days ago · 7g0stsfu

← Back to the parade

ah-1cx.10 [bug] askAndPark has the same half-landed-park bug ah-1cx.2 fixed for delegation Past Stand

status: closed P2 bug milestone:v0.2.0
bd reopen ah-1cx.10
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-08-04T23:43:09Z
Started2026-08-04T23:54:11Z
Updated2026-08-05T00:23:05Z
Closed2026-08-05T00:23:05Z
Description
Found while fixing ah-1cx.2 and deliberately left alone there to keep that change reviewable.

askAndPark parks the parent in Question the way delegateAndBlock parks it in Blocked, and it has the identical failure mode: if its UpsertTask(Question) — and its Yonote/question sentinel writes — fail AFTER the question comment is posted, the refinalize arm has no marker for it, so the parent routes to In Review and the question is silently dropped. The human is left with a card in review that is actually waiting on an answer nobody will give.

ah-1cx.2's shape is the fix: arm a durable kv intent marker BEFORE the first irreversible side effect, extract an idempotent park tail, and add a refinalize-only re-park arm that re-attempts the flip from the marker and never repeats the side effect. See reparkDelegatedParent / parkParentBlocked in internal/reconcile/reconcile.go as of 67dcf3c.
Acceptance criteria
A failed UpsertTask(Question) leaves the card in In Progress with a loud comment and audit event, and a later tick re-parks it to Question without re-posting the question comment. Covered by tests mirroring TestDelegationParkPersistFailure.

Depends on

  • ah-1cx — Hardening: post-audit bug sweep (2026-07-20) parent-child open

Depended on by

Nothing depends on this issue.

No comments.

Close reason

Done in 8716a2a. Confirmed BY REPRODUCTION. askAndPark flipped the record, moved the card and posted the question with no durable trace of the intent, so a failed UpsertTask(Question) left the run row finished and the record in_progress — exactly the state adoptOrFail hands to finalize's refinalize arm, which had only a delegation re-park and therefore routed the parent to In Review with the question silently dropped. Rather than clone ah-1cx.2's mechanism it is GENERALIZED: parkKind + parkMarker (armed/alarmed/opaque payload, key <kind>_park/<task>/<attempt>, delegation's wire format byte-identical to before so older markers still decode) and parkParent(plan), a plan-driven idempotent tail both parks share; delegationPark is now just a payload codec over it. askAndPark arms the marker with the question text BEFORE posting the question, runs the tail, and returns true regardless of whether the flip landed; reparkQuestionedParent re-attempts the flip from the marker and re-posts the question only if the asked marker is absent from the thread. A marker that cannot be armed AT ALL deliberately does not park: it posts the question as plain text with NO sentinel and finalizes to In Review, because a card parked with no way to resume is worse than one in review carrying its question. ONE EXTRA BUG FOUND AND FIXED HERE: questionParkFailedComment is the only comment the daemon posts after its own question and before the card reaches Question, and detectAnswer read it as the HUMAN'S REPLY — so a healed card resumed instantly with the daemon quoting its own error text back to the agent. It now ends with askedSentinel so the outstanding-question marker stays at the end of the thread, pinned by a test. Cover: seedAsking fixture, TestQuestionParkPersistFailure (4 subtests), TestQuestionParkGuards (4 subtests), fakeStore.getKVKeyErr. FOLLOW-UP FILED SEPARATELY: ToolAskUser (the mid-run channel) has no marker at all and has the same shape of hole.
  • Eugene Blikh added under epic ah-1cx · 2026-08-05T02:43:09Z
  • Eugene Blikh created the issue · 2026-08-05T02:43:09Z
  • Eugene Blikh changed status to in_progress · 2026-08-05T02:54:11Z
  • Eugene Blikh added label milestone:v0.2.0 · 2026-08-05T03:10:43Z
  • Eugene Blikh closed the issue · 2026-08-05T03:23:04Z
    Done in 8716a2a. Confirmed BY REPRODUCTION. askAndPark flipped the record, moved the card and posted the question with no durable trace of the intent, so a failed UpsertTask(Question) left the run row finished and the record in_progress — exactly the state adoptOrFail hands to finalize's refinalize arm, which had only a delegation re-park and therefore routed the parent to In Review with the question silently dropped. Rather than clone ah-1cx.2's mechanism it is GENERALIZED: parkKind + parkMarker (armed/alarmed/opaque payload, key <kind>_park/<task>/<attempt>, delegation's wire format byte-identical to before so older markers still decode) and parkParent(plan), a plan-driven idempotent tail both parks share; delegationPark is now just a payload codec over it. askAndPark arms the marker with the question text BEFORE posting the question, runs the tail, and returns true regardless of whether the flip landed; reparkQuestionedParent re-attempts the flip from the marker and re-posts the question only if the asked marker is absent from the thread. A marker that cannot be armed AT ALL deliberately does not park: it posts the question as plain text with NO sentinel and finalizes to In Review, because a card parked with no way to resume is worse than one in review carrying its question. ONE EXTRA BUG FOUND AND FIXED HERE: questionParkFailedComment is the only comment the daemon posts after its own question and before the card reaches Question, and detectAnswer read it as the HUMAN'S REPLY — so a healed card resumed instantly with the daemon quoting its own error text back to the agent. It now ends with askedSentinel so the outstanding-question marker stays at the end of the thread, pinned by a test. Cover: seedAsking fixture, TestQuestionParkPersistFailure (4 subtests), TestQuestionParkGuards (4 subtests), fakeStore.getKVKeyErr. FOLLOW-UP FILED SEPARATELY: ToolAskUser (the mid-run channel) has no marker at all and has the same shape of hole.
Stored rows — what this pane was built from, as read
issues 1 row
id ah-1cx.10
content_hash f4afcd3a4d676d400e4e0f7fe95bf71960d6b6960626598a3471013233594d3c
title [bug] askAndPark has the same half-landed-park bug ah-1cx.2 fixed for delegation
description Found while fixing ah-1cx.2 and deliberately left alone there to keep that change reviewable. askAndPark parks the parent in Question the way delegateAndBlock parks it in Blocked, and it has the identical failure mode: if its UpsertTask(Question) — and its Yonote/question sentinel writes — fail AFTER the question comment is posted, the refinalize arm has no marker for it, so the parent routes to In Review and the question is silently dropped. The human is left with a card in review that is actually waiting on an answer nobody will give. ah-1cx.2's shape is the fix: arm a durable kv intent marker BEFORE the first irreversible side effect, extract an idempotent park tail, and add a refinalize-only re-park arm that re-attempts the flip from the marker and never repeats the side effect. See reparkDelegatedParent / parkParentBlocked in internal/reconcile/reconcile.go as of 67dcf3c.
design
acceptance_criteria A failed UpsertTask(Question) leaves the card in In Progress with a loud comment and audit event, and a later tick re-parks it to Question without re-posting the question comment. Covered by tests mirroring TestDelegationParkPersistFailure.
notes
status closed
priority 2
issue_type bug
assignee NULL
estimated_minutes NULL
created_at 2026-08-04T23:43:09Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-08-05T00:23:05Z
closed_at 2026-08-05T00:23:05Z
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata �{}
source_repo
close_reason Done in 8716a2a. Confirmed BY REPRODUCTION. askAndPark flipped the record, moved the card and posted the question with no durable trace of the intent, so a failed UpsertTask(Question) left the run row finished and the record in_progress — exactly the state adoptOrFail hands to finalize's refinalize arm, which had only a delegation re-park and therefore routed the parent to In Review with the question silently dropped. Rather than clone ah-1cx.2's mechanism it is GENERALIZED: parkKind + parkMarker (armed/alarmed/opaque payload, key <kind>_park/<task>/<attempt>, delegation's wire format byte-identical to before so older markers still decode) and parkParent(plan), a plan-driven idempotent tail both parks share; delegationPark is now just a payload codec over it. askAndPark arms the marker with the question text BEFORE posting the question, runs the tail, and returns true regardless of whether the flip landed; reparkQuestionedParent re-attempts the flip from the marker and re-posts the question only if the asked marker is absent from the thread. A marker that cannot be armed AT ALL deliberately does not park: it posts the question as plain text with NO sentinel and finalizes to In Review, because a card parked with no way to resume is worse than one in review carrying its question. ONE EXTRA BUG FOUND AND FIXED HERE: questionParkFailedComment is the only comment the daemon posts after its own question and before the card reaches Question, and detectAnswer read it as the HUMAN'S REPLY — so a healed card resumed instantly with the daemon quoting its own error text back to the agent. It now ends with askedSentinel so the outstanding-question marker stays at the end of the thread, pinned by a test. Cover: seedAsking fixture, TestQuestionParkPersistFailure (4 subtests), TestQuestionParkGuards (4 subtests), fakeStore.getKVKeyErr. FOLLOW-UP FILED SEPARATELY: ToolAskUser (the mid-run channel) has no marker at all and has the same shape of hole.
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at 2026-08-04T23:54:11Z
is_blocked 0
labels 1 row
issue_id ah-1cx.10
label milestone:v0.2.0
dependencies 1 row
id ab1233c4-de25-53c4-b7f3-b17818eaedf3
issue_id ah-1cx.10
type parent-child
created_at 2026-08-05T02:43:09Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-1cx
depends_on_wisp_id NULL
depends_on_external NULL
events 4 rows
id 019fcf28-dc17-7f17-873d-f69215717282
issue_id ah-1cx.10
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-08-05T02:43:09Z
id 019fcf32-f57f-7119-b170-d1b1c0d424c6
issue_id ah-1cx.10
event_type status_changed
actor Eugene Blikh
old_value {"id":"ah-1cx.10","title":"[bug] askAndPark has the same half-landed-park bug ah-1cx.2 fixed for delegation","description":"Found while fixing ah-1cx.2 and deliberately left alone there to keep that change reviewable.\n\naskAndPark parks the parent in Question the way delegateAndBlock parks it in Blocked, and it has the identical failure mode: if its UpsertTask(Question) — and its Yonote/question sentinel writes — fail AFTER the question comment is posted, the refinalize arm has no marker for it, so the parent routes to In Review and the question is silently dropped. The human is left with a card in review that is actually waiting on an answer nobody will give.\n\nah-1cx.2's shape is the fix: arm a durable kv intent marker BEFORE the first irreversible side effect, extract an idempotent park tail, and add a refinalize-only re-park arm that re-attempts the flip from the marker and never repeats the side effect. See reparkDelegatedParent / parkParentBlocked in internal/reconcile/reconcile.go as of 67dcf3c.","acceptance_criteria":"A failed UpsertTask(Question) leaves the card in In Progress with a loud comment and audit event, and a later tick re-parks it to Question without re-posting the question comment. Covered by tests mirroring TestDelegationParkPersistFailure.","status":"open","priority":2,"issue_type":"bug","owner":"bigbes@gmail.com","created_at":"2026-08-04T23:43:09Z","created_by":"Eugene Blikh","updated_at":"2026-08-04T23:43:09Z"}
new_value {"status":"in_progress"}
comment NULL
created_at 2026-08-05T02:54:11Z
id 019fcf42-17c0-7591-928d-9c22442751c6
issue_id ah-1cx.10
event_type label_added
actor Eugene Blikh
old_value NULL
new_value NULL
comment Added label: milestone:v0.2.0
created_at 2026-08-05T03:10:43Z
id 019fcf4d-68ef-726d-856c-c6472889585e
issue_id ah-1cx.10
event_type closed
actor Eugene Blikh
old_value
new_value Done in 8716a2a. Confirmed BY REPRODUCTION. askAndPark flipped the record, moved the card and posted the question with no durable trace of the intent, so a failed UpsertTask(Question) left the run row finished and the record in_progress — exactly the state adoptOrFail hands to finalize's refinalize arm, which had only a delegation re-park and therefore routed the parent to In Review with the question silently dropped. Rather than clone ah-1cx.2's mechanism it is GENERALIZED: parkKind + parkMarker (armed/alarmed/opaque payload, key <kind>_park/<task>/<attempt>, delegation's wire format byte-identical to before so older markers still decode) and parkParent(plan), a plan-driven idempotent tail both parks share; delegationPark is now just a payload codec over it. askAndPark arms the marker with the question text BEFORE posting the question, runs the tail, and returns true regardless of whether the flip landed; reparkQuestionedParent re-attempts the flip from the marker and re-posts the question only if the asked marker is absent from the thread. A marker that cannot be armed AT ALL deliberately does not park: it posts the question as plain text with NO sentinel and finalizes to In Review, because a card parked with no way to resume is worse than one in review carrying its question. ONE EXTRA BUG FOUND AND FIXED HERE: questionParkFailedComment is the only comment the daemon posts after its own question and before the card reaches Question, and detectAnswer read it as the HUMAN'S REPLY — so a healed card resumed instantly with the daemon quoting its own error text back to the agent. It now ends with askedSentinel so the outstanding-question marker stays at the end of the thread, pinned by a test. Cover: seedAsking fixture, TestQuestionParkPersistFailure (4 subtests), TestQuestionParkGuards (4 subtests), fakeStore.getKVKeyErr. FOLLOW-UP FILED SEPARATELY: ToolAskUser (the mid-run channel) has no marker at all and has the same shape of hole.
comment NULL
created_at 2026-08-05T03:23:04Z