Skip to content

Keep failed-own-record tests reliable when a sibling starts late - #652

Merged
vjovanov merged 3 commits into
mainfrom
fix/issue-619
Nov 8, 2026
Merged

vjovanov merged 3 commits into
mainfrom
fix/issue-619

Conversation

@vjovanov

@vjovanov vjovanov commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #619

Before, the failed-own-record test could report an ambiguous edit spawns both with only mock:mock:d in its append log. Both invocations had started, but d deliberately failed before delayed c executed its body, so normal abort handling interrupted c before its append. Now the private fixture lets c complete successfully before d deliberately exits 1, preserving the scenario under either startup order.

What this changes

The clarification at §FS-rhei-agent-visit-pairing.5 explains that spawning an invocation does not guarantee its body's side effects survive sibling failure; tests requiring completion before deliberate failure establish that order inside their fixture.

The shared failure body waits up to five seconds for c's successful completed record matching the scenario's task, state and current visit. A prerequisite timeout prints the record path and last observation and exits 97, distinct from d's intended exit 1.

The original test and the new regression share the real scenario. An independent scheduler exercises c-first and delayed-c/d-first startup and snapshots c's record at each deliberate d exit without waiting. Assertions retain both target appends and the ambiguity warning, check durable records, and require only d to retry with a fresh attempt log while successful c and orphan x stay untouched and the ticket remains in work. This continues enforcing §FS-rhei-agent-visit-pairing.2: d's failed own record decides, and successful orphan x cannot answer for it.

Both scheduler record reads explicitly decode UTF-8 so Unicode fixture paths survive non-UTF-8 default text decoding. The change is confined to test fixtures and the specification clarification; production scheduling, pairing, abort policy, public interfaces and persisted formats are unchanged.

Verification

  • The regression first failed before the repair at the exact missing-c assertion, with independent records showing both starts, interrupted c, d exit 1 and successful x. It was committed ignored, then enabled by the repair.
  • On 34bee098e3, both exact tests passed: agent_target_edit_tests::failed_own_record_coverage_survives_delayed_sibling_startup and agent_target_edit_tests::an_orphan_never_answers_for_an_invocation_whose_own_spawn_failed. The unchanged triage reproducer passed both startup orders.
  • Both real tests also passed with Unicode paths under CP1252 text decoding on Linux with UTF-8 filesystem semantics. Both scheduler encoding controls passed. This independently verified the fix for review's only major finding, R1-01; no findings remain unresolved, rejected or deferred. Native Windows/macOS execution remains for hosted CI.
  • The final local gate on 34bee098e3 ran the unchanged reproducer and pre-commit run --all-files, both exit 0, in 3m40s total. All configured hooks passed: CI-pinned grund 0.18.0 config/check, staged fissile, formatting, workspace Clippy/build/tests, gate script tests, links and attribution checks. Hosted CI and merge remain for the ship step.

Checklist

  • The most-specific spec point is updated and cited with a § marker.
  • pre-commit run --all-files passes locally.
AI workflow: `rhei`, 15 agent invocations across 1 model; 8 tasks completed, 8 in progress.
  1. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 1) — cdx, openai/gpt-6.1-sol — 1m13s — 338.2k in / 2.8k out
  2. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.triage assessing (visit 1) — cdx, openai/gpt-6.1-sol — 6m11s — 1.9M in / 14.3k out
  3. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.triage reproducing (visit 1) — cdx, openai/gpt-6.1-sol — 3m31s — 673.0k in / 8.4k out
  4. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 2) — cdx, openai/gpt-6.1-sol — 2m32s — 634.2k in / 6.2k out
  5. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.specify specify — cdx, openai/gpt-6.1-sol — 9m54s — 3.1M in / 19.6k out
  6. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 3) — cdx, openai/gpt-6.1-sol — 1m17s — 440.2k in / 3.0k out
  7. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.implement implement — cdx, openai/gpt-6.1-sol — 4m32s — 1.4M in / 6.9k out
  8. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 4) — cdx, openai/gpt-6.1-sol — 1m31s — 350.8k in / 3.7k out
  9. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.review-1 review — cdx, openai/gpt-6.1-sol — 5m08s — 1.7M in / 12.1k out
  10. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 5) — cdx, openai/gpt-6.1-sol — 1m26s — 460.3k in / 3.7k out
  11. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.fix-1 fix — cdx, openai/gpt-6.1-sol — 4m24s — 1.5M in / 5.4k out
  12. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 6) — cdx, openai/gpt-6.1-sol — 1m27s — 291.2k in / 3.7k out
  13. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket.review-2 review — cdx, openai/gpt-6.1-sol — 3m19s — 964.7k in / 7.8k out
  14. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 7) — cdx, openai/gpt-6.1-sol — 1m20s — 424.0k in / 3.1k out
  15. github-issues-agent-grounds-rhei-619-implement-7c69c7b6.ticket supervising (visit 8) — cdx, openai/gpt-6.1-sol — 1m29s — 409.6k in / 3.6k out
Accounting Value
cost $4.29
total tokens 14.6M
input tokens (incl. cache) 14.5M
input cache read 13.6M
input cache write -
output tokens (incl. cache) 104.2k
output cache read -
output cache write -
coverage Complete

@vjovanov vjovanov changed the title Pin failed-own-record coverage under delayed sibling startup Keep failed-own-record tests reliable when a sibling starts late Nov 8, 2026
@vjovanov
vjovanov marked this pull request as ready for review November 8, 2026 08:15
@vjovanov
vjovanov requested a review from kimeta November 8, 2026 08:15
@vjovanov
vjovanov force-pushed the fix/issue-619 branch 4 times, most recently from 857c163 to 70a55bb Compare November 8, 2026 10:59
Fix R1-01: explicitly decode both the successful-c prerequisite and the non-waiting snapshot using the spawn record encoding, preserving Unicode fixture paths across locales.

Portable fixtures: §REQ-cross-platform.4 docs/requirements/cross-platform.md:30.
@vjovanov
vjovanov merged commit 3bba544 into main Nov 8, 2026
4 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.

agent_target_edit_tests::an_orphan_never_answers_for_an_invocation_whose_own_spawn_failed fails intermittently on Linux: an ambiguous edit spawns both

1 participant