Skip to content

fix(ci): pin Pi to 0.87.1, widen parallel shard caps, fix livecheck guard - #2

Merged
sofigern merged 6 commits into
mainfrom
fm/livecheck2
Oct 12, 2026
Merged

sofigern merged 6 commits into
mainfrom
fm/livecheck2

Conversation

@sofigern

@sofigern sofigern commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Intent

Make #2 green, as the captain asked, without touching main: the two Pi extension tests (Behavior portable serial 1 and 4) fail only because CI installs @earendil-works/pi-coding-agent unpinned and Pi 0.99/1.x changed the stock tool-header rendering and the HTML export renderer lookup the fork's extensions and tests target, so CI pins the last Pi 0.8x release (0.87.1), the version both tests are measured to pass on; and Behavior portable parallel 1 was cancelled by a 10-minute job cap sized for a three-minute shard that now takes about ten, so both parallel shards move to the same 30-minute hang-tripwire tier as the serial shards (upstream's policy). Deliberate choices: pin rather than cherry-pick upstream's Pi adaptations (kunchenguid#6162, kunchenguid#6338, kunchenguid#6530), which conflict with this fork; do not change the Pi extensions or tests themselves; document the pin and the measured shard wall in docs/fm-test-portable-shards.md. The earlier commits on this branch fix the live-status Stop hook (count a lookup that ran whatever it answered, exempt quoted titles and Confluence link text, accept owner/repo#N in the verifier) and are already validated.

What Changed

  • CI: .github/workflows/ci.yml now installs @earendil-works/pi-coding-agent@0.87.1 instead of the floating latest, in both the portable parallel 1 job and the serial shard job. docs/fm-test-portable-shards.md gains a "Pi package pin" section explaining the pin. Both parallel shards go from a 10-minute to a 30-minute timeout-minutes, the same tier as the serial shards. The doc's timeout table records the measured shard wall.
  • Livecheck guard: bin/fm-livecheck-lib.sh changes how the guard counts lookups and extracts work items:
    • A lookup that ran is counted whatever it answered.
    • Quoted titles and Confluence link text are exempt.
    • The extractor accepts owner/repo#N, the form the guard prints in its fix command.
    • The tr character set is fixed so GNU tr on Linux accepts it.
    • bin/fm-livecheck-guard.sh and bin/fm-verify-items.sh are adjusted to match.
  • Tests and docs: tests/fm-livecheck-guard.test.sh adds regression tests for these cases. Its fixture builds large input with printf to stay under the Linux per-argument size limit. docs/livecheck-guard.md is updated to match.

Risk Assessment

✅ Low: The CI changes pin both Pi installs to 0.87.1 and raise both parallel shard caps to 30 minutes, with the pin and shard wall documented. This matches the stated intent and leaves the Pi extensions and tests untouched. I did not run the CI or the tests.

Testing

I parsed the workflow YAML, then ran the two Pi extension tests against a real Pi 0.87.1 install in a temp directory. Both passed with no not ok lines; the temp install is removed. The remote runner, the 10-minute-to-30-minute cancellation behavior, and the earlier livecheck commits were not exercised here.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Both parallel shards and the serial shard carry a 30-minute timeout in the parsed workflow ✅ pass live workflow-semantics.txt: tests-portable-parallel-1, tests-portable-parallel-2 and tests-portable-serial all show timeout=30
Both Pi-installing CI steps pin @earendil-works/pi-coding-agent@0.87.1 ✅ pass live workflow-semantics.txt: the parallel-1 job and the serial job both show npm install -g @earendil-works/pi-coding-agent@0.87.1
The Pi branch extension test passes against the real Pi 0.87.1 package ✅ pass live pi087-tests.txt: pi --version printed 0.87.1; tests/fm-pi-branch-extension.test.sh printed ok lines only
The Pi calm extension test, including the HTML export renderer lookup and native E2E, passes against Pi 0.87.1 ✅ pass live pi087-tests.txt: tests/fm-calm-pi-extension.test.sh printed ok lines only and exited 0
Evidence: Workflow job timeouts and Pi install pins (parsed YAML)

Source: Workflow job timeouts and Pi install pins (parsed YAML)

lint: timeout=nil
test-coverage: timeout=nil
tests-portable-parallel-1: timeout=30
   pi-install: npm install -g @earendil-works/pi-coding-agent@0.87.1
