Title: pkgs/id(scripts): build-sh-test.sh ignores unaccounted CLI arguments before running checks · Issue #10567 · developing-today/code · GitHub
Open Graph Title: pkgs/id(scripts): build-sh-test.sh ignores unaccounted CLI arguments before running checks · Issue #10567 · developing-today/code
X Title: pkgs/id(scripts): build-sh-test.sh ignores unaccounted CLI arguments before running checks · Issue #10567 · developing-today/code
Description: Evidence pkgs/id/scripts/build-sh-test.sh declares no command-line arguments but does not validate $# before performing work (mktemp/fixture setup, copying the real scripts/build.sh, creating stub cargo, and running multiple variant chec...
Open Graph Description: Evidence pkgs/id/scripts/build-sh-test.sh declares no command-line arguments but does not validate $# before performing work (mktemp/fixture setup, copying the real scripts/build.sh, creating stub ...
X Description: Evidence pkgs/id/scripts/build-sh-test.sh declares no command-line arguments but does not validate $# before performing work (mktemp/fixture setup, copying the real scripts/build.sh, creating stub ...
Opengraph URL: https://github.com/developing-today/code/issues/10567
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pkgs/id(scripts): build-sh-test.sh ignores unaccounted CLI arguments before running checks","articleBody":"## Evidence\n\n`pkgs/id/scripts/build-sh-test.sh` declares no command-line arguments but does not validate `$#` before performing work (`mktemp`/fixture setup, copying the real `scripts/build.sh`, creating stub `cargo`, and running multiple variant checks).\n\n- Script: `pkgs/id/scripts/build-sh-test.sh:1-136` (no argument parsing; work begins immediately at `script=...`, `tmp=\"$(mktemp -d)\"`, etc.)\n- Wired into checks: `pkgs/id/flake.nix:471-474` defines `build-sh-test` as `bash scripts/build-sh-test.sh`; referenced by `pkgs/id/scripts/just-recipes-check-test.sh:8`.\n- Repro (on current `main` checkout): `cd pkgs/id && bash scripts/build-sh-test.sh extraarg; echo $?` prints `build-sh tests passed` and exits `0` after running the full test sequence, instead of rejecting the extra argument.\n\n## Why it matters\n\nPer the operator-script argument contract in `AGENTS.md` / #3352, every operator script must declare its whole command line and parse strictly against that declaration before doing work; anything unaccounted for must be a usage error with a non-zero exit. Ignoring extra arguments lets a mistyped or stale invocation appear successful while silently discarding operator intent (and can mask misuse in CI/Nix check contexts).\n\n## Acceptance criteria\n\n- `pkgs/id/scripts/build-sh-test.sh` rejects any unaccounted CLI arguments (including extra positional args and options such as `--help` unless explicitly supported and documented) before creating temp fixtures or running checks, exiting non-zero with a clear usage/error message.\n- The documented contract (usage/header comment) states the accepted invocation (`scripts/build-sh-test.sh` with no arguments).\n- Existing valid invocations (including the `build-sh-test` flake check / CI usage) continue to pass.\n- Add/update a regression test covering rejection of unaccounted arguments before work.\n\n## Suggested fix shape\n\nAdd a strict preflight argument check near the top (before `mktemp`/fixture setup), e.g. fail on `[[ $# -ne 0 ]]` with usage to stderr and exit 2/1 per local convention; update header/usage comments accordingly and extend script/flake-check coverage if needed.","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-15T23:21:21Z","url":"https://github.com/developing-today/code/issues/10567"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1ab5d9a1-879f-c0d6-8811-9c085538eb73 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABDA:B0F20:2D801F:3D8485:6B061836 |
| html-safe-nonce | a5352e53e3284fd20ceae52356f5247db8028027adaf0990da50a5859aac9d40 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkRBOkIwRjIwOjJEODAxRjozRDg0ODU6NkIwNjE4MzYiLCJ2aXNpdG9yX2lkIjoiODI5Mzk2MzcwNzMyMzkxNDI5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e35fe1051179c6ced6c60e075f3003398c6f65986d0436f393a40708342a529a |
| hovercard-subject-tag | issue:6410889886 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/10567/issue_layout |
| twitter:image | https://opengraph.githubassets.com/db2c237e139226644f704d16476d78fccbaa3ae08b339ff05a09edfe7f92cd19/developing-today/code/issues/10567 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/db2c237e139226644f704d16476d78fccbaa3ae08b339ff05a09edfe7f92cd19/developing-today/code/issues/10567 |
| og:image:alt | Evidence pkgs/id/scripts/build-sh-test.sh declares no command-line arguments but does not validate $# before performing work (mktemp/fixture setup, copying the real scripts/build.sh, creating stub ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width