Skip to content

merge queue: merged #36, #35: a14_three waits out every sync its unreachable leg forks and ends the poisoned leg's nudge at once, so no sync holds the index lock into the next leg (opensoft/openRepoTools#165, lane 4's batch 6 Q18) (+1 more) - #43

Closed
mergify[bot] wants to merge 8 commits into
mainfrom
mergify/merge-queue/ced5892935

Conversation

@mergify

@mergify mergify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Note

This is a merge queue draft opened by Mergify. Its pull requests have merged, and nobody needs to act on it.
Mergify opened it for batch concurrent-canele-3f4txm of the openrepotools-real-code-35-36 queue, to test #36 and #35 before they merged into main.

🎉 What landed

Mergify merged each pull request into main on its own, then closed this draft:

This draft's code was built in this order:

  1. main at 91c9981
  2. #36 + #35, the pull requests of this batch, tested together as one tip
Metadata for CI tooling, read by mergify ci
---
all_scopes: false
checking_base_sha: 91c99816b5c29df6dbe0e4c27b2de959d02e0302
previous_check_retries: []
previous_failed_batches: []
pull_requests:
  - number: 36
    scopes: []
  - number: 35
    scopes: []
scopes: []
...
Required conditions of queue rule openrepotools-real-code-35-36 for merge
Required conditions to stay in the queue

brettheap and others added 8 commits November 11, 2026 00:01
…the /exit refusal prints /exit, and the row and handoff gates say ending, not respawning

Three refusals that fire under --exit did not read true for it. Lane
openRepoTools-3's review 6778792731 on opensoft/openRepoTools#165 found the
first, and named the other two as its neighbours. Lines are at the base,
refs/l3/queue-p3-29 (9bfedfa), where the three stood at :3081, :3083 and :3109.

- :3109, the refusal for a /exit that tmux send-keys could not type, spelled
  the word with backquotes inside a double-quoted die message, so bash ran it
  as a command substitution. stderr gained "line 3109: /exit: No such file or
  directory" and the message read "the record is written and  could NOT be
  typed into the pane". The backquotes are now escaped with a backslash, as every
  other message of the file that names a word spells it, and the message
  prints /exit. A scan of the whole file for a backquote in a double-quoted or
  bare position found no other: the rest are escaped, or inside single-quoted
  printf formats and the quoted usage heredoc.
- :3081 (the ROW WAS NOT FLIPPED gate) and :3083 (the HANDOFF WAS NOT
  REFRESHED gate) fire under --exit as under --restart, and said "respawning"
  (the row gate also "replaced") to a lane whose session was about to be
  ended. The mode words are now set once, ahead of the gates, in the block
  that already holds opensoft/openRepoTools#355's tmux_act_word. --restart's
  messages are byte for byte what they were. --exit says "ending its session
  would leave the register reading RUNNING for a session that has just been
  ended", and "ending now would leave the new session to be started with the
  block of a handoff this act has replaced". The gate logic and the exit code
  (2) are unchanged, as are :3068's words, which already name both acts.

Tests, in tests/test_a23_lane_handoff.py beside the opensoft/openRepoTools#355 test:
- test_the_exit_refusal_prints_its_slash_exit_word_and_runs_no_command, with a
  tmux ahead of the sandbox's fake one that refuses send-keys;
- test_the_row_and_handoff_gates_name_the_act_their_mode_takes, for each gate
  under each flag, with a LANES_EDIT whose set-row-state is refused for the row
  gate and the existing _forcing wrapper (write-handoff exits 1, writes
  nothing) for the handoff gate.

Controls: the same tests pointed at p3's lane-handoff (OPENREPOTOOLS_CODE_ROOT
at an archive of refs/l3/queue-p3-29, so the harness copies p3's file): the
/exit test fails with "/exit: No such file or directory", and the row and
handoff gates fail under --exit on the old words; the two --restart cases pass
on both, as they pin words that did not change. All five pass on this commit.