tests-portable-parallel-2: timeout=30
tests-portable-serial: timeout=30
   pi-install: npm install -g @earendil-works/pi-coding-agent@0.87.1
tests-herdr: timeout=75
tests-timing-aggregate: timeout=nil
macos-stock-bash: timeout=10
invariants: timeout=nil
Evidence: Pi 0.87.1 test run output

Source: Pi 0.87.1 test run output

== tests/fm-pi-branch-extension.test.sh
ok - outcome delivery keeps the event loop running and interleaved reports stay ordered and exactly once
ok - a session replaced mid-delivery cancels cleanly and the stored outcome still arrives exactly once
ok - a failing store script surfaces to the branch and its outcome is neither lost nor delivered twice
ok - a failed cursor write re-delivers a routine note exactly once more while a captain outcome stays deduplicated
exit=
== tests/fm-calm-pi-extension.test.sh
ok - Pi Calm native /skill:ahoy geometry keeps every collapsed thinking and tool block at zero height while preserving expansion, history, restart, and Calm-off rendering
ok - Pi Calm working ship moves on a slow independent cadence over faster fixed-cell blue water, paints the complete boat standard yellow with balanced resets, keeps ANSI-stripped width exact, flips the directional sail on the exact bounce at both edges and every width, clamps visible and hidden resizes, falls back deterministically when narrow, freezes and resumes column/direction across settle/start without hidden-time jumps or duplicate timers, resets only on a fresh session, and installs and removes one scheduler-owning widget across starts, settle, abort, failure, shutdown, reload, replacement, and Calm toggles while leaving Calm-off visibility untouched
ok - the rendered-export-DOM guard renders in one pass, retries a bounded number of Chrome start-up failures, and reports the Chrome binary, Chrome version, Pi version, exit status, and Chrome diagnostic when every attempt fails
ok - Pi calm native E2E replaces the stock working row with a moving, resize-clamped working ship that freezes and resumes across two working periods in one Pi session, clears on abort, keeps captain turns visible, hides exact operational user rows without changing persistence, restores stock rendering Calm-off, survives restart, and preserves export plus Ctrl+O behavior
exit=

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Both parallel shards and the serial shard carry a 30-minute timeout in the parsed workflow ✅ pass live workflow-semantics.txt: tests-portable-parallel-1, tests-portable-parallel-2 and tests-portable-serial all show timeout=30
Both Pi-installing CI steps pin @earendil-works/pi-coding-agent@0.87.1 ✅ pass live workflow-semantics.txt: the parallel-1 job and the serial job both show npm install -g @earendil-works/pi-coding-agent@0.87.1
The Pi branch extension test passes against the real Pi 0.87.1 package ✅ pass live pi087-tests.txt: pi --version printed 0.87.1; tests/fm-pi-branch-extension.test.sh printed ok lines only
The Pi calm extension test, including the HTML export renderer lookup and native E2E, passes against Pi 0.87.1 ✅ pass live pi087-tests.txt: tests/fm-calm-pi-extension.test.sh printed ok lines only and exited 0
  • Parsed .github/workflows/ci.yml with Ruby YAML and listed each job's timeout-minutes and Pi install command
  • Installed @earendil-works/pi-coding-agent@0.87.1 into a temp prefix and ran FM_PI_PACKAGE_DIR=<that package> bash tests/fm-pi-branch-extension.test.sh
  • Same setup: bash tests/fm-calm-pi-extension.test.sh (includes the native E2E and the HTML export renderer guard)
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 1)
✅ **Push** - passed

✅ No issues found.

…mpt quoted titles

The live-status Stop hook blocked a reply twice over a false positive: the
reply named a 2015 Confluence page titled "TEP-22: Trends Service", the hook
read TEP-22 as a Jira key, and the suggested bin/fm-verify-items.sh run came
back "jira TEP-22 error twg lookup failed (exit 1)" because no such issue
exists. The hook refused to count that error line, so nothing could satisfy it
and only the per-session budget ended the turn.

Two changes, both captain-approved:

1. A lookup that ran counts whatever it answered. fm_livecheck_verified no
   longer drops a record whose tool result is an error, and a verifier result
   line counts in every state except unverified: error means the lookup ran
   and failed (not found, no access, outage), which is the live answer the
   reply then reports; unverified means no backend could look at all, so no
   lookup ran. The current-turn requirement is unchanged.

