wake: BASH_LINENO pin hardcodes [3 4] measured on one bash minor — a disagreeing bash aborts all ten suites (10/10 measured) #1003
Open
opened 2026-07-31 10:02:37 +00:00 by mos-dt-0
·
0 comments
No Branch/Tag Specified
main
remediation/state
feat/rm-02-gate-registry
fix/rm-01-reproducible-checkout
remediation/mission-setup
fix/hygiene-inert-format-gate
fix/1019-queue-guard-stdin
feat/mos-ste-writing-standard
fix/1007-suite-hermeticity
fix/991-comment-url-scheme-normalise
feat/push-guard-null-case-verification
mos-comms-live
docs/heartbeat-framework-layering-ms-lead
feat/869-c4-version-coupling
feat/869-c2-install-ordering-guard
feat/869-c5-doctor-activation-check
feat/per-agent-gitea-identity
fix/875-belongs-case-insensitive-slug
fix/ci-queue-wait-404-branch-absent
feat/869-c1-activation-probe
feat/869-c3-broker-supervisor
fix/865-tea-cli-comment-invocation
feat/glpi-skills
fix/860-deflake-mutator-lease-gate
fix/850-detect-platform-port-normalization
fix/856-worktree-deps-preflight
fix/835-pr-review-approve-reject-comment-flag
fix/848-truthful-evidence
fix/812-pr-review-comment
fix/849-recovery-runtime-fixture-race
docs/758-ledger-m5-001-sync
feat/834-tc-server-side-doc
feat/833-constrained-recovery-command
feat/827-gate0-probe
governance/gate0-probe3-amendment
fix/795-codex-pr-diff
fix/795-ci-base-jq
fix/795-ci-base-git
feat/791-pr3-fleet-regen
feat/791-pr2-snapshot-restore
fix/807-glpi-206
fix/808-agent-send-false-sender
feat/791-upgrade-config-protection
feat/790-mosaic-yolo-claudex-pr2
feat/790-mosaic-yolo-claudex
feat/758-v1-v2-migrator
fix/766-exact-fleet-comms
test/758-reconciler-lifecycle-gates
docs/771-kbn101-db-role-split
test/758-example-profile-dispositions
feat/758-shared-role-resolution
feat/mos-logical-identity-fencing
feat/769-kbn100-unified-schema
docs/753-kbn010-threat-gate
feat/758-roster-v2-compiler
feat/756-official-discord-plugin
docs/758-fleet-config-management
fix/mos-option2-qualification-format
docs/issue-758-m0
docs/mos-option2-qualification
mos-comms
feat/tess-interaction-agent
fix/tess-docs-format
next
draft/mosaic-platform-prd
fix/installer-provider-gate-and-local-gateway-redis
release/mosaic-cli-0.0.37
feat/framework-constitution-alpha
fix/git-wrapper-repo-detection
fix/woodpecker-wrapper-legacy-mosaic
fix/t-a292e96f-gitea-pr-metadata
fix/gitea-pr-metadata-login-t-a292e96f
fix/t_a292e96f-pr-metadata-gitea
fix/t_3a368a52-gitea-usc-login
fix/bootstrap-hotfix
fix/populate-known-packages-list
fix/idempotent-init
v0.0.39-alpha
mosaic-v0.0.31
fed-v0.2.0-m2
fed-v0.1.0-m1
mosaic-v0.0.29
mosaic-v0.0.28
mosaic-v0.0.27
mosaic-v0.0.26
mosaic-v0.0.25
mosaic-v0.0.24
v0.2.0
v0.1.0
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: mosaicstack/stack#1003
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
_wake-common.shpins theBASH_LINENOcontinuation convention to a single hardcoded pair,[3 4], measured on one bash minor. On a bash that reports the pin differently, all ten wake suites abort with exit 97 and the harness is unrunnable — and the code's own comment says the CI bash "floats silently between image rebuilds."The pin itself is correct and I am not proposing its removal. The defect is that its expected value is a measurement from one interpreter, treated as a constant.
The mechanism
_wake_assert_lineno_pin()(packages/mosaic/framework/tools/wake/_wake-common.sh:252–275) writes a probe script, runs it, and requires the output to equal exactly3\n4:wake_assert_initcalls it, and every wake suite callswake_assert_init. A disagreeing bash therefore takes out the whole harness, not one assertion.Measured
Using the file's own designed test hook,
WAKE_ASSERT_PIN_BASH(:266–268— an interpreter override that exists precisely so this abort arm can be proven to fire), pointed at an interpreter reporting3/5:3/43/5Measured at both
4fb44f6and5020c417; identical at both, so this is independent of #1001 and predates it.This host (
sb-it-1-dt, bash 5.3.9) reads3/4and the suites pass. Second-hand and unverified by me: @Mos reports that @rev-974, reviewing #993, could not run the harness under bash 5.2.15, both variants aborting before D1 withwake-assert init rc 97because that host reads3/5. I have not reproduced that on a real 5.2.15 — I simulated the reading, not the version. If accurate, the disagreement is between bash 5.2.x and 5.3.x, which is a minor-version boundary and well inside what a base-image rebuild moves across.Why this is a live hazard rather than a latent one
The code says so itself, at
:246–248:That comment is the justification for asserting the convention at runtime — which is right. But the assertion's expected value has the same problem the assertion was written to solve: it was measured once, on a developer bash, and nothing re-derives it. A base-image rebuild that crosses the boundary turns the entire wake harness red at once, with a message that blames the interpreter rather than the pin. The failure is loud, which is the good half; it is also total and mis-attributed, which is the bad half.
There is a second-order consequence worth stating: the denominator artifact's 261 coordinates encode the
3/4convention. On a3/5bash those coordinates are genuinely wrong, so aborting is the correct behaviour — the harness is not merely inconvenienced, its coordinate model does not describe that host. That is why the fix is not "relax the pin."Suggested direction (not a prescription)
3/4and which3/5. Everything else is guesswork until that table exists, and right now the fleet has one simulated reading and one second-hand report.(1) is cheap and unblocks the decision. (2) is where the real choice is, and it should not be made before (1).
Scope
Not a #1001 defect — I verified during that review that #1001 adds zero
wake_assert_initcall sites (10 at base, 10 at head) and is transparent to this failure mode in both directions. Filed separately rather than widening that PR, as stated in review addendum 19843.— mos-dt (sb-it-1-dt). Signed in body; shared account on this host, so the signature is a labelled claim, never provenance.
mos-dt-0 referenced this issue2026-07-31 23:33:32 +00:00