Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
status: draft item: L-260919-9965d0
Judgment family — implementation plan
The design is design.md beside this file. This plan builds it from the bottom up, and each phase must prove itself before the next one starts: a spike that calls the real API, then the cogt family with live tests, then the operator. The first two phases depend on nothing the design leaves open; the third does, and its gate says so.
Conventions for every phase. Tests are written before the code they cover. make agent-check runs after every code change, with changes staged first so the drift digest sees them, and make agent-test closes the phase. A phase's branch gets a /rev pass before its pull request opens, and the pull request targets dev. Each phase after the first has its own worktree, made with wt add --for <item> and claimed from inside.
A trap already met. TYPESAFE_API_KEY lives in the gitignored .env, which wt add copies into a worktree when it is made. wt provision does not overwrite a .env that already exists, so a worktree made before a key was added to the main checkout's .env needs the file copied by hand. Check with grep -c '^TYPESAFE_API_KEY=' .env before concluding that the API refuses the key.
Phase 1 — Spike the async API
Item: L-260919-3aeab8, "Spike TypeSafe's async API and record what the judgment worker can rely on". Worktree: the epic's own, _pipelex--judgment-family, which also carries the campaign documents.
Everything the design says about the backend was read from its documentation. The spike replaces reading with observation, and its output is a findings note that phase 2 codes against. It is throwaway code: no pipelex imports, no abstractions, no tests.
- Write
wip/judgment-family/spike/typesafe_async_spike.py— and, for the questions its first run raised,typesafe_followups_spike.pybeside it — run withuv run --no-project --with typesafe-sdk --env-file .env python wip/judgment-family/spike/typesafe_async_spike.py, so the dependency does not enterpyproject.tomlwhile the question is still open. The script prints each finding and saves every raw response as JSON underwip/judgment-family/spike/responses/, with the key and any request header stripped; phase 2's unit tests replay these files. - Shapes. One request with a yes/no, a choice and a rating question over one named-object state, through
AsyncTypeSafeClient.system_one. Record the exact answer fields and their types, in particular the key types ofprobabilitiesfor a rating (the SDK reference says integers, the HTTP examples show strings), whetherlegendis always present, and whether the response names a versioned model id when the request names an alias. - Usage. Whether
input_tokensandoutput_tokensare always reported, and whether they are per request or per question. The cost report depends on it. - State value types. The documentation says state holds text. Send a state containing a JSON number, a boolean, a nested object and an array, and record what is accepted and what changes the answers. The design maps a
Numberinput to a JSON number and aYesNoto a boolean; if the API rejects or ignores them, the kernel's state builder renders them as text instead, and the design is corrected. - Criteria edge cases. An option with a null description, a yes/no question with and without criteria, the smallest legal option set and scale, and one request beyond the documented limits to see the refusal.
- Model pinning. That the versioned id from the models page is accepted as
model, since the deck will point at it and never at an alias. - Errors. A wrong key, a malformed question, an oversized state, and a very short timeout. Record the exception class, the status, the body and whether a
request_idis present for each — this is what the worker's error classification is written from. - Retries. What the SDK retries by default, and that passing an explicit
RetryPolicycan turn it off, so retry behaviour can be a Pipelex decision. - Concurrency. A batch of requests through
asyncio.gatheron one client: that one client is safe to share (the worker caches it in theSdkClientRegistry), the latency of one request, and the latency and token count of several questions in one request against the same questions sent separately. - Stability. The same request repeated several times: how much the probabilities move. This sets how wide the margins in the live tests must be.
- The same call without the SDK. One request with the
httpxalready in the core, to measure what the SDK actually buys. - The dependency in this repo. On the branch,
uv add --optional typesafe typesafe-sdk, thenmake agent-checkandmake agent-test. Record what the lock moved (the SDK's pydantic floor is above the core's), whetherhttpx2coexists withhttpx, and whethermypyorpyrightchanged their reading of any unrelated import, which a new typed dependency has done in this repo before. Keep the change if the verdict is to use the SDK, and revert it otherwise. - Write
wip/judgment-family/spike-findings.md: one section per question above with what was observed, then the verdict.
Checkpoint 1 — reached
The full record is spike-findings.md beside this file; what the rest of the campaign has to obey is here.
Go. The API does what the design needs: the three question types map cleanly onto the three verdict shapes, every answer carries its uncertainty, one client served forty concurrent requests without a failure, and the model is stable enough to assert against live.
The SDK, behind a typesafe optional extra, which closes the design's open question on the vendor dependency. It supplies typed exception classes carrying status, body, endpoint and request_id — the whole input to the worker's error classification — and coerces a rating answer's string keys to integers; a bare httpx worker would rebuild both. uv add --optional typesafe "typesafe-sdk>=0.7.0" added five packages and moved nothing else in the lock, and make agent-check and make agent-test both passed in full, so the specific fear the phase opened with — a new typed dependency changing mypy or pyright on an unrelated import — did not materialise.
Where the observed API differed from the design, all corrected in design.md in this same change:
- Every validation failure returns
400, not the documented422, and one status covers an illegal question, an unknown model and an oversized state. The error body has two shapes, a bare-stringdetailand an objectdetailcarryingerror_type, and the worker must branch onerror_typewhere it is present. This is the correction that most changes phase 2's work. - The SDK raises a bare
TypeSafeError, with no status and no request id, for what it validates before sending. That is a second failure class, and a Pipelex defect rather than a vendor failure. - A rating is capped at ten levels, probed at the boundary: ten accepted, eleven refused. It is the vendor's limit and not the language's, so by the design's own rule in Part 5 the worker enforces it and the blueprint does not — an eleven-level method stays legal MTHDS that this backend refuses. The vendor's own minimum is one option and one level, so Part 1's two-member minimum is this language's rule, and that one is the blueprint's.
- An unknown yes/no criteria key is accepted and silently ignored, so only our validation catches a typo.
GET /v1/modelslists only the two aliases.jev-1.13.0is requestable and both aliases resolve to it, but a newer versioned id is found on the vendor's models page, never through the API.- A rating answer's
probabilitiesandlegendare keyed by strings on the wire and by integers only after the SDK parses them. The replay fixtures hold the wire form. usageis per request, never per question, and output tokens are free — the cost report prices them at zero. One state asked 1, 5, 20 and 50 questions cost 323/22, 387/94, 637/364 and 1147/904 input/output tokens.- On a response,
request_idandraw_http_responseare properties that raiseTypeSafeErrorrather than returningNone; on aTypeSafeAPIErrorthe same attribute isstr | Noneand safe to read plainly. The worker therefore needs two different accessors for the success and error paths. - An array state degrades answers badly; the kernel's state builder always sends an object, with numbers as JSON numbers and yes/no values as JSON booleans, which the design already intended.
The margin the live tests must use. Probabilities come back quantised to two decimals. An unambiguous case was bit-identical across eight repeats; a deliberately borderline one moved 0.01 across ten, with a standard deviation of 0.003. So live tests assert verdicts exactly — the chosen option, the side of the threshold, the rating level — and give a probability a margin of ±0.05. What actually moves an answer is the question's wording: rewording one instruction moved the same case from 0.11 to 0.30, so live tests pin their exact instruction strings, and a failure after a wording edit is telling the truth.
The typesafe extra ships now, and the repo does not release until the integration is real. The extra is published by pyproject.toml while nothing under pipelex/ imports typesafe-sdk, so a release cut before phase 2 would put pipelex[typesafe] on PyPI installing an SDK that does nothing. The decision is to keep the extra and write no changelog entry for it, on the condition that no release goes out until the TypeSafe integration is actually in — phase 2's changelog entry is the one that announces both. Anyone cutting a release before then must revert the extra first.
Two things for phase 2 to carry. The three-questions-in-one-request saving is real — 506 input tokens against 1138, and 0.27 s against 0.66 s — so decision 6's batch-shaped contract earns itself. And ruff runs over . with select = ["ALL"], so scratch scripts under wip/ are linted like product code; the spike scripts carry a file-level ignore for the namespace-package rule and were otherwise written to pass.
Land the campaign documents and the spike through a pull request from this branch (Closes the spike item, Advances the epic), so that the next phase's worktree, cut from dev, has them.
Phase 2 — The family at the cogt level, with live tests
Item: L-260919-502f36, "Serve judgment questions through a cogt worker family, with live tests under a test profile". Design parts 3, 4 (the leaf and the dry run) and 5. No operator, no kernel entry point, no native concept: the family's answers are its own models, so nothing here waits on the standard.
The phase is done when make ti PROF=typesafe TEST=judgment runs the live tests green against the real API, and the same tests skip cleanly under a profile that lists no judgment model.
The phase lands as two pull requests, and the first does not mention the vendor. The design says the family is testable with a fake worker before any vendor code exists, and that is worth taking literally: bundling the two makes one diff where a reviewer cannot separate "is the family wired in correctly" from "did we read TypeSafe right", and the first half alone walks the type checker through a dozen exhaustive matches.
- 2a, the family. Family identity, the package, the deck, reporting and cost, the leaf, model listing, and the test infrastructure with an empty
judgment_modelson every profile. Its proof is unit tests through a fake worker, plusmake agent-checkandmake agent-test; no live call happens in it, and notypesafename appears outsidepyproject.toml's already-landed extra. - 2b, the backend.
pipelex/providers/typesafe/, the plugin surface tests, the[profiles.typesafe]arm, the live tests, and the docs for both halves. Its proof ismake ti PROF=typesafe TEST=judgment.
Both carry the same item; 2a is Advances and 2b is Closes. Whether 2b stacks on 2a or waits for its merge is the call of whoever starts, and stacking is the reason both are named here rather than filed as separate items.
Where the spike's findings bite. The backend bullet says "written against the spike's findings", and these are the four the worker cannot be written without — the rest are in spike-findings.md.
Error classification branches on the body, not the status. Every validation failure is a
400, so the status alone cannot separate three unrelated causes. The mapping:401→ credentials;400witherror_type: "authentication_error"→ credentials;400with"max_tokens_exceeded"→ content;400with"api_usage_error"naming an unknown model → configuration;400whosedetailis a bare string (the question-shape errors) → a Pipelex defect, since blueprint validation should have caught it;429and529→ transient. A bareTypeSafeError, raised client-side before any call, is always a Pipelex defect.Two accessors for one request id. On a response,
request_idandraw_http_responseare properties that raiseTypeSafeErrorwhen the header was absent rather than returningNone; on aTypeSafeAPIErrorthe same attribute isstr | Noneand reads plainly. The success path needs a guarded read and the error path does not.The rating answer's keys change type across three layers, and each conversion is somebody's job: strings on the wire, integers after the SDK parses,
dict[int, float]onRatingAnswerper part 3 — and then text keys again on theRatingnative per part 2, because the language's dict keys are text. The worker owns the first hop and the kernel the last; phase 3 inherits the last one.The deck's versioned handle is
jev-1.13.0, andGET /v1/modelswill not confirm it: the endpoint lists onlyjev-latestandjev-preview. The deck TOML carries a comment saying a newer id is found on the vendor's models page, so the next person does not go looking for an API that has it.Family identity.
JUDGMENTinInferenceFamily,ModelTypeandInferenceErrorFamily, with the failure and not-found class tables;JudgmentJobFailureError,JudgmentModelNotFoundErrorandJudgmentHandleNotFoundErrorinpipelex/cogt/exceptions.py;JobCategory.JUDGMENT_JOB,UnitJobId.JUDGMENT_ANSWERand its display arm. Follow the type checker through every exhaustive match it flags.The package
pipelex/cogt/judgment/: question and answer models (theYesNoAnswerat-least-one validator included), setting and model choice, usage and cost report, job, job factory, worker contract, worker factory. Unit tests drive the worker's template method through a fake worker: the answers' keys must equal the questions' keys, each answer's kind must match its question's, and reporting happens infinallyon success and on failure. Mutation-test each guard by breaking it and watching the test go red.Deck.
JudgmentDeckBlueprint, the flat fields onModelDeck,get_judgment_setting,validate_judgment_presets,check_judgment_choice_with_deck, the suggestion arms, the model manager's handle collection and flattening, andpipelex/kit/configs/inference/deck/5_judgment_deck.tomlwith the default alias on a versioned handle.Reporting and cost.
JudgmentTokensUsageand its report in both unions, theReportingManagerdispatch arm, and inCostRegistry.compute_cost_reporta judgment arm, an explicit extract arm, andassert_neverto close. Real token counts, priced per million like an LLM; update themodel_typecomment onModelUsageSpec.The leaf.
JudgmentAssignment,pipelex/cogt/content_generation/judgment_generate.pywith the dry branch first,dry_judgment_gen_answers(deterministic, uncertainty absent), andmake_judgment_answerson the protocol and the generator. A unit test pins the dry branch.The backend.
pipelex/providers/typesafe/: plugin, worker, translation both ways, exceptions and error classification, written against the four findings above and unit-tested by replaying the recorded responses inspike/responses/— the successes are wire bodies and the refusals aredescribe_exceptionenvelopes with the wire body underbody, which is what the classification tests read. The vendor's ten-level cap and its option-count limits are enforced in this translation, not in the blueprint. The plugin joinsKERNEL_BUILTIN_PLUGINS; the client is cached through theSdkClientRegistry; retry and timeout are passed explicitly. Backend record inbackends.toml,backends/typesafe.toml, a routing profile, and the.pipelex/inference/mirror with its kit manifest. Check that a boot with the backend enabled and the key unset behaves as it does for Linkup, and add the arm to the keyless boot test.Plugin surface tests. The expected-backends table in
tests/unit/pipelex/plugins/test_inference_backend_coverage.py, and a missing-extra guard test mirroring Linkup's.Model listing.
ModelCategory.JUDGMENTinpipelex/builder/operations/models_ops.pywith its arms, sopipelex-agent modelsandcheck-modelknow the family.Test infrastructure. The
judgmentmarker and its term in the default deselect expression inpyproject.toml; every family table inpreprocess_test_models_cmd.py; a[collections.judgment]and ajudgment_modelskey on every profile in.pipelex-dev/test_profiles.toml, empty everywhere except a new[profiles.typesafe]whosebackendsis["typesafe"];get_judgment_comboswith its skip, thejudgment_combofixture and its re-export; regenerate_generated_model_sets.py.Live tests, marked
inferenceandjudgment, intests/integration/pipelex/cogt/test_judgment.pyandconfig_coverage/test_cc_judgment.py: each question kind on an unambiguous case, several questions in one job, usage tokens present, a versioned model id reported, and an error case (an unknown model handle). Verdicts are asserted exactly and probabilities within ±0.05, per checkpoint 1; the exact instruction strings are pinned, since rewording moved one case from 0.11 to 0.30 while repetition moved it 0.01.Docs.
docs/under-the-hood/inference-backend-plugins.md(the family comment, the "serves all four" sentence, the worker-contract table), the distributed content generation, dry-run and per-node usage pages, a newdocs/contribute/inference-family-surface.mdlisting every site a family touches, and itsmkdocs.ymlentry. Regenerate the error pages and the identity snapshot (make gep,make gei). Changelog entry.make agent-check, resolving any drift contract it opens;make agent-test;make ti PROF=typesafe TEST=judgment; thenmake rtmto put the generated model sets back on the default profile before committing, since thePROF=run rewrites that tracked file.
What 2a changed against the design
Two things, both recorded in design.md in the same change.
The judgment deck has no choice_default, and the blueprint makes it optional. Shipping one broke every boot: ModelManager._enforce_gateway_model_membership walks every handle a deck's presets and choice defaults name, the default routing profile sends an unmatched handle to the Pipelex Gateway, and the gateway does not serve Jev — so GatewayUnknownModelError fired in tests/unit/pipelex/test_hub_lifecycle.py before any judgment was ever asked for. JudgmentDeckBlueprint.choice_default is therefore JudgmentModelChoice | None = None, alone among the families. This is phase 3's to carry: @default-judgment cannot be PipeJudge's default until the hosted plane serves the family, so the operator must require an explicit model, and the design's "hosted serving" open question now has a consequence attached to it.
CostRegistry.compute_cost_report became a match rather than an if-chain. With an explicit extract arm the trailing isinstance was provably true, which pyright refuses as reportUnnecessaryIsInstance, so the dispatch is a match over the usage classes closed by case _: assert_never(...). The guarantee the design asked for is unchanged and now has a runtime test beside the static one (test_every_family_gets_its_own_cost_report).
The MTHDS protocol has no word for the family, and PipelexMTHDSProtocol.models() would have raised on it. mthds.protocol.models.ModelCategory carries llm, extract, img_gen and search; the runner builds one ModelInfo per preset and types it by calling that enum on our own category key, so the first judgment preset in a deck turns models() into a ValueError for every caller, not just for judgment. The runner now skips a category the protocol cannot name, leaving the judgment aliases and waterfalls on the string-keyed routing extensions, and L-260919-afb6c0 asks mthds for the member. Nothing is broken today only because the kit deck ships no judgment preset. 2b was expected to make it live and did not: it ships an alias and no preset (see checkpoint 2), so the gap stays dormant until a deck gains a judgment preset.
One pre-existing test was loosened, and it is worth knowing why. test_parity_with_aggregate_run_total compared two float sums for bit-for-bit equality; they are the same per-record costs added in different orders, and a fifth record made the last bit diverge. It now compares to within 1e-12, which is still many orders of magnitude tighter than any real drift between the two cost paths.
Checkpoint 2a — the family, handed off
Where the work is. Worktree _pipelex--judgment-cogt-family, branch feature/Judgment-cogt-family, which is stacked on feature/Judgment-family (phase 1, open as PR #1214). Its first three commits are phase 1's; everything after them is 2a. The pull request for 2a therefore targets feature/Judgment-family, not dev, until phase 1 merges — per the workspace's stacked-PR rule — and its body carries Advances L-260919-502f36, because 2b is what closes the item.
What is done. Every box in the 2a half of the list above, and nothing from 2b. Concretely: the family enums and their failure/not-found tables, pipelex/cogt/judgment/ entire, the deck (blueprint, flat fields, get_judgment_setting, validate_judgment_presets, check_judgment_choice_with_deck, the ambiguity warner, the model manager's collection and flattening, 5_judgment_deck.toml and its .pipelex/ mirror), reporting and cost, the leaf with its dry branch and its protocol method, ModelCategory.JUDGMENT, and the test infrastructure. make agent-check passes, including the cli-docs drift contract, which this change opened and which is acked. No typesafe name appears anywhere outside pyproject.toml's already-landed extra.
What is left, and it is all 2b: pipelex/providers/typesafe/ with its worker, translation and error classification written against the four findings above; the backend records and the .pipelex/inference/ mirror; the plugin surface tests; the [profiles.typesafe] arm and a [collections.judgment] naming jev-1.13.0 (deliberately removed from 2a, since it names the vendor); the live tests; and the docs for both halves, including the new docs/contribute/inference-family-surface.md. The changelog entry under ## [Unreleased] describes 2a's family and is 2b's to extend with the backend rather than to duplicate.
The commands a cold session needs, all from the worktree root:
make agent-checkafter every code change, with changes staged first so the drift digest sees them.make agent-testto close, or.venv/bin/pytest tests/unit/pipelex/cogt/judgment/ tests/unit/pipelex/cogt/content_generation/test_judgment_generate_dry_branch.py tests/unit/pipelex/cogt/models/ tests/unit/pipelex/cogt/usage/ -qfor the fast loop over what 2a touched.make rtmafter anymake ti PROF=…run. In this repotests/integration/pipelex/fixtures/_generated_model_sets.pyis gitignored, so the plan's warning about it being a tracked file does not apply here — runningrtmis still right for local consistency.- ⚠
make agent-checkruns the keyword-only auto-fixer, and it silently rewrote four of this phase's signatures before their grants existed:get_judgment_setting,_warn_if_ambiguous_judgmentand bothJudgmentTokenCostReportField.report_field_for_*staticmethods. Record the grant withmake sgr FUNC=… RATIONALE=…before running the check, and do not put backticks in a rationale.
Open questions, none blocking 2b's code. The design's own list stood unratified while 2a was written (the standard's native names, how much optional surface to pin, question against prompt, hosted serving), and what 2a added to it was the consequence recorded above: with no choice_default, PipeJudge cannot default a model, which gave "hosted serving" a user-visible cost rather than a purely internal one. All four were ratified on 2026-09-20, and the answers are the design's Ratified decisions; phase 3's gate below carries what they mean for the work.
Checkpoint 2 — reached
Where the work is. 2b is on feature/Typesafe-backend in worktree _pipelex--typesafe-backend, stacked on 2a's feature/Judgment-cogt-family, which is itself stacked on phase 1's feature/Judgment-family (PR #1214). Each pull request targets the branch below it until that one merges. 2a's branch gained one commit after checkpoint 2a, because the full suite had never finished on it and was red: a fake model deck missing the family's fields, and three generated artefacts (the error identity snapshot, the error pages, the inference-backend migration golden) that had not been regenerated. Nine end-to-end failures in the same run were the machine's global deck predating the judgment section, not the code.
What the live tests cover and how they ran. make ti PROF=typesafe TEST=judgment ran six tests green against the live API: each question kind alone on the unambiguous case, the three kinds in one request (usage recorded, the pinned model on the report), an unknown model id rendered as JudgmentModelNotFoundError with its request id, and the config-coverage call. Under the default profile, which lists no judgment model, the same six skip with "No judgment combos in test profile". The wording and the state are the spike's own, pinned, and a yes/no probability is held to ±0.05 of the recorded 0.98.
What a run costs. The five requests that reach the model read 1,998 input tokens and wrote 186 output tokens, which at $0.042 per million input tokens and free output is $0.00008 per run. Cost is not a reason to keep these tests thin.
Contract changes against the design, all recorded in design.md Part 5:
- The managed routing profiles carry an optional route,
"jev-*" = "typesafe". Without it a user holding a TypeSafe key still could not reach the model under the default profile: every handle routes to the gateway by default, and one the gateway does not serve is dropped from the deck without a word. The kit deck carries@default-judgmentand still no preset. - Classification lives in the provider package and branches on the body's code before handing the rest to the shared classifier, which stays free of vendor names.
- The worker warns when the API names a model other than the pinned one, the one way the pin could fail silently.
Sites no plan named, found on the way, now all listed in docs/contribute/inference-family-surface.md: the CI placeholder list in pipelex/test_extras/shared_pytest_plugins.py, whose omission would have failed the boot of every CI shard (now guarded by tests/unit/pipelex/test_extras/test_ci_placeholder_keys.py); the SDK in the import-light boot guard's blocked list; and .env.example. A pre-existing bug was fixed on the way: RoutingProfile.get_backend_match_for_model merged the enabled optional routes into the profile's declared routes in place, harmless until now only because each match re-checks enablement, and this is the kit's first real use of optional routes.
A replay trap for the next backend. The SDK coerces a rating's string-keyed probabilities to integers only when it parses JSON text; validating the decoded dict refuses every rating. The unit tests replay the recorded wire bodies with model_validate_json for that reason, and the fixtures they read are copied into tests/data/typesafe/responses/ so they outlive this campaign directory.
What waits elsewhere. The Temporal activity and queue for the leaf are L-260919-9da413, owned by pipelex-server/temporal; the protocol's missing judgment model category is L-260919-afb6c0 in mthds, which a judgment preset would make live — the kit ships none.
Review round 1 (profile 4, bar open). ledger review-profile measures a branch only against origin/dev, which would have re-read phase 1 in 2a's review and phases 1 and 2a in 2b's, so each layer was reviewed as a commit target: 2a's "Add the judgment inference family at the cogt level" and 2b's "Serve the judgment family from TypeSafe". Reviewers were cubic and the official code-review at medium; one verifier checked the fix group. Eight confirmed findings were fixed, 2a's in the commit "Apply the round 1 review of the judgment family" and 2b's in "Apply the round 1 review of the TypeSafe backend":
- The deck's
judgmentsection is defaulted. Required, it failed the boot of every deck installed before5_judgment_deck.tomlexisted — including the checked-in decks ofpipelex-server/worker,pipelex-api,pipelex-cookbookandcocode— with a remedy pointing atpipelex init config. - The worker's answer guard refuses an option the question does not list and a level beyond its scale, in the verdict and in its distribution's keys.
- A plain-sentence
detailis a malformed request only on a400; a rate limit, an outage or a refused key answered in that shape keeps the status ladder's verdict. - The TypeSafe extractor reads
retry-afterlike every other extractor with headers, and the client factory refuses an empty key as well as an absent one. - Smaller: the deck-directory docs list the judgment file, a stale generated fixtures file names
make regenerate-test-modelsinstead of interrupting collection, and the worker contract test imports its data from the root package.
Rejected: the stale ModelUsageSpec.model_type comment (2b rewrites it), and an empty TYPESAFE_API_KEY reaching the SDK through the kit's ${TYPESAFE_API_KEY} declaration, since get_required_env treats an empty variable as unset. The factory's own empty-key refusal is not dead code: it is the only guard on the paths that do let an empty key through — a literal api_key = "" in an override, the ${env:…|secret:…} fallback form, which returns an empty variable as it is, and a secrets provider other than the environment.
Deferred from the review, unverified — each is a reviewer's claim nobody has checked:
- The status-less
TypeSafeErrorverdict sits in the shared classifier's_STATUSLESS_BY_TYPE_NAMEtable (pipelex/cogt/inference/error_classify.py) rather than inclassify_typesafe_error, which splits one provider's verdicts across two modules. Worth deciding with the next backend: either vendor exception names belong in that table or none do. _from_typesafe_answertakestypesafe_answer: Any(pipelex/providers/typesafe/typesafe_translation.py), where the SDK's answer union would let the checker see its threeisinstancearms.- Round 2:
_check_answer_is_offered(pipelex/cogt/judgment/judgment_worker_abstract.py) ends incase _: pass, so a fourth question kind with an offered set of its own would pass unchecked. Naming the yes/no pair and raising in the fallback, or matching on theJudgmentKindenum so pyright proves exhaustiveness, would make the next kind fail loudly. - Round 2: the TypeSafe extractor reads
retry-afterbut notretry-after-ms, which the SDK's ownparse_retry_afterreads first. Only the rendered retry hint and the API'sRetry-Afterprojection are affected, and TypeSafe's 429 has never been provoked, so its header is unknown.
[typesafe] ships enabled, like Linkup, decided on 2026-09-19. It was verified to behave identically: a live boot without TYPESAFE_API_KEY fails naming 'typesafe', and a keyless boot succeeds. pipelex update touches only the deck, so upgraders never receive the table; only a fresh pipelex init meets it.
What is left of phase 2, for a session starting cold. make agent-check, the full make agent-test and make ti PROF=typesafe TEST=judgment passed before review; the live tests skip under the default profile after make rtm. What remains:
- Review round 2 (profile 4, bar
defects) read each branch's review-fix commit and found no code defect; it corrected the empty-key rejection above. The 2b pass of round 1 is recorded on a commit the rebase onto the fixed 2a replaced; round 2's passes name commits both branches carry, which is what the merge gate counts.ledger review-profilesays whether a further round is owed. - Open the two pull requests, each targeting the branch below it: 2a with
Advances L-260919-502f36, 2b withCloses L-260919-502f36. Phase 1 (PR #1214) merges first.
The traps met here, all worth knowing before touching this branch:
make agent-checkruns the keyword-only fixer, which rewroteTypesafePlugin.registerbefore its grant existed. Grant first (make sgr FUNC=… RATIONALE=…).make geiandmake gepmust be rerun after any change to an error class; the identity snapshot test fails otherwise.
Confirm the gate below before starting phase 3.
Phase 3 — PipeJudge
Item: L-260919-406599, "Run judgments from a bundle with the PipeJudge operator". Blocked by phase 2 and by L-260919-178ad6, the standard change in mthds. Design parts 1, 2, 4 and 7.
Gate. The design was ratified on 2026-09-20 and its status is active, so one half of this gate is met and the other is not: the standard change must have merged in mthds and the sibling mthds/ checkout must have been refreshed, because tests/unit/pipelex/core/concepts/test_pinned_natives_vs_standard.py reads the spec page from that checkout and the engine's natives cannot go green before the page moves.
What ratification settled, and what each decision costs this phase. The full statements are in the design's Ratified decisions; these are the consequences the steps below carry.
The natives are
ChoiceandRating, andYesNogains an optionalprobability.Every optional member is pinned on day one:
probabilityonYesNo;confidenceandprobabilitiesonChoice;confidence,probabilitiesandpositiononRating. The contents, the renderers, the pinned blueprints, codegen's native expansion and both projection corpora carry the full set.The operator's template field is
question, andpromptparses as a synonym of it. Exactly one may be set; both is a validation error namingquestion;questionis what the blueprint carries and what the builder and the agent CLI emit.The family is bring-your-own-key permanently, so no kit default exists to resolve and the operator names its model or says none is configured. The error message and the docs state it as the design rather than as a temporary gap, and no hosted inference or
pipelex-remote-configwork belongs to this campaign.Natives in the engine.
NativeConceptCodemembers and every exhaustive match over them,ChoiceContentandRatingContentwith their renderers, the optionalprobabilityonYesNoContent(strict, likeyes_no), the pinned blueprints andPINNED_NATIVES_MTHDS_VERSION, the concept factory,CoreRegistryModels.STUFF, the input shaper and the out-of-matrix set as the standard decided, codegen's native expansion, anddocs/building-methods/concepts/native-concepts.md. Runmake test-ts-gatesif an emitter moved, andtrace-input-semanticssince the structure side changed. If this step alone makes a reviewable diff, land it as its own pull request under the same item.Kernel.
pipelex/kernel/judgment_ops.py(resolve_judgment_setting,run_judgment) andjudgment_results.py: render the question, build the state from the inputs by name as checkpoint 1 settled it, send a batch of one, apply the threshold, warn when a threshold has no probability to apply to, build the native content, store it. Tests cover state building per content kind and the threshold at and around its boundary. Add the arm totests/unit/pipelex/kernel/test_kernel_boot_contract.pyand the row todocs/under-the-hood/pipelex-kernel.md, and acknowledge thepipelex-kernel-docsdrift contract.Operator.
pipelex/pipe_operators/judge/: blueprint with kind resolution, thequestion/promptsynonym and its error messages, pipe, factory with the output agreement (refinements admitted), exceptions, execution data for the trace. Then the registration surface fromdocs/contribute/registration-surface.md:PipeType.PIPE_JUDGEand its category arm,PipeBlueprintUnion,registry_models.py, the output renderer's match. Regenerate the schema (make gms).Builder.
PipeJudgeSpeccarryingquestionalone, the spec map and the spec union, the TOML emission branch inpipe_ops.pyand its twin in the agent CLI'spipe_cmd.py, with their tests;pipelex/builder/CLAUDE.md, adding the missingPipeStructurewhile there.Corpus and end to end. The
[operator.judge]vocabulary entry and the urgent-message scenario re-cut withPipeJudgeas a new corpus entry, leavingnative_yes_no_urgent_messageas it is; an e2e bundle undertests/e2e/pipelex/pipes/pipe_operators/pipe_judge/covering the question kinds, a threshold, and aChoicedriving aPipeCondition; the error-report parity fixture beside search's inpipelex/test_extras/error_report_parity.py; a dry-run test.Docs.
docs/building-methods/pipes/pipe-operators/PipeJudge.mdcarrying the authoring guidance from the design's part 4, saying that a judgment names its own model and thatpromptis accepted wherequestionis meant, a feature page, the operator round-ups,mkdocs.yml. Regenerate the error pages and the identity snapshot. Changelog entry.make agent-check,make agent-test,make ti PROF=typesafe TEST=judge,make rtm.
Checkpoint 3
Record here: the version pipelex shipped the operator in, and the follow-ups filed for what waits on that release — the schema copies (mthds-schema-sync), the corpus (mthds-corpus-sync), the projection corpus in mthds-js and mthds-python, a node rendering in mthds-ui, and the operator lists the authoring skills teach from in pipelex-plugins and mthds-plugins. Serving the family from the hosted plane is not among them: ratification decided against it.