Repository navigation
✨ feat: sdk: run a Go extension from one value - #47
Conversation
0b40d25 to
ed1a812
Compare
2c1a796 to
6d416b2
Compare
|
2nd pass: this layer added the SDK's copy of four pieces of core, so it now shares them instead: by Opus-5.5 via Claude Code |
ed1a812 to
16f0350
Compare
4b5e3ab to
a9da72e
Compare
16f0350 to
34f3e5d
Compare
|
Review round 1 (Codex GPT-6.1-Sol, xhigh): 6 findings, all fixed in this layer. Each new case fails on the old code.
by Opus-5.5 via Claude Code |
a9da72e to
ae0d86f
Compare
34f3e5d to
2b06bdb
Compare
ae0d86f to
36efdda
Compare
2b06bdb to
beba624
Compare
36efdda to
e10ec5d
Compare
beba624 to
15d3e75
Compare
|
Review round 2 (Codex GPT-6.1-Sol, xhigh): the six round 1 fixes hold. It found 2 new medium findings, both fixed in this layer:
by Opus-5.5 via Claude Code |
e10ec5d to
a298133
Compare
2101caa to
a7134bb
Compare
a298133 to
2e3c4f5
Compare
|
Review round 3 (Codex GPT-6.1-Sol, xhigh; the last round): both round 2 fixes hold. It found one medium finding, fixed in this layer:
No further per-PR round: this was the third. by Opus-5.5 via Claude Code |
a7134bb to
feb109b
Compare
2e3c4f5 to
ce4e632
Compare
feb109b to
e790826
Compare
|
Cross-stack review, round 1 (Codex GPT-6.1-Sol, xhigh): one change dismissed. It reworded the comments of by Opus-5.5 via Claude Code |
e790826 to
da86277
Compare
|
Fixed RDOC1's P2 finding on the The bullet now says what each mode prints. In human mode, the handler writes its report to
The fix is docs only, so no scenario changed. #48 and #50 are restacked on it, and every layer passes by Opus-5.5 via Claude Code |
da86277 to
a3372ad
Compare
|
Fixed PRIS1's two findings in this layer's commit, now a3372ad. P2: data race on
P3: #48 and #50 are restacked on this commit, and every layer passes
by Opus-5.5 via Claude Code |
- Purpose: M02-T3 asks for sdk/extension, whose Main parses a call with the manifest, runs the handler of the command, and prints its answer by the kind of its result, and whose Check catches what Main would refuse and what breaks the catalog rules - Impact: a Go extension answers like a core command, with its own codes ordered as Output says and a report that needs a human on stdout with exit 78. On a signal, the SDK ends the handler's context, stops its programs, and keeps the handler's keys. The fixture hello proves it through ncly and run directly, and the test binary runs the scenarios of every extension folder Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
a3372ad to
0e653ba
Compare
ce4e632 to
776e4b8
Compare
Why
M02-T3 asks for
sdk/extension: one value that runs a Go extension, parses its call with its manifest, runs the handler of the command, and prints the answer by the kind of its result, so that it answers exactly like a core command.Scope
sdk/extension:Extension,Handler,Call,Main, andCheck, with the API of SDK.Mainrefuses a manifest or a handler that does not match and answersRUNTIME.Checkalso applies the catalog rulescontract.Registryreplaces the package-levelDecideandFinish:contract.Corefor core, andManifest.Registryfor an extension, whose own codes compete as Output orders themOutcome.HumanNeededmarks a report whose findings need a human, which answers on stdout with exit 78testdata/extensions/hello, withcmd/ncly-hello. The test binary runs it ashello-externalfrom a script in the data folder, and runs the scenarios of every extension folder.just lint,just fmt-check, andjust testname./testdata/extensions/...pseudostrips nested marks and accepts any word in the form of a code, because an extension's codes are an open setTradeoffs
The spec gave a handler 15 seconds. The runner sends SIGKILL to a stubborn program at 15 seconds, so the handler could not return its keys before the SDK gave up. The SDK now also waits for the 2-second drain limit, and the spec says so.
Verification
sdk_extension.txtar: throughncly, a success, a warning, a usage error,HELLO_GRUMPY, both reports, and a text result, as JSON, as text, and under the pseudo-locale. Run directly, the same answer, and after SIGTERM,TERMINATEDwith the handler's key, the program and its grandchild gone, then the SIGKILL path and the stubborn handlersdk/extensiontests:Checkrejects each fault that the card lists. The registry test orders own codessdk/contracttests: a failed item gives the batch verdict,RUNTIMEorTEMPORARY, unless a signal's code leads, and core's answer check accepts what the SDK renders for a failed batch beside an own code,CONFIG_INVALID,INTERRUPTED, orTERMINATEDjust checkpasses on Linux and on macOSChecklist
contract.mdnow says when a stubborn handler gets no more time and what the SDK's catalog holdssdk_extension.txtarfails withoutsdk/extensionoutcome.extension_brokenare catalog entriesjust checkpassesjust testnames the fixturejust signoffruns at the merge, as the Merge section of AGENTS.md saysby Opus-5.5 via Claude Code