phax 0.33.0
Changes since 0.32.0: v0.32.0...v0.33.0.
Highlights
- Acceptance tests, not oracles — An oracle is what judges a test; an acceptance test is a test written from a spec's acceptance criterion before the code, and phax never uses one word for the other.
Upgrading
- Plan documents, run plans and extraction answers:
plan-document,phax-planandphax-plan-extractionare stamped 0.33.0. A phase'soracle: { dischargedBy, files }key isacceptance: { passedBy, files }, a test line's looporacleisacceptance, the techniqueboundaryis accepted, and the criterion wordsacceptance,in-phaseandoracleare reserved: no criterion id may be one of them. - Records and schema readers:
run-status,phase-status,gate-attributionandphase-record-manifestare stamped 0.33.0. A run's hold selectionoracleis recordedacceptance, a corrected stop'soracleStepisacceptanceStep, a gate step's surfaceoracleand a record's verified surfaceoracleareacceptance, and a record's role isacceptancewithpassedByorpassingwithacceptancePhase, in place oforaclewithdischargedByordischargingwithoraclePhase. - Provider and run folders: the new
acceptance-requestreplacesoracle-request. The provider reads anacceptance-requeststamped 0.33.0 on stdin, with verdictauthoredorpassedand the keysphase,acceptancePhase,baseandfiles, plusacceptanceCommitonpassed. phax saves it aschecks-attempt-NN.acceptance-request.json.oracle-requestis frozen at 0.26.0 and read only: phax writes it nowhere. A provider you wrote readspassed,acceptancePhaseandacceptanceCommitin place ofdischarged,oraclePhaseandoracleCommit, and refuses any other document, as the example does: a provider that still reads anoracle-requestreceives none, and phax refuses a plan with an acceptance phase when noacceptanceprovider is configured. - The Vitest example moved from
examples/vitest-oracles/toexamples/vitest-acceptance/. If you copied it, or your phax.json points atnode examples/vitest-oracles/main.mjs, change the path tonode examples/vitest-acceptance/main.mjsunder the keyacceptance. It reads only anacceptance-request, names--skip-acceptancein its remedy, and reports findings whose ids start withacceptance-(acceptance-unmarked,acceptance-not-run,acceptance-marker-left,acceptance-changed,acceptance-unparsable). - Telemetry: the event
oracle.edits.unjudgedisacceptance.edits.unjudged. Its console line isphax·acceptance.edits.unjudged, and a failed step namedoraclein a span or an event is namedacceptance. A dashboard or an alert on the old name stops matching. - Overview and records:
acceptanceRoleand theacceptancerows.phax plans overview --jsongivesacceptanceRole, whose kind isacceptance(withpassedBy),passing(withacceptancePhase) ornone, in place oforacleRole. The overview printsacceptance roleandphax records explainprintsacceptance, where they printedoracle roleandoracle; the review handoff's table is## Acceptance pairs. A script that matches those names changes with them. - Skills: rerun
phax skills install. The bundled skills (phax-planning, phax-decide-plan, phax-decide-review, phax-review) teach acceptance phases, and a copy made by an earlier release teaches the old names. See After every upgrade. - Schema readers: renamed exports in
@lbdremy/phax-schemas.parseAcceptanceRequestreads anacceptance-requestand anoracle-requestat 0.26.0, andtoLatestAcceptanceRequestlifts either to the latest acceptance request (dischargedbecomespassed,oraclePhasebecomesacceptancePhase,oracleCommitbecomesacceptanceCommit).OracleRequestSchema,parseOracleRequest,toLatestOracleRequestand the typesOracleRequest,LatestOracleRequestandOracleRequestShapeare gone;OracleRequestV0_26_0Schemastays for the frozen shape. An older@lbdremy/phax-schemascannot read 0.33.0 documents. - Older records read under the new names. A plan sidecar, run plan, status file, gate attribution or record manifest written by an earlier release still reads, lifted to the acceptance names when phax or
@lbdremy/phax-schemasreads it.phax records explainlists a record's.acceptance-request.json, and.oracle-request.jsonfor a record written before. - Configuration: the
oracleskey isacceptance. It applies in phax.json, phax.local.json and ~/.phax/config.json. A layer that still carriesoraclesis refused with<file>: "oracles" is no longer read: write "acceptance". Runphax schema upgradeto refresh the editor schemas. - Command line:
--hold acceptanceand--skip-acceptance. They replace--hold oracleand--skip-oracle, refused with--hold 'oracle' is no longer read: write --hold acceptanceand--skip-oracle is no longer read: write --skip-acceptance. - Hand-written plans: the header lines and the loop.
**Oracle phase:** yes | discharged by phase-NNis**Acceptance phase:** yes | passed by phase-NN,**Oracle files:**is**Acceptance test files:**, and a test line's looporacleisacceptance.phax plans lintreports the old lines on itsacceptancecheck (formerlyoracles) with**Oracle phase:** is no longer read: write **Acceptance phase:**and**Oracle files:** is no longer read: write **Acceptance test files:**, andphax runandphax resumerefuse them with exit 11, "Acceptance preflight failed". The old loop is refused withtest line <n> uses the loop 'oracle', which is no longer read: write 'acceptance', before any extraction. - Run
phax artifact migrate-documentsonce. It restamps every live plan sidecar stamped below 0.33.0, rewrites its plan.md test lines from the looporacletoacceptanceand its header lines to**Acceptance phase:**and**Acceptance test files:**, and commits both files. Spec sidecars are already at their current stamp, 0.32.0, and stay as they are. It refuses a plan whose body was edited by hand since its sidecar was written, and a plan with a test line whose criterion isacceptance, naming the phase and the line: rename that criterion in the spec and the plan, or re-author the plan, then rerun. Until thenapprove,reopenanddeciderefuse, naming the command. - Runs in flight. A
phax-plan.jsonextracted by 0.32.0 or older is refused byphax resumeandphax validate --plan, which namephax archive <run> --force. Finish the run with the release that started it, or archive it and run its plan again.phax lsandphax session-infostill show it.
What's new
Acceptance tests, not oracles
An oracle is what judges a test; an acceptance test is a test written from a spec's acceptance criterion before the code, and phax never uses one word for the other.
-
A plan declares the phase that writes failing tests with
**Acceptance phase:**and**Acceptance test files:**, naming the phase that passes them.plan.md acceptance phase header linesNow:
Before
-
A test written in an acceptance phase is marked
acceptancein its loop field, andboundaryis a new technique for empty cases and limits.plan.md test strategy lineNow:
Before
-
Running a plan that still uses the oracle names is refused before anything runs, and each refusal names what to write instead.
phax run — a plan with the old namesNow:
-
The provider that judges acceptance tests is configured under
acceptance, and anoraclesblock is refused with the new key named.phax.json acceptance providerNow:
Before
-
phax run --hold acceptancestops the run for review after every acceptance phase, and--hold oracleis refused with the new spelling named.phax run --hold acceptanceNow:
Before
-
phax resume --skip-acceptanceresumes without the acceptance step while the configured gate still runs, and--skip-oracleis refused with the new flag named.phax resume --skip-acceptanceNow:
Before
-
An acceptance provider reads an
acceptance-requestdocument, whose verdict isauthoredorpassed.acceptance request on the provider's stdinNow:
Before
-
A plan's phase states its acceptance tests under
acceptance, naming the phase that passes them inpassedBy.phax-plan.json and the plan sidecar phaseNow:
Before
-
Scripts reading a run's status find the hold selection
acceptanceand, on a closed stop,acceptanceStep.run and phase statusNow:
Before
-
A gate attribution's appended step carries the surface
acceptance, and a phase record names its role asacceptanceorpassingand listsacceptanceamong its verified surfaces.gate attribution and phase recordNow:
Before
-
The plan overview, as text and as JSON, and the records explanation show each phase's acceptance role, and records written before the rename read the same way.
phax plans overview and phax records explainNow:
Before
-
Running
phax artifact migrate-documentsonce rewrites every live plan to the acceptance names and commits it.phax artifact migrate-documentsNow:
-
Telemetry reports a review correction to acceptance test files after they were judged as
acceptance.edits.unjudged.telemetry event acceptance.edits.unjudgedNow:
Before
-
The planning skill teaches acceptance phases, explains that an acceptance test may be small, and describes the
boundarytechnique.the phax-planning skillNow:
Before