Skip to content

fix(sim): stop the k6-baseline EXIT trap masking a clean run as failed - #838

Merged
mforce merged 1 commit into
mainfrom
fix/k6-baseline-exit-trap
Sep 14, 2026
Merged

mforce merged 1 commit into
mainfrom
fix/k6-baseline-exit-trap

Conversation

@mforce

@mforce mforce commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • tools/simulation/run-baseline.sh's EXIT trap ran kill -TERM "${sampler_pid:-}" unconditionally at final exit. On the ordinary happy path the sampler was already reaped by the per-rep cleanup a few lines earlier, so that kill fails — and because the trap runs with set -e still active, the failure aborts the trap right there and silently overwrites the script's explicit exit "$overall_exit" (0) with the trap's own exit status (1).
  • Added the same || true guard the per-rep kill already has, so the trap can no longer clobber a clean exit.
  • Root-caused and reproduced in isolation against run 34789303742, which printed status: clean — no flagged reps, persona coverage OK on every rep. immediately before Process completed with exit code 1.

Closes #837

Test plan

  • bash -n tools/simulation/run-baseline.sh — syntax check passes
  • Reproduced the bug and the fix in an isolated shell snippet matching the trap exactly:
    • unpatched trap under set -e: explicit exit 0 observed as exit 1
    • patched trap (kill ... || true) under the same conditions: observed exit 0
  • Next scheduled/dispatched k6 load-test baseline run on this branch should report success when the baseline is clean (workflow is workflow_dispatch-only per CI: skip the image and web jobs on pull requests that change no code #782/AGENTS.md; will trigger manually to confirm before merge)

kill -TERM on the already-reaped sampler_pid failed under set -e inside
the trap, which silently replaced an explicit `exit 0` with exit 1 even
when every rep was clean.
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 833ce695-3f54-4c58-89de-92dc0824b4e2


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mforce
mforce merged commit f5ec96f into main Sep 14, 2026
18 checks passed
@mforce
mforce deleted the fix/k6-baseline-exit-trap branch September 14, 2026 01:14
mforce pushed a commit that referenced this pull request Sep 16, 2026
🤖 I have created a release *beep* *boop*
---


## [0.1.2](v0.1.1...v0.1.2)
(2026-09-16)


### Features

* **data:** standardize business record chronology
([#820](#820))
([6231b31](6231b31))
* **infra:** optional leader-lease endpoint for pooled deploys
([#869](#869))
([e9bc6a7](e9bc6a7))
* **sim:** seed a second farm for the README dashboard capture
([#867](#867))
([de407c6](de407c6))
* **web:** adopt MUI, themed from the farm palette tokens
([#674](#674))
([#860](#860))
([6c83c5c](6c83c5c))
* **web:** convert Daily entry to MUI, field-first on the phone
([#888](#888))
([b66f8b8](b66f8b8))
* **web:** convert the Dashboard and app shell to MUI
([#829](#829))
([#883](#883))
([2e94277](2e94277))
* **web:** retire the Slack-blue link colour for ink + a rule underline
([#884](#884))
([c08f9d8](c08f9d8))
* **web:** serve a per-request CSP nonce so Emotion's styles apply under
style-src 'self'
([#874](#874))
([ba4e6f3](ba4e6f3))
* **web:** visual language theme overrides for the MUI revamp
([#864](#864))
([#882](#882))
([0bb6b73](0bb6b73))
* **web:** whole-app MUI baseline, theme policy guard and the
[#740](#740) phone action rule
([#823](#823))
([#871](#871))
([af565e4](af565e4))


### Bug fixes

* **auth:** fail closed on unresolved flock-scope actors
([#787](#787))
([#868](#868))
([16d0350](16d0350))
* **auth:** make farm configuration owner-only
([#870](#870))
([42f9036](42f9036))
* **e2e:** repoint the canary at the markup two PRs replaced
([#844](#844))
([18b45dc](18b45dc))
* **i18n:** tl glossary uses the standard passive of ilagay
([#813](#813))
([20dec10](20dec10)),
closes [#738](#738)
* **sim:** stop the k6-baseline EXIT trap masking a clean run as failed
([#838](#838))
([f5ec96f](f5ec96f))
* **web:** declare the rule tokens the Dashboard reads, and guard
undeclared custom properties
([#885](#885))
([5bead1f](5bead1f))


### Performance

* **ci:** start the serialized integration collection first
([#861](#861))
([1dcc7f6](1dcc7f6)),
closes [#839](#839)


### Documentation

* **auth:** record the OAuth 2.1 decision for MCP authentication
([#801](#801))
([0510854](0510854))
* **designs:** MUI revamp design doc, component map, layout system, IA
([#862](#862))
([da49481](da49481))
* **readme:** recapture the daily entry, reports and sales screenshots
([#865](#865))
([f18e336](f18e336))
* **specs:** correct the sales_order_items column list in §10.5
([#812](#812))
([afe4a02](afe4a02)),
closes [#737](#737)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: cluckwork-lockfix[bot] <309265648+cluckwork-lockfix[bot]@users.noreply.github.com>
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.

k6-baseline workflow reports failure even on a clean run (EXIT trap masks exit code)

1 participant