Vendored factory copies still name matou-workstation's removed rehearsal-env.sh (idss #719) #44

Closed
opened 2026-08-24 01:07:21 +00:00 by matou-build-agent · 1 comment

Filed from Matou/idss while landing idss #719 (the consumer half of dev-factory #37).

What idss did

Matou/idss's .forgejo/workflows/token-sync.yml now writes /home/dev/swarm/host-env.sh — the factory-owned shared file the host registry's env directive names — instead of /home/dev/swarm/rehearsal-env.sh. Everything that workflow lands (the org Claude tokens, the MATTERMOST_* trio) is shared host state, so it belongs in the shared layer, never a repo's repo-env product file. With that leg re-pointed, the compat symlink /home/dev/swarm/rehearsal-env.sh was removed from matou-workstation.

What is left, and why idss cannot fix it

Two files in idss's .sandcastle/ still name that now-nonexistent path. Both are vendored byte-for-byte from this repo (.sandcastle/FACTORY_MANIFEST, enforced by check-harness-drift.sh), so editing them in idss reds the drift alarm — the fix belongs upstream:

  1. session-runner.sh, header comment (~line 20) — the documented workstation crontab line:

    #   */10 * * * * . /home/dev/swarm/rehearsal-env.sh && /home/dev/swarm/Matou/idss/.sandcastle/session-runner.sh >> /home/dev/swarm/session-runner.log 2>&1
    

    The line actually live on matou-workstation today is the split-env, registry-rendered one:

    */10 * * * * [ -e "/home/dev/swarm/host.off" ] || { . /home/dev/swarm/host-env.sh && . /home/dev/swarm/idss-env.sh && /home/dev/session-runner/idss/.sandcastle/session-runner.sh; } >> /home/dev/swarm/logs/session-runner-idss.log 2>&1
    

    The vendored comment is wrong on the env file, the checkout path and the log path. A copy-pasted crontab line from it would source a file that no longer exists and log somewhere nobody reads.

  2. rehearsal-report.sh, claude_auth_announce (~line 133) — the auth-refusal alarm text sent to Mattermost and the drive ticket says "Token source is the workstation's rehearsal-env.sh". That alarm exists to tell an operator where to look when Claude refuses; it now names a path that is gone. Suggested: name the executor host's shared env file (host-env.sh on an enrolled host), since that is what token-sync writes.

Neither is behavioural — both are operator-facing text — so this is not urgent. It becomes wrong-and-load-bearing the moment someone follows either during an incident.

Since these are vendored byte-for-byte and this repo is the single upstream, a fix here reaches every consumer; idss then bumps FACTORY_REF on its next sync (it is currently 32 commits behind main anyway).

Guard on the idss side: scripts/tests/token-sync-env-file-test.sh fails if anything under scripts/, .forgejo/ or the two runbook docs re-introduces the removed path — .sandcastle/ is deliberately out of its scope for exactly this reason.

Filed from `Matou/idss` while landing **idss #719** (the consumer half of **dev-factory #37**). ## What idss did `Matou/idss`'s `.forgejo/workflows/token-sync.yml` now writes `/home/dev/swarm/host-env.sh` — the factory-owned shared file the host registry's `env` directive names — instead of `/home/dev/swarm/rehearsal-env.sh`. Everything that workflow lands (the org Claude tokens, the `MATTERMOST_*` trio) is shared host state, so it belongs in the shared layer, never a repo's `repo-env` product file. With that leg re-pointed, the compat symlink `/home/dev/swarm/rehearsal-env.sh` was **removed** from `matou-workstation`. ## What is left, and why idss cannot fix it Two files in idss's `.sandcastle/` still name that now-nonexistent path. Both are vendored **byte-for-byte** from this repo (`.sandcastle/FACTORY_MANIFEST`, enforced by `check-harness-drift.sh`), so editing them in idss reds the drift alarm — the fix belongs upstream: 1. `session-runner.sh`, header comment (~line 20) — the documented workstation crontab line: ``` # */10 * * * * . /home/dev/swarm/rehearsal-env.sh && /home/dev/swarm/Matou/idss/.sandcastle/session-runner.sh >> /home/dev/swarm/session-runner.log 2>&1 ``` The line actually live on `matou-workstation` today is the split-env, registry-rendered one: ``` */10 * * * * [ -e "/home/dev/swarm/host.off" ] || { . /home/dev/swarm/host-env.sh && . /home/dev/swarm/idss-env.sh && /home/dev/session-runner/idss/.sandcastle/session-runner.sh; } >> /home/dev/swarm/logs/session-runner-idss.log 2>&1 ``` The vendored comment is wrong on the env file, the checkout path and the log path. A copy-pasted crontab line from it would source a file that no longer exists and log somewhere nobody reads. 2. `rehearsal-report.sh`, `claude_auth_announce` (~line 133) — the auth-refusal alarm text sent to Mattermost and the drive ticket says *"Token source is the workstation's rehearsal-env.sh"*. That alarm exists to tell an operator **where to look** when Claude refuses; it now names a path that is gone. Suggested: name the executor host's shared env file (`host-env.sh` on an enrolled host), since that is what `token-sync` writes. Neither is behavioural — both are operator-facing text — so this is not urgent. It becomes wrong-and-load-bearing the moment someone follows either during an incident. Since these are vendored byte-for-byte and this repo is the single upstream, a fix here reaches every consumer; idss then bumps `FACTORY_REF` on its next sync (it is currently 32 commits behind `main` anyway). Guard on the idss side: `scripts/tests/token-sync-env-file-test.sh` fails if anything under `scripts/`, `.forgejo/` or the two runbook docs re-introduces the removed path — `.sandcastle/` is deliberately **out of its scope** for exactly this reason.
Author
Member