2. Keys inside quoted text are not claims. The tokenizer now skips a
   double-quoted span (straight or curly) that opens and closes on one line,
   and the text of a Markdown link whose target is a Confluence or wiki page
   (host containing "confluence" or "wiki", or a path under /wiki/,
   /confluence/, or /display/). The link target is still read, an unbalanced
   quote exempts nothing, and bare keys, inline code, and ordinary prose remain
   claims. docs/livecheck-guard.md states the exact rule.

Regression: the TEP-22 case end to end (quoted-title reply with no lookup
allows, the same key bare still blocks, the failed verifier run allows and
resets the budget), the extraction rules above, and the verifier error versus
unverified line distinction.
…me from one bug in the livecheck code, and I fixed it. The other two and the attestation check are not caused by this PR. **Fixed (serial 2 and serial 3).** The set passed to `tr -c` in `fm_livecheck_tokens` ended in `+-\n`. GNU `tr` on the Ubuntu runner reads that as a reverse range and fails with "range-endpoints of '+-\012' are in reverse collating sequence order" (read from the CI log). The tokenizer then returned nothing, so `fm_livecheck_extract_items` printed no items. That broke two tests: - `tests/fm-livecheck-guard.test.sh`, "extraction must canonicalize each kind once" (serial 2): got `''`. - `tests/fm-verify-items.test.sh`, "one unreadable item must make the exit status 1" (serial 3): `fm-verify-items.sh` exited 2, its "no recognizable work item" code. I inferred this link from reading `bin/fm-verify-items.sh` (it exits 2 when extraction is empty); I did not see that error message in the log. macOS BSD `tr` tolerates the old set, so the tests passed locally. The change is one line in `bin/fm-livecheck-lib.sh`: the set now ends `%+\n-`, with `-` last. I checked the new set with GNU `tr` (`gtr`) on sample text and it tokenizes correctly. After the edit, `tests/fm-livecheck-guard.test.sh` and `tests/fm-verify-items.test.sh` pass locally. I could not run the GNU `tr` path through the full test scripts, so serial 2 and 3 are confirmed only by that check plus reading the code, not by a CI rerun. **Not caused by this PR (no change made).** - **Serial 1 and serial 4:** the failing tests are "Pi calm renderer and lifecycle contract" and "Pi outcomes rendering consumers must preserve stock behavior", plus a "stalled-crew escalation was not counted" failure in serial 1. The two Pi failures also failed in the CI run on `main` (run 38220189770), and the livecheck PR did not touch them. I did not look into the stalled-crew failure separately. - **"PR must be raised via no-mistakes":** the job log shows `PR_BODY`, `PR_HEAD_SHA` and `PR_NUMBER` all empty, and the check says no pipeline attestation was found. This is an attestation check, not a code defect. It should clear once the no-mistakes pipeline updates the PR. - **Behavior portable parallel 1:** it was cancelled with no verdict, so it was not a failure. I left it, as it was not in the selected findings
…hich I fixed. Serial 1 and 4 fail in code this PR does not touch. **Serial 2 (fixed).** - The tr fix from round 1 worked: serial 3 passed in run 38226059349, and the "extraction must canonicalize" test no longer failed. - That fix exposed a failure that the earlier one had hidden. Serial 2 now failed at "a capped window with no prompt yields the tail's own (empty) records (expected '0', got '1')" in `tests/fm-livecheck-guard.test.sh` (read from the CI log). - Cause: the fixture `test_turn_records_grow_the_tail_window` passed a 300 KB string to `jq --arg`. Linux limits a single argument to about 128 KiB, so jq failed with "Argument list too long" and the fixture was never built. macOS has no such limit, so it passed locally. - I reproduced it in an `ubuntu:24.04` Docker container (observed in an experiment): the same "expected '0', got '1'" failure, with the jq error printed above it. - Fix: the fixture now builds the noise entries with the `printf` builtin, which has no exec argument limit. - After the fix, `tests/fm-livecheck-guard.test.sh` and `tests/fm-verify-items.test.sh` both exit 0 in the same Ubuntu container. I did not run them locally on macOS after the edit. **Serial 1 and serial 4 (not caused by this PR, no change).** - Serial 1 failed on "Pi calm renderer and lifecycle contract". Serial 4 failed on "Pi outcomes rendering consumers must preserve stock behavior". - Both also failed in the run on main (38220189770, commit 68d66ad), and this PR changes only `bin/fm-livecheck-guard.sh`, `bin/fm-livecheck-lib.sh`, `docs/livecheck-guard.md` and `tests/fm-livecheck-guard.test.sh`. - I did not investigate why they fail. Serial 1's log also showed a "stalled-crew escalation was not counted" failure that I did not look into. **Behavior portable parallel 1.** It was cancelled with no verdict, and run 38226059349 itself ended as cancelled, so I left it alone
…ry form the guard prints in its fix command. The guard prints bound refs as `owner/repo#N` (e.g. `'a/b#4'`), but `fm_livecheck_extract_items` in `bin/fm-livecheck-lib.sh` only recognized bare `#N`, so the verifier exited 2 ("no recognizable work item"). I added a `repo_ref_pat` branch to the extractor that emits `ref owner/repo#N`; it canonicalizes the same way as a bare ref bound to a repo, so duplicates still collapse. Regression test `test_hook_printed_command_is_accepted_by_the_verifier` in `tests/fm-livecheck-guard.test.sh` runs the real hook on a reply naming an issue URL, a bare `#4`, a PR URL, a Jira key and a Jenkins build URL. It extracts the command the banner prints and runs the real `fm-verify-items.sh` with a failing fake `gh`. It asserts the exit status is not 2 and that every item gets a lookup line. Before the lib change the verifier rejected the printed command with exit 2 (observed in an experiment; the test then failed on the missing `a/b#4` line). `tests/fm-livecheck-guard.test.sh` and `tests/fm-verify-items.test.sh` both exit 0 locally on macOS. I did not run them on Linux. I briefly used a path-limited `git stash push` mid-session and restored it with `git stash apply` and a drop. The working tree contains only the two intended changes
…k-lib.sh` (header), `bin/fm-verify-items.sh` (header) and `docs/livecheck-guard.md` now say the extractor and verifier accept an explicit `owner/repo#N` reference as written, which is the form the guard banner prints in its fix command. They previously described only bare `#N`. I ran `tests/fm-livecheck-guard.test.sh` locally on macOS after the edit and it exits 0. The edits are comments and Markdown, so no code behavior changed
…30 minutes

