fix(discovery): explorer reads the skill body from disk on a preload miss and reports preload provenance - #4075
Conversation
…miss and reports preload provenance A dispatched discovery:explorer whose skills: preload failed silently had one instruction: set preload_token MISSING and stop. Nothing told it where the token lives or to Read the skill body from disk, and its payload had no field to say how the body reached it. The research and trace-intent lanes already carry that contract; the explore lane did not, so a preload miss on the explorer ran undisciplined and wrote an artifact shaped by the dispatch prompt instead of EXPLORE.md plus sidecars. agents/explorer.md now confirms the body is in context before any exploration work, Reads skills/explore/SKILL.md otherwise, and reports preload: fired | fallback; a token found by Reading is never reported as fired, and MISSING plus status: truncated remains the outcome when neither route delivered the body. skills/explore/SKILL.md demotes a matching token to file-identity, grades preload: in gate step 1, and treats a payload without the field as an out-of-date agent definition. reference/dispatch.md carries the rationale. contract.test.sh section 11 pins the explore lane beside the other two, and the explore evals gain the fallback-recovery case. discovery 0.19.9. Closes #4074 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 2m 46s —— View job Claude finished the code review
ReviewScope: this is the CODE-REVIEW lane; security review is scoped out ( I read all seven changed files ( No blocking findings. Specifically verified:
One pre-existing wrinkle I looked into but am not flagging: existing (unchanged) evals 8/9/10 in I was not able to execute |
|
Claude finished @kyle-sexton's task in 49s —— View job Security review — PR #4075
Result: no security issues found. All seven changed files are prompt/contract/documentation surface for the
There is no new code-execution path, no injection surface (command/SQL/path/template), no GitHub Actions hardening is out of scope for this lane (zizmor's advisory lane); this PR does not |
|
Last security-reviewed head: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5279a9f312
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```yaml | ||
| preload_token: <echoed verbatim from the preloaded skill, or MISSING> | ||
| preload_token: <echoed verbatim from the skill file, or MISSING> | ||
| preload: fired # fired | fallback — how the skill body reached you; never inferred from the token |
There was a problem hiding this comment.
Set preload provenance in early payloads
When a fallback run is interrupted after following the early-emission instructions at lines 237–242, that checklist tells it to set preload_token but omits preload:; copying this template can therefore leave the default fired value in place, while omitting it makes the newly strengthened gate reject the payload as out-of-date. This defeats the early payload's purpose and can report false provenance precisely on the preload-miss path, so require preload: to be set in the early-emission checklist as the researcher and intent-tracer definitions do.
Useful? React with 👍 / 👎.
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Closes #4074
Summary
A dispatched
discovery:explorerwhoseskills:preload silently failed had one instruction: setpreload_token: MISSINGand stop. Nothing told it where the token lives or to read the skill body from disk, and its payload had no way to say how the body reached it. The research and trace-intent lanes already carry that contract; the explore lane did not, so a preload miss on the explorer produced an undisciplined run that wrote an artifact shaped like the dispatch prompt's description of the deliverable instead ofEXPLORE.mdplus sidecars.Fix
agents/explorer.md: before any exploration work the agent confirms the skill body is in context and otherwise Reads${CLAUDE_PLUGIN_ROOT}/skills/explore/SKILL.md; the scope, slice path, and reason still come only from the dispatch prompt. The payload gainspreload: fired | fallback, a matching token is file-identity rather than preload proof, and a token found by Reading is never reported asfired.MISSINGplusstatus: truncatedremains the outcome when neither route delivered the body.skills/explore/SKILL.md: the sentinel paragraph says the disk fallback Reads the same file; the hard-failure paragraph namespreload: fired | fallbackas provenance withfallbackthe accepted recovery; gate step 1 requires the field, treats a missing or unrecognized value as an out-of-date agent definition, and does not read a matching token as proof that preload fired.skills/explore/reference/dispatch.md: new "Discipline liveness — why a token at all" section, ported from the research lane's dispatch contract with explore nouns; the parent MUST NOT inferfiredfrom the token.skills/explore/evals/evals.json: eval 13,matching-token-is-file-identity-not-preload-proof, apreload: fallbackrun the parent accepts.scripts/contract.test.shsection 11: nine explorer-lane assertions beside the research and trace-intent blocks (token absent from the agent definition, disk fallback named,preload: firedin the payload, the never-report-a-Read-token-as-fired rule, the skill's file-identity and structured-field statements, the gate's out-of-date classification, the dispatch reference's MUST NOT infer, and the eval).No script behavior changes;
check-dispatch-artifact.shgrades the disk and is untouched. The parent envelope inreference/parent-contract.mdis unchanged.Verification
contract.test.shassertions failed against the unchanged files (eight FAIL lines, the token-absence check passing as expected) and pass after the edits; every pre-existing assertion passed throughout.bash plugins/discovery/scripts/contract.test.sh: all contract assertions passed.bash plugins/discovery/agents/tool-honesty.test.sh: all tests passed.scripts/affected-tests.sh --explainselects six suites for the seven files (the other 228 in its listing are the documented hub over-selection throughdispatch.md,evals.json, andchanged-files.sh);--runis a Linux gate per the script header, so the six ran by hand on this Windows host:plugins/discovery/scripts/contract.test.sh,plugins/discovery/agents/tool-honesty.test.sh,plugins/discovery/scripts/check-dispatch-artifact.test.sh, andscripts/check-changed-skills.test.sh(PASS=19) all pass;scripts/check-stale-base-overlap.test.sh(3) andscripts/lib/changed-files.test.sh(1) fail on this host only, the first because the machine's git config forces GPG signing inside the suite's throwaway repo and the second on the CRLF pathname case the header lists, neither in a file this PR touches. CI's Linux lanes are the gate of record.bash scripts/check-changed-skills.sh origin/main: explore PASS, 0 errors; the warnings are the pre-existing line-count and judgment-language advisories.jqparses the evals file; 13 cases, the new one last.review:code-reviewerpass over all seven files against the research and trace-intent lanes: no contradictions, no scope-leak reading of the fallback, every new assertion confirmed to fail on the pre-change files, no rule violations in the bodies, changelog factual. Two advisory notes, both left as is: the intro paragraph carries no dedicated test pin (scene-setting; the operative sentences are pinned), and eval 13's open-questions expectation is the same extrapolation research eval 19 makes.agents/explorer.mdthe Read instruction sits in "Preload liveness — the first thing you do" (line 84), above every exploration section, and the intro paragraph points there first.Related
20260909-124500-discovery-explorer-preload-miss-and-artifact-shape(local queue, not in this repository).agents/researcher.md,agents/intent-tracer.md,skills/research/SKILL.md,skills/research/context/dispatch.md.preload: fallbackruns to the operator as a signal that preload is failing on the machine. No lane does today.🤖 Generated with Claude Code