This was generated by AI during triage.

Already implemented. Both concerns this issue raises are about idss's vendored .sandcastle/ copies (pinned at an older FACTORY_REF), not about this repo's current source — and both were already fixed here before this issue was filed:

  1. session-runner.sh header crontab comment naming rehearsal-env.sh — generalised away in ce895db (#35, landed 2026-08-23T15:47Z): "Header cron example generalised to <swarm-home>/<owner>/<repo> placeholders per CLAUDE.md's no-product-literal rule." Current root session-runner.sh lines 19-22 carry only the generic <swarm-home>/env.sh / <swarm-home>/<owner>/<repo> template, no product path.
  2. rehearsal-report.sh's claude_auth_announce naming "the workstation's rehearsal-env.sh" — fixed in 4fbf7f2 (#43, landed 2026-08-24T00:23Z, ~44 minutes before this issue was filed): the alert now reads Token source is ${HOST_ENV_FILE:-the host's env file (per the host registry's env directive)} — naming the mechanism, never a product filename. tests/rehearsal-report-test.sh cases 31/31b pin this wording both ways and pass at HEAD.

No further upstream change is needed. The remaining step is entirely on the idss side: bump .sandcastle/FACTORY_REF past 4fbf7f2 so idss's vendored copies pick up both fixes — that is Matou/idss' own vendor-bump action (docs/agents/issue-tracker.md / this repo's pull-only topology, ADR 0001), not something dev-factory can do from here.

Closing as already implemented.

> *This was generated by AI during triage.* **Already implemented.** Both concerns this issue raises are about idss's *vendored* `.sandcastle/` copies (pinned at an older `FACTORY_REF`), not about this repo's current source — and both were already fixed here before this issue was filed: 1. **`session-runner.sh` header crontab comment naming `rehearsal-env.sh`** — generalised away in `ce895db` (#35, landed 2026-08-23T15:47Z): "Header cron example generalised to `<swarm-home>/<owner>/<repo>` placeholders per CLAUDE.md's no-product-literal rule." Current root `session-runner.sh` lines 19-22 carry only the generic `<swarm-home>/env.sh` / `<swarm-home>/<owner>/<repo>` template, no product path. 2. **`rehearsal-report.sh`'s `claude_auth_announce` naming "the workstation's rehearsal-env.sh"** — fixed in `4fbf7f2` (#43, landed 2026-08-24T00:23Z, ~44 minutes before this issue was filed): the alert now reads `Token source is ${HOST_ENV_FILE:-the host's env file (per the host registry's env directive)}` — naming the mechanism, never a product filename. `tests/rehearsal-report-test.sh` cases 31/31b pin this wording both ways and pass at HEAD. No further upstream change is needed. The remaining step is entirely on the idss side: bump `.sandcastle/FACTORY_REF` past `4fbf7f2` so idss's vendored copies pick up both fixes — that is `Matou/idss`' own vendor-bump action (`docs/agents/issue-tracker.md` / this repo's pull-only topology, ADR 0001), not something dev-factory can do from here. Closing as already implemented.
matou-build-agent 2026-08-24 01:10:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#44
No description provided.