Skip to content

Ten test files still assume the shipped state_dir path, and publish-dashboard.test.sh's GitHub stubs still name two configured repositories, so those config values cannot be changed without editing tests

Id: TD-PPagop-26090610 · Status: open · Filed: 2026-09-06

Filed alongside the change that made the Acceptance checks rule — no check may expect a particular value from config.json — true for the three files a configuration change actually broke (test/config-schema.test.sh, test/doctor.test.sh, test/render-crontab.test.sh) and for test/publish-dashboard.test.sh’s repository counts. Two coupling sites survive that rule.

  • state_dir. ~/.local/state/poetic-agents — the shipped value — is written out as a literal 113 times across ten test files (publish-dashboard 65, toggle 19, state-sync 10, review-claim 6, role 4, landing-audit-record 3, dashboard-exposure 2, watch-node 2, review-not-before 1, rotate-logs 1). Each of those suites builds a throwaway HOME and then reads the paths the script under test wrote beneath it, so changing state_dir in config.json would leave every one of them looking in the wrong directory — and the failures would say “expected 1, got 0”, not “state_dir moved”.
  • Two repository slugs in test/publish-dashboard.test.sh. Its GitHub stubs answer per-repository API paths for Poetic-Poems/poetic (the issues and findings fixtures) and Poetic-Poems/agent-ops (the tech-debt listing fixtures), and the matching assertions key on .github.inputs[<slug>]. Adding or removing a repository is now safe — every count is derived — but renaming either of those two still breaks the file. A guard at the head of that file fails with one clear line if either slug stops being configured, rather than as a scattering of missing-key failures 900 lines apart; the guard names this record.

The rule is only as good as its weakest file: an operator who moves state_dir — the one configuration change an installation on a different host is most likely to make — still meets a wall of test failures that say nothing about the cause. And the register is where a knowingly partial fix belongs, rather than only in the pull request that made it.

For state_dir: give each affected suite one state_dir_of <home> helper that resolves the path from the config the script under test will actually read (config_defaults, ~-expanded against that suite’s throwaway HOME), and route every literal through it. The helper is four lines; the work is the 113 substitutions and re-running each suite.

For the two slugs: have the stubs read the slug they answer for from an environment variable the test sets from config.json, the way DASHBOARD_GH_CMD is already parameterised, so the fixture names whichever repository the file configures rather than one written into a here-doc.

Migrated to https://github.com/Pullwright/agent-ops/issues/2018.