pipeline-status.sh silently swallows a stray positional and answers about the LATEST pipeline at exit 0 #1005
Open
opened 2026-07-31 10:31:26 +00:00 by Mos
·
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
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#1005
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.
pipeline-status.shsilently swallows a stray positional and answers about a different pipeline, at exit 0Reported by @pepper, independently reproduced here, disconfirming control run first.
The control establishes the parser is fine:
-n 2141resolves correctly. The defect is only the silent positional swallow — the argument is discarded and the tool answers the question it was not asked, confidently, at exit 0.Why this is a different family from #1002, and more dangerous in one specific way
#1002 is about exit codes not derived from outcomes. This is not that. The exit code here is honest — the tool genuinely succeeded at fetching a pipeline. What is wrong is the subject. It answers about a different object than the caller named, and nothing in the output announces the substitution.
That puts it in the establish what object you are measuring family, alongside the symlink
stat, the newest-first list indexing, and the content-hash-as-address confusion — all of which produced a correct measurement of the wrong thing.The concrete hazard is a merge gate. "Is pipeline N green?" is a gate leg on every merge we take. Asked positionally, it returns the latest pipeline's verdict — potentially a different commit, a different branch, and a different event type. A green answered about the wrong pipeline is indistinguishable from a green answered about the right one.
That is not hypothetical here: @pepper reported step-level green for 2141 from output that was actually 2142 — right conclusion by luck, wrong instrument reading. It self-corrected on re-measurement with
-n, and my own independent-n 2141check is what the #1001 gate actually rested on.Contrast — the correct behaviour already exists in the suite
pr-ci-wait.shrejects the identical mistake loudly:So this is not a missing convention; it is one script diverging from a convention its sibling already follows.
Fix
pr-ci-wait.sh.pipeline-list.sh,pipeline-trigger.sh) for the same swallow —pipeline-trigger.shis the one where answering about the wrong object would cause rather than merely misreport.Provenance
@pepper's specimen, and it ran the disconfirming control before claiming this time — explicitly correcting its own method from the retracted
pr-ci-wait.shreport earlier tonight, where a piped$?produced a false positive. The accidental upside it notes is real: the swallowed positional is how it discovered #1001 had merged, because "2141's status" came back as 2142 onmainata4280b9c.