Harness files still name a product's host env file and drive-issue number #43

Closed
opened 2026-08-24 00:14:14 +00:00 by matou-build-agent · 2 comments

Follow-up from #37 (the host env split), naming two places where a harness
file still carries a product-shaped host fact. Neither is created by #37 —
both predate it — but #37 moved the ground under the first one.

1. rehearsal-report.sh names a product's host env file in a live message

rehearsal-report.sh:135 (and its vendored copy) posts, on a Claude auth
refusal:

Token source is the workstation's rehearsal-env.sh (token-sync from the org
secret CLAUDE_CODE_OAUTH_TOKEN[_B])

Since #37 the shared tokens live in the host's factory-owned env file, the
one the registry's env directive names (~/swarm/host-env.sh on
matou-workstation); rehearsal-env.sh is now only a compatibility symlink
kept for Matou/idss's token-sync.yml writer. So the message points an
operator at a name that is about to stop existing, and — CLAUDE.md's
blast-radius rule — a vendored harness file should not name any product's host
path at all. The honest fix is to name the mechanism (the host's env file,
per the registry) rather than a filename, or to source the path from the
host-capacity env's HOST_ENV_FILE if the message really needs one.

2. session-runner.sh defaults REHEARSAL_DRIVE_ISSUE to a product's issue number

session-runner.sh:61 — : "${REHEARSAL_DRIVE_ISSUE:=492}" — is a literal
issue number from one product's tracker baked into the vendored harness, used
at line 162 to filter this repo's ready-for-session queue
(select(.number != $drive)). Issue numbers are per-repo (the #35/#36 defect
family), so the default silently filters issue 492 out of every consumer's
queue. list-ready-tasks.sh already gets this right: it defaults the same
variable to EMPTY and documents it as an optional backstop. Suggested fix:
default it empty here too (skip the filter when unset), and let a repo that
runs a standing drive declare the number in its own layer.

Both are two-way doors, and both touch vendored files — so they land here and
reach consumers at their next pin bump.

