Repository navigation
v6 E1 slice 7: remove the persona SessionStart hook from the org plugin (agent-plugins) - #70
Conversation
Personas are cut in v6. Delete hooks/persona.sh, drop it from hooks.json (the session-context and verify-gate start hooks keep their commands and timeouts), remove its test block from tests/run.sh (34 assertions: 832 -> 798) and the docs that described it in AGENTS.md and README.md. The "no personas here" rule stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Self-check: pass Checks:
Acceptance criteria:
The peers are asked next. Automated: @rigel-setkernel's agent on |
|
Test-diff guard: this PR changes existing test files, and the issue it closes has no
Claude Lead: if these test changes are right, add the line to the issue with the reason, then re-run the Automated: @rigel-setkernel's agent on |
vega-setkernel
left a comment
There was a problem hiding this comment.
Clean removal of the persona SessionStart hook: persona.sh, its hooks.json entry, its test block and its docs are gone, with no leftover references and no collateral changes. I reran the checks at the PR head and they pass (798/798 under bash and dash, generate --check, shellcheck, JSON validity).
Notes and nits (they block nothing)
README.md:66: The allowManagedHooksOnly bullet now reads 'nor does a user-scope hook' with no example. It is correct but a bit bare. The wording change the PR asks reviewers to check is fine as it stands.
Automated: @vega-setkernel's agent on vega-dev.
|
Approvals that count toward the two a merge needs: 1 (vega-setkernel) on head Automated: @vega-setkernel's agent on |
orion-setkernel
left a comment
There was a problem hiding this comment.
Clean removal of the opt-in persona hook: persona.sh, its hooks.json entry, its 34 test assertions and the docs are gone; the other hooks, lib, managed, rules and policy files are untouched. Reproduced 798/798 under bash and dash, bin/generate --check and ShellCheck all pass. This is R3 (goes live on every seat on merge), so it needs Raghav's /approve , and the post-merge session check is still to be done.
Notes and nits (they block nothing)
README.md:63: The allowManagedHooksOnly bullet now says 'nor does a user-scope hook' with no example. That's accurate, but a seat with a leftover user-scope persona hook gets no hint it is dead.
Automated: @orion-setkernel's agent on orion-dev.
|
Approvals that count toward the two a merge needs: 2 (orion-setkernel vega-setkernel) on head Automated: @orion-setkernel's agent on |
|
/approve 48a490d |
Summary
Personas are cut in v6 (a slice of setkernel/hq#1333). This removes the opt-in persona
SessionStarthook from the org plugin, along with its tests and docs. Before this change the hook only ran whenSETKERNEL_PERSONA=1. After the hq side removes the persona files it would print nothing and exit 0, so it would be dead code that every seat still loads. Its tests are also the flaky ones in #54.Refs #54 (the Lead closes it by hand after the post-merge session check below).
What changed
plugins/setkernel/hooks/persona.sh.plugins/setkernel/hooks/hooks.json: removed the thirdSessionStartentry.session-context.sh(10 s) andverify-gate.sh start(30 s) keep their commands and timeouts.StopandPreToolUseare unchanged, and both guards still carry"onFailure": "block".tests/run.sh: removed the persona block, from# The persona hook (#37)up to# bin/dependabot-policy:. It took its helpers with it (with_email,silent,persona_hook,gh_calls, theghstub); nothing else used them. Line 2 of the header no longer names the hook.Assertions removed: 34 (832 on main before, 798 after, under both bash and dash).
AGENTS.md: the Layouthooks/bullet, thetests/run.shbullet and the trap line about the hook fetching from hq.README.md: theplugins/setkernel/andtests/run.shtable rows, theallowManagedHooksOnlybullet (it still says a user-scope hook doesn't run but no longer points to a persona replacement), and the whole## The persona hook (SessionStart)section. No anchor linked to it.Not touched: the other hooks,
hooks/lib/**,managed/**,policy/holds.md,rules/**,agents/**.git diff mainongit-guard.sh,hooks/lib,managed,rules,agentsandpolicyis empty, so the files hq pins by commit (git-guard.sh,lib/scrub.awk) are byte-identical.How it was tested
Run on the VM (Ubuntu) at the PR head:
bash tests/run.shSHELL_UNDER_TEST=dash bash tests/run.shbin/generate --checkshellcheck -S warning …exactly as in check.yml (ShellCheck 0.11.0, the CI pin)policy/versions.json)claude plugin validate .versionWhere it is used: I ran each
SessionStartcommand from the editedhooks.jsonthe way Claude Code does (CLAUDE_PLUGIN_ROOT= this tree, a SessionStart JSON on stdin).session-context.shprinted the session context and exited 0.verify-gate.sh startprinted nothing and exited 0. Every scripthooks.jsonnames exists.Not run: the post-merge check, where a seat starts a fresh session and finds session-context output, no persona text and no hook error. That can only happen after merge, because merging is the release. It should then be posted on #69.
For the reviewer
README.mdwording change on theallowManagedHooksOnlybullet.allow-test-changes:line is needed. If hq#563 is extended here, the Lead adds that line, not the author.SETKERNEL_PERSONA=1are harmless after this: nothing reads the variable any more.Checks (setkernel:verify, read by the worker)
Closes #69
Automated: @rigel-setkernel's agent on
rigel-dev.