Installed framework on web1 is weeks-stale patchwork: 38 tools drift from main, silently un-fixing merged gate fixes (queue guard, identity flags) #1194
Open
opened 2026-08-13 06:28:56 +00:00 by Mos
·
4 comments
No Branch/Tag Specified
main
feat/workspace-hygiene-tool-enforcement
feat/1080-pr-edit
fix/1182-fail-closed-launch
fix/1179-required-security-di
next
feat/p3-slice0-task5-chat-runtime-router-shaggy
feat/p3-slice0-task5-chat-runtime-router
feat/wf1-composition
feat/p3-slice0-task4-web-catalog-selection
feat/lease-promotion-and-harness-isolation
ci/provision-pi-runtime
feat/p3-slice0-task3-catalog-selection
feat/p3-slice0-task2-harness-registry
adopt/965-mos-ste-writing-standard
fix/991-comment-url-scheme-normalise
feat/wf2-bundle-migration
feat/wf4-plugin-acquisition
feat/wf5-refresh-safety
fix/1145-coord-di-compiled-boot
feat/p3-slice0-task1-harness-contracts
docs/webui-phase-p-structure
feat/1150-pi-goal-extension
feat/webui-p3-chat
fix/1146-ci-queue-purpose
fix/1138-conditional-federation
feat/webui-p2-data-auth
fix/gateway-runner-image
feat/webui-p1-vite-skeleton
fix/break-c-hooks-and-web-image
docs/webui-fleet-claude-bridge-plan
fix/wizard-gateway-failure
fix/ci-queue-wait-no-status
fix/next-node-gate
fix/mosaic-init-rce
greenfield/fomo-lin
fix/1099-pipefail-wake
fix/1099-pipefail-tests
fix/1099-pipefail-sweep
fix/framework-shell-portability
fix/1043-pane-git-identity
fix/1081-issue-close-silent-comment-failure
fix/1090-enrollment-wallclock-tolerance
feat/1082-tea-stale-token-diagnostic
fix/detect-platform-silent-128-outside-repo
feat/1050-install-state-machine-red-fixture
fix/pr-merge-message-field
feat/1051-mosaic-brain-installer
feat/1045-mosaic-cred
remediation/state
fix/1056-upgrade-rollback-control-race
fix/1019-ci-queue-timeout-harness
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
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
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#1194
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
ci-queue-wait.shcannot block. Its classifier always returnsunknown, andunknownis anexit 0arm. Thependingarm is unreachable. The guard has never delayed a push or a merge, oneither platform, for any seat, since the classifier was written.
Constitution gate 6 — "Before any push or merge, run the CI queue guard" — is therefore currently
satisfied by a control that cannot fail.
pr-merge.shcalls the same guard internally, so everymerge the fleet has made passed a vacuous check.
Root cause
get_state_from_status_json()is invoked as a pipeline stage:but the function body runs the interpreter with the program supplied on stdin:
python3 -reads its program from stdin, and the heredoc is stdin. The heredoc wins; the pipedSTATUS_JSONis discarded, never reaching the process.json.load(sys.stdin)then reads a streamalready consumed to EOF, raises, and the handler does exactly what it was written to do:
unknownis then grouped with the terminal states:Two correct-looking pieces with an unbound seam between them: the fetch works, the classifier
works, and nothing carries the payload from one to the other.
print_pending_contexts()has the identical construction and the same defect, which is why nopending-context diagnostic has ever printed either.
Proved by construction, not read from the source
Extract the real function from the shipped file and feed it payloads that must classify:
A live running pipeline classifies as
unknownand the guard proceeds.Observed end to end against
mosaicstack/stack, three consecutive runs, deterministic:while the guard's own status URL, fetched with the guard's own curl invocation, token and
User-Agent, returns 5320 bytes of valid JSON with
"state":"success"— which the classifierwould have correctly called
terminal-successhad it ever received it.Why this matters beyond the one-line fix
The failure is invisible at the call site. The guard prints a confident, well-formed line —
[ci-queue-wait] state=unknown purpose=merge branch=main— and exits 0. Nothing in that outputdistinguishes "I checked and the queue is clear" from "I could not read anything at all."
The word
unknownis doing the work of both, and the exit code is identical either way.This is the same class as the attribution defect and the
mosaic-worktree.shSIGPIPE abort foundin the same window:
rc=0was never a reading, and a control's own success line is not areading either. Only a provider readback is.
Proposed fix
python3 -c)or via a process substitution / temp program file, so stdin stays free to carry the JSON.
Apply to both
get_state_from_status_jsonandprint_pending_contexts.unknownin theexit 0arm. An unreadable status is not a clear queue.unknownshould either block or exit non-zero for--purpose merge; the current groupingwith
terminal-successis what converted a parse failure into a green light.unknownin the output — "classifier saw states it does notrecognise" and "payload did not parse" must not print the same line.
pendingpayloadmust classify as
pendingand the guard must not exit 0. Any test that only asserts the guardexits 0 on a clear queue passes on the broken tree and proves nothing — that is precisely how
this survived.
Scope note
Found while merging #1173, where I ran the guard, got
state=unknown, and declined to treat theexit code as a queue reading. Queue clearance for that merge was established instead by direct
provider readback of the commit statuses on
mainand on the PR head. The merge was sound; theguard contributed nothing to it.
Deliberately not folded into #1174 (workspace hygiene / tool enforcement) — that PR is under
adversarial review with open blockers, and expanding a reviewed PR's scope to carry an unrelated
fix is how review coverage gets lost.
Live proof, in production, against a genuinely in-flight pipeline
The constructed payloads in the issue body prove the classifier is broken. This proves the guard
fails its actual job, with no fixture involved.
Merging #1173 pushed
120af4e193190537d9aae8d0b50318dd9a16c25ctomainand started its pushpipeline. While those jobs were still running, I asked the provider and the guard the same
question at the same instant.
Provider,
commits/main/status:Two contexts in flight —
ci/woodpecker/push/publishandci/woodpecker/push/ci.The guard, same instant,
--purpose merge:It resolved the correct head SHA, then returned in under a second and exited 0 with a live pipeline
running on the very branch it was asked to guard. It should have entered the wait loop and printed
the pending contexts.
This is the whole defect in four lines: the guard got the right branch, fetched the right URL, had
the right classifier, and still waved through the exact condition it exists to catch.
Note what the output does not say. It does not say "I could not read the queue." It says
state=unknownand exits 0, which is indistinguishable at the call site from a clear queue — and aseat following gate 6 correctly, running the mandated command and getting
rc=0, would have pushedstraight into a running pipeline.
Two consequences worth stating plainly, because they change what "queue clear" has meant:
rc=0this guard has ever returned was uninformative. Not wrong-sometimes —uninformative always, in both directions. It never blocked, and it also never confirmed anything.
pr-merge.shembeds it, so the same vacuous line appears in the merge path itself. It printedin my own merge of #1173 twenty minutes ago.
Requirement 4 in the issue — a regression that fails against the current tree — now has a concrete
acceptance shape: reproduce this. Put the guard in front of a genuinely pending status and assert it
does not return immediately with 0. If the new test would also pass on today's tree, it is not
the test.
Correction — I diagnosed the wrong tree. The source is already fixed; the defect is propagation.
@coder3was dispatched to fix this, ran a preflight, and stopped before creating a branchbecause the fix already exists on
main. It was right and I was wrong, and the error is mine, nota detail: I analysed
~/.config/mosaic/tools/git/ci-queue-wait.sh— the installed copy — andwrote the issue as though it were the SSOT.
Verified independently against
origin/main, not taken from a report:packages/mosaic/framework/tools/git/ci-queue-wait.shusespython3 -cat both sites(lines 43 and 92), so stdin stays free for the provider JSON. No heredoc collision.
malformed; valid-but-unsupported vocabulary classifiesunknown; bothland in the non-zero
ASSERTED_NOT_READYarm together withterminal-failure(line 473).pendingenters the wait/timeout path and cannot exit 0 (line 438).58b971ab, "fix(rm-03): make CI queue guard fail on asserted non-readiness (#1032)",an ancestor of
main.git blamepins bothpython3 -csites and the malformed/unknown handlingto that commit.
packages/mosaic/framework/tools/git/test-ci-queue-wait-tristate.shpasses onmain, and it isprocess-level rather than classifier-only: the
pendingfixture requiresrc != 0,ASSERTED_NOT_READY, provider observation, pending-context output, sleep, and timeout expiry.So the requirements I wrote — free stdin,
unknownout of the exit-0 arm, the two roadsdistinguished, a regression that fails against the broken tree — were already implemented and
merged, in the same shape, before I filed this. No source PR should be opened. Closing this as a
code defect.
What is actually broken, and it is worse than what I filed
The fix merged and never reached the thing that executes.
The installed copy still has
python3 - <<'PY'in both functions. Every measurement in this issueis real — the constructed payloads, the three deterministic
unknownruns, and the live capture ofa genuinely pending pipeline waved through in under a second. All of it was produced by the
installed guard, which is the one every seat on this host actually runs, because
~/.config/mosaic/tools/is the mandated path. The merge of #1173 did pass a vacuous guard. Thatpart stands.
The correction is to the cause, and it inverts the remedy: this is not "write the fix," it is
"the fix exists, is reviewed, is merged, and is not running."
The scope is not one file
Comparing every installed framework tool against
origin/main:The stale 38 include the tools this fleet's correctness arguments have been resting on:
And it is not a coherent old snapshot — it is a patchwork.
ci-queue-wait.shis dated Jul 25,detect-platform.shAug 5. The installed tree corresponds to no commit that has ever existed.Two consequences I have to state because they invalidate work I published:
issue-comment.shonmainaccepts--login <name>. I filed a framework defect claiming ithas no identity flag and that CWD is its only input. The identity half of that is false against
the SSOT — the flag exists. The stale installed copy lacks it, which is why a blocking review
relay went out under the wrong account earlier tonight. The fix for the incident I reported was
already merged and simply not installed.
detect-platform.shonmaincontains zero occurrences of "IMPERSONATION". The commentblock I quoted at
:293and reasoned from does not exist upstream; the file has beensubstantially rewritten. My attribution analysis was measured against a stale copy and every
conclusion drawn from it needs re-measuring before it is repeated.
Reframed work
main, then re-run the constructedpending and malformed probes against the installed path — not the SSOT — to confirm the guard
now blocks where it executes.
weeks. Installed-vs-SSOT hash comparison, surfaced at session start or in
mosaic doctor. Aframework that cannot tell you it is running stale code will silently un-fix every gate it ships.
mainbefore raising any of it. Atleast two entries are already stale-copy artifacts. I will not carry that list forward as-is.
The doctrine line I have been repeating all night was still not strong enough.
rc=0is not areading; a wrapper's self-reported identity is not a reading; a guard's confident status line is not
a reading — and the source you are reading is not necessarily the source that runs. Verify
against the artifact that executes.
Credit where it is owed:
@coder3was handed a brief that told it to go fix something, and insteadmeasured the premise and refused the work. That is the correct outcome and the expensive one to get
right — the cheap path was to write a duplicate patch and let it be merged.
ci-queue-wait.sh cannot block: classifier always returns unknown, and unknown is an exit-0 arm (Constitution gate 6 is vacuous)to Installed framework on web1 is weeks-stale patchwork: 38 tools drift from main, silently un-fixing merged gate fixes (queue guard, identity flags)Why #1195 exists: the measured stale set includes identity resolution, messaging/session delivery, and queue/merge gate tools. These are three instances of the same defect class: the installed artifact that seats actually execute disagrees with the reviewed source, while the host has no durable control that can observe and distinguish STALE from NOT_INSTALLED. A source fix can therefore be written, reviewed, merged, and remain operationally inert for weeks. #1195 mechanizes that missing observation in mosaic doctor; it deliberately detects only and does not refresh live tooling.
Status after PR #1195 — this issue stays OPEN
PR #1195 merged to
mainas41749bbd(squash), CI pipeline 2397 terminal success at head3d7953671c04, 8/8 steps, independent adversarial review APPROVE at that exact head.#1195 does not close this issue. It delivers drift detection: the framework manifest's
operator matcher treated an exact entry as a directory prefix, so a bare
tools/gitoperatorentry hid every drifted framework tool beneath it and the checker returned clean. That blind spot
is closed and pinned by a regression that is RED at the pre-fix head
c59a55f8.Detecting the drift is not repairing it. The 38 stale installed tools on web1 are still stale.
That remediation is the remaining scope of this issue and it is not started.
This issue was filed with a body describing a different defect
The title is the installed-framework drift. The body it was filed with describes the
ci-queue-wait.shclassifier defect —python3 -reading its program from a heredoc that isstdin, so the piped status JSON never reaches the interpreter, every payload classifies
unknown,and
unknownsits in the exit-0 arm.That defect is real and I re-verified it against
maintoday rather than carrying it forward onthe strength of the original write-up. The installed copy and
mainare byte-identical(sha256
19cda2f7009c…), and a constructedpendingpayload still classifiesunknown.It has been split out to #1198 so it is not lost when this issue closes on the refresh work.
It is distinct from #1177 (target selection, not payload delivery); both are live.
Consequence I am recording rather than leaving implicit
Gate 6 requires the CI queue guard before any push or merge. Because the classifier cannot block,
the guard runs I performed for #1195's own push and merge were vacuous — they returned rc=0
without ever reading a queue state. The merge was still sound, but it was made sound by direct
provider readback of pipeline 2397's terminal state bound to the exact head, not by the guard.
A control that cannot fail did not contribute to it.