Follow-up from #37 (the host env split), naming two places where a **harness** file still carries a product-shaped host fact. Neither is created by #37 — both predate it — but #37 moved the ground under the first one. ## 1. `rehearsal-report.sh` names a product's host env file in a live message `rehearsal-report.sh:135` (and its vendored copy) posts, on a Claude auth refusal: > Token source is the workstation's rehearsal-env.sh (token-sync from the org > secret CLAUDE_CODE_OAUTH_TOKEN[_B]) Since #37 the shared tokens live in the host's **factory-owned** env file, the one the registry's `env` directive names (`~/swarm/host-env.sh` on `matou-workstation`); `rehearsal-env.sh` is now only a compatibility symlink kept for `Matou/idss`'s `token-sync.yml` writer. So the message points an operator at a name that is about to stop existing, and — CLAUDE.md's blast-radius rule — a vendored harness file should not name any product's host path at all. The honest fix is to name the *mechanism* (the host's env file, per the registry) rather than a filename, or to source the path from the host-capacity env's `HOST_ENV_FILE` if the message really needs one. ## 2. `session-runner.sh` defaults `REHEARSAL_DRIVE_ISSUE` to a product's issue number `session-runner.sh:61` — `: "${REHEARSAL_DRIVE_ISSUE:=492}"` — is a literal issue number from one product's tracker baked into the vendored harness, used at line 162 to filter *this* repo's `ready-for-session` queue (`select(.number != $drive)`). Issue numbers are per-repo (the #35/#36 defect family), so the default silently filters issue 492 out of **every** consumer's queue. `list-ready-tasks.sh` already gets this right: it defaults the same variable to EMPTY and documents it as an optional backstop. Suggested fix: default it empty here too (skip the filter when unset), and let a repo that runs a standing drive declare the number in its own layer. Both are two-way doors, and both touch vendored files — so they land here and reach consumers at their next pin bump.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=359
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=359 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #43 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 43,
  "status": "success",
  "commits": [
    "4fbf7f219ee996c556eff0c464ea9ebf0564bdb9"
  ],
  "changed_files": [
    "STATUS.md",
    "rehearsal-report.sh",
    "session-runner.sh",
    "tests/rehearsal-report-test.sh",
    "tests/session-runner-test.sh"
  ],
  "tests": [
    {
      "command": "bash tests/session-runner-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/rehearsal-report-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "rehearsal-report.sh no longer names a product's host env file in the auth-refusal message": "rehearsal-report.sh:135 now emits ${HOST_ENV_FILE:-the host's env file (per the host registry's env directive)} instead of 'the workstation's rehearsal-env.sh' — names the mechanism (HOST_ENV_FILE, emitted from the host registry's env directive per onboarding/host-state-lib.sh:409) or the factory-owned path when set, never the product filename",
    "session-runner.sh no longer defaults REHEARSAL_DRIVE_ISSUE to a product's issue number": "session-runner.sh:67 changed ': \"${REHEARSAL_DRIVE_ISSUE:=492}\"' to ': \"${REHEARSAL_DRIVE_ISSUE:=}\"' with a comment explaining per-repo issue numbers; the queue filter now uses --arg drive + select((.number|tostring) != $drive), a no-op when unset, mirroring list-ready-tasks.sh",
    "the empty default filters nothing / a declared number filters only that repo's drive": "tests/session-runner-test.sh case 14: with the var unset an issue numbered 492 is picked; with REHEARSAL_DRIVE_ISSUE=492 the same issue is filtered and nothing is workable",
    "auth-refusal wording ratcheted": "tests/rehearsal-report-test.sh case 31 asserts the alert does NOT name rehearsal-env.sh and DOES name 'host registry'; case 31b asserts a set HOST_ENV_FILE surfaces that path",
    "both are vendored harness files landing here for consumers at next pin bump": "both edited files are root harness files (not .sandcastle/); commit 4fbf7f2 on origin/main",
    "STATUS.md updated in the same commit": "header stamp -> 2026-08-24 with #43 lead, Host state row note, milestone log entry — all in commit 4fbf7f2"
  },
  "summary": "Defaulted session-runner's REHEARSAL_DRIVE_ISSUE empty and renamed rehearsal-report's auth-refusal alert to the host env mechanism, removing two product host-facts from vendored harness files.",
  "blockers": []
}
**close-report** for #43 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 43, "status": "success", "commits": [ "4fbf7f219ee996c556eff0c464ea9ebf0564bdb9" ], "changed_files": [ "STATUS.md", "rehearsal-report.sh", "session-runner.sh", "tests/rehearsal-report-test.sh", "tests/session-runner-test.sh" ], "tests": [ { "command": "bash tests/session-runner-test.sh", "exit_code": 0 }, { "command": "bash tests/rehearsal-report-test.sh", "exit_code": 0 } ], "criteria": { "rehearsal-report.sh no longer names a product's host env file in the auth-refusal message": "rehearsal-report.sh:135 now emits ${HOST_ENV_FILE:-the host's env file (per the host registry's env directive)} instead of 'the workstation's rehearsal-env.sh' — names the mechanism (HOST_ENV_FILE, emitted from the host registry's env directive per onboarding/host-state-lib.sh:409) or the factory-owned path when set, never the product filename", "session-runner.sh no longer defaults REHEARSAL_DRIVE_ISSUE to a product's issue number": "session-runner.sh:67 changed ': \"${REHEARSAL_DRIVE_ISSUE:=492}\"' to ': \"${REHEARSAL_DRIVE_ISSUE:=}\"' with a comment explaining per-repo issue numbers; the queue filter now uses --arg drive + select((.number|tostring) != $drive), a no-op when unset, mirroring list-ready-tasks.sh", "the empty default filters nothing / a declared number filters only that repo's drive": "tests/session-runner-test.sh case 14: with the var unset an issue numbered 492 is picked; with REHEARSAL_DRIVE_ISSUE=492 the same issue is filtered and nothing is workable", "auth-refusal wording ratcheted": "tests/rehearsal-report-test.sh case 31 asserts the alert does NOT name rehearsal-env.sh and DOES name 'host registry'; case 31b asserts a set HOST_ENV_FILE surfaces that path", "both are vendored harness files landing here for consumers at next pin bump": "both edited files are root harness files (not .sandcastle/); commit 4fbf7f2 on origin/main", "STATUS.md updated in the same commit": "header stamp -> 2026-08-24 with #43 lead, Host state row note, milestone log entry — all in commit 4fbf7f2" }, "summary": "Defaulted session-runner's REHEARSAL_DRIVE_ISSUE empty and renamed rehearsal-report's auth-refusal alert to the host env mechanism, removing two product host-facts from vendored harness files.", "blockers": [] } ``` </details>
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#43
No description provided.