Authority: Brett Heap's "Yes, extend it (Recommended)", as lane 3 relays it on
opensoft/openRepoTools#165 (6767535266): "Any lane may write a lane-tooling
fix. Lane 3 reviews it and lands it under the standing word once it is READY
and every check is green." This gives no new word of Brett's.

Lane: openRepoTools-5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… poisoned leg's nudge at once, so no sync holds the index lock into the next leg (opensoft/openRepoTools#165, lane 4's batch 6 Q18)

THE RACE. lanes-index runs one sync at a time per workstation on an fcntl lock
in its state directory, and a sync that finds the lock held leaves a mark and
returns 0 before it opens any store (lanes-index:2257-2262). A write's nudge is
that sync, forked detached by the write's exit trap (lanes-edit.sh:3844) and
waited for by nobody. a14_three forked two such syncs it never waited out:
  * the unreachable leg's: a14_wait_psql returns at the sync's FIRST psql line,
    with the sync still running and holding the lock;
  * the poisoned leg's: its PATH carried no indexer of its own, so a host with
    lanes-index installed (every lane workstation; a clean CI runner has none)
    forked a real sync into the poisoned store from every write.
The next a14_three then found the lock held and its unreachable-leg nudge
returned without reaching psql: T430's run-1110d-1, "set-lane-state ... its
nudge DID reach for that store", expected [0], got [1]. A real sync into the
poisoned store also mends the rows the leg exists to read wrong (the inventory
sync deletes the forged row and rewrites the rows a write changed).

THE DESIGN. Test file only; lanes-index and lanes-edit.sh are untouched.
  * Unreachable leg: a wrapper lanes-index, first on its PATH, logs a start
    line and a done line around the real script, run by its own absolute path
    ($A14_BIN, unchanged). a14_wait_nudges polls that log (300 x 0.1 s) until
    every sync that began has ended, and a write leg also needs one to have
    begun, before a14_restore. No lock is probed and no flock is used.
  * Poisoned leg: a wrapper that ends sync at once (no lock, no store) and
    hands every other subcommand to the real script, so a read of the poisoned
    store is still a read of it. The suite's bin directory holds no
    lanes-index, so without a wrapper an act that read the index would find
    none on a clean runner.
  * a14_three asserts the drain with one more is per call.

THE PROOF. The suite has no section selector at this commit, so the whole
section was not run (tests/run.sh and pytest were not run either). bash -n of
the file is clean, and the real a14_three, a14_wait_psql and a14_wait_nudges
text of the old and new file were driven over a model indexer with the same
lock semantics:
  * old file, host indexer on PATH, slow poisoned sync: 2 of 4 write legs fail
    with "nudge DID reach ... expected [0], got [1]";
  * old file, no host indexer, slow unreachable sync: 1 fails the same way, and
    5 of 12 restores ran with a sync still in flight;
  * new file, three variants (host indexer, none, both syncs slow): 32 passed,
    0 failed, and 12 of 12 restores saw no sync in flight;
  * a 3 s sync makes a14_wait_nudges wait 3.11 s and return 0; a sync that
    never ends makes it return 1 after about 32 s, which a14_three reports as
    an is failure; a write leg with no wrapper run fails the same way, and a
    read leg returns at once.

Lane: openRepoTools-3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…sals-keep-their-words