Three checks were red on every run of this PR and on main at 68d66ad while
every other check passed.

Behavior portable serial 1 and serial 4 failed in the Pi extension tests.
CI installs @earendil-works/pi-coding-agent unpinned, and Pi moved from the
0.8x line to 1.1.0 since this fork's merge-base with upstream (2026-09-09).
Pi 0.99.0 changed the stock tool-header rendering that
tests/fm-pi-branch-extension.test.sh compares against, and Pi 1.0.1 renamed
the HTML export renderer lookup that tests/fm-calm-pi-extension.test.sh
drives. Measured locally on 2026-10-12 with FM_PI_PACKAGE_DIR and the
version's pi on PATH: both tests pass on 0.87.1 (13 and 42 cases), the branch
test fails on 0.99.2, and both fail on 1.1.0 exactly as on CI. Upstream
adapted the extensions and tests in kunchenguid#6162, kunchenguid#6338, and kunchenguid#6530, which sit on 25
extension commits this fork does not have, so they do not cherry-pick
cleanly. Pinning CI to the last 0.8x release, which is what the fork's
extensions target, is the fix that fits this PR; the doc records that lifting
the pin means taking upstream's changes.

Behavior portable parallel 1 was cancelled by its own 10-minute job cap while
still passing: on 2026-10-12 runs the shard needs about 10 minutes
(fm-captain-hold-lifecycle 287 s, fm-lint 163 s, fm-test-run 89 s), far past
the "about three minutes" the cap was sized for. Both parallel shards now use
the same 30-minute hang-tripwire tier as the serial shards, which is also
upstream's policy since kunchenguid#4910.
@sofigern sofigern changed the title fix(livecheck): count a lookup that ran whatever it answered, and exempt quoted titles fix(ci): pin Pi to 0.87.1, widen parallel shard caps, fix livecheck guard Oct 12, 2026
@sofigern
sofigern merged commit 5a2a24b into main Oct 12, 2026
15 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.

1 participant