The action hook resolves project/type when its callers have none, so arrange stops refusing hand-started seats (#1137) - #1192
Merged
fujibee merged 2 commits intoSep 14, 2026
Conversation
…ave none (#1137) send.sh/inbox.sh/history.sh call agmsg_self_name_on_action with only <team> <agent> -- they never had a project or type to pass, not merely forgot to. The hook forwarded that straight through to the placement-record writer, so a record written by acting (the #1109 path, the one that exists for hand-started seats) carried two empty fields. arrange.sh requires both and refuses such a record outright; measured live, 12 of 36 placement records on one machine were stuck this way. Resolve project/type inside the hook itself, the same way whoami.sh already answers the identical question (agmsg_detect_cli_type, agmsg_resolve_project), instead of threading two new arguments through three callers that have no better source for them than this process's own cwd and type anyway. Only when the caller did not already supply them, and only right before the slow-half write -- the common fast-path short-circuit is untouched. Best-effort, matching every other lazy source in this function: a resolution failure leaves the field empty exactly as before, never blocks the naming this hook exists to do. tests/test_self_name.bats gains the failing-side control: a hand-started seat's action-hook record now carries non-empty project/type (verified red against a revert of this fix), and a caller that already supplies both is never second-guessed.
…aseline The four new lazy-source lines added for #1137 read \$SKILL_DIR unguarded, tripping check-unguarded-env-reads.sh from 89 to 93 (the file's own \${SKILL_DIR:=...} default-assignment at sourcing time guarantees it in practice, but the checker's assignment detection does not recognize that form). Give each read the same default the checker itself suggests; SKILL_DIR is never actually empty here, so this changes nothing at runtime. Diff method per tonight's standard: baseline forced to 0 on both base (026d10f) and this head, offender lists diffed -- exactly the four new lines, nothing else moved.
fujibee
merged commit Sep 14, 2026
3df9059
into
integration/terminal-driver-v1
26 of 27 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1137.
send.sh/inbox.sh/history.shcallagmsg_self_name_on_actionwith only<team> <agent>— they never had a project or type to pass, not merely forgot to (verified: neither variable exists anywhere in any of the three files). The hook forwarded that straight through to the placement-record writer, so a record written by acting — the #1109 path, the one that exists for hand-started seats — carried two empty fields.arrange.shrequires both and refuses such a record outright with "missing project or type"; the issue measured 12 of 36 placement records stuck this way on one live machine, including seats in daily use.Coordination note
scripts/lib/self-name.sh(the action-hook path this fixes) is the exact layer #1152/#1157 (feat/1152-self-write, still open) plans to remove and replace. Cross-checked with the #1157 author before starting: their new writer (agmsg_self_write) already requires project/type as non-optional and has its own test for that; this fix is scoped to the current, still-live path only, and does not touch anything #1157 changes (no file overlap — confirmed by running the full affected suites, listed below). They're droppingCloses #1137from #1157's body so the two don't race to close the same issue.Fix
Resolve project/type inside
agmsg_self_name_on_actionitself, the same waywhoami.shalready answers the identical question (agmsg_detect_cli_type,agmsg_resolve_project), instead of threading two new arguments through three callers that have no better source for them than this process's own cwd and type anyway. Only when the caller did not already supply them, and only right before the slow-half write — the common fast-path short-circuit (the cheap case this hook is designed around) is untouched. Best-effort, matching every other lazysourcein this function: a resolution failure leaves the field empty exactly as before, never blocks the naming this hook exists to do.Verification
tests/test_self_name.batsgains the failing-side control the day's standard calls for: a hand-started seat's action-hook record now carries non-empty project/type — verified red by reverting the fix and re-running (projectempty, assertion fails) — and a caller that already supplies both explicitly is never second-guessed (its exact values pass through unchanged).test_self_name.bats25/25,test_dispatch.bats15/15,test_delivery.bats198/198,test_terminal_registry.bats166/166 — all clean.check-enforced-assertions.sh: 626/626, baseline unchanged.bash -n scripts/lib/self-name.sh: OK.Base:
integration/terminal-driver-v1tip at branch time (026d10f4).