Lane 3 asked for this merge and a fresh CI run before landing (opensoft/openRepoTools#165, 6783977065).

Lane: openRepoTools-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…meout names its counts, and two comments say what was measured (#36 review)

Part of opensoft/openRepoTools#165 (lane 4's batch 6 Q18). Fix round on
#36 after its independent review, which read it
READY at 0be5f1b with three optional NITs; the first change is owed by lane 3
on opensoft/openRepoTools#165. Test file only.

  * The unreachable leg's wrapper logs start and done only when the
    subcommand is sync, with or without --source inventory, and execs the
    tree's own script ($A14_BIN) for every other subcommand with no log line.
    A mode question or a register prefetch is not a nudge, and counted as one
    it would let a write leg's "one began" prove only that lanes-index ran.
    a14_nudge_counts therefore counts exactly the syncs. The poisoned leg's
    wrapper and the control leg are untouched.
  * The timeout's failure description carries the counts from the wrapper's
    log and the count begun before the leg, so a failure shows whether a sync
    was stuck or never began. The status is taken before the description is
    built: its command substitution would otherwise be the status the
    assertion reads.
  * The wait's bound is stated as it is: 300 polls, each a 0.1 s sleep and an
    awk run, about 32 s idle and about 49 s under heavy load.
  * The poisoned leg's comment no longer says an act that read the index would
    prove nothing: it would still differ from the control leg on stderr, and
    what main lacked was the poisoned content.

Proof, with the whole shell suite not run (CI verifies): bash -n is clean;
the real a14 helpers over the model indexer pass 32 of 32 in three variants
with no sync in flight at any restore; export, mode and register read through
the wrapper leave the counts at 0 0, sync and sync --source inventory make
them 1 1 and 2 2; a sync that never ends fails the assertion after about 32 s
with "1 0; begun before this leg: 0", and a leg that forks nothing fails it
with "0 0; begun before this leg: 0".

Lane: openRepoTools-3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…udge-race

Part of opensoft/openRepoTools#165 (lane 4's batch 6 Q18); the branch is
#36. main moved from 749e969 by
#34, which adds only .github/workflows/verify.yml,
so the merge changes nothing in tests/test_lane_helpers.sh.

Lane: openRepoTools-3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…is not a nudge cannot satisfy the wait (#36)

Part of opensoft/openRepoTools#165

The unreachable leg's wrapper runs the real script for a sync with
A14_CALLER=sync in its environment and keeps its plain exec for every other
subcommand. The fake psql logs "psql sync" for that caller and "psql other"
for any other, with its stderr text and exit status as they were.
a14_wait_psql counts only the sync lines (new a14_psql_syncs), and the count
a14_three takes before the leg is taken the same way, so both sides of the
comparison count alike. Once T504's register prefetch or T409's mode question
reaches psql, an uncounted call would satisfy the wait before the nudge had
reached its store.

The read leg's "reached for no store at all" keeps counting every line, with
its own baseline: a read that reaches psql by any caller is what it exists to
catch. The poisoned leg, the control leg and the nudge counts are unchanged.
Test file only.

Lane: openRepoTools-3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Update handoff refusal wording so /exit prints literally and the row and handoff gates describe the action taken by --exit.

  • lane-handoff L3069-3087, L3100-3102, L3123

Tests

Add coverage for the literal /exit refusal and mode-specific wording in the row and handoff gates.

  • tests/test_a23_lane_handoff.py L32, L507-603

Make the derived-index tests track and drain each sync forked by the unreachable leg, while preventing the poisoned leg's nudge from syncing or altering its test data.

  • tests/test_lane_helpers.sh L16417-16480, L16595-16611, L16616-16643 (+4 small edits)

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

@mergify mergify Bot changed the title merge queue: checking #36 + #35 together on main (91c9981) merge queue: merged #36, #35: a14_three waits out every sync its unreachable leg forks and ends the poisoned leg's nudge at once, so no sync holds the index lock into the next leg (opensoft/openRepoTools#165, lane 4's batch 6 Q18) (+1 more) Nov 11, 2026
@mergify mergify Bot closed this Nov 11, 2026
@mergify
mergify Bot deleted the mergify/merge-queue/ced5892935 branch November 11, 2026 19:37
@brettheap

Copy link
Copy Markdown
Contributor

Real-code batch qualification completed under Brett's approval for #35 and #36.

Efficiency limitation: unchanged workflows also ran full original-PR CI when Mergify applied queued labels, and start ordinary main push CI for each landed merge. Those post-merge runs are separate and were still running at this audit. This is successful real-code batching, not a claim of fast-only PR CI or one heavy run total.

Lanes 1–5 and running benches were preserved. No ruleset bypass, app-access, billing/paid upgrade, release/tag, CI workflow, assembly-pin or installed-session change was made. The manual queue remains restricted to this exact pair.

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