Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 32 additions & 10 deletions docs/BEARING.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,38 @@ before the final commit for that slice, and mark completed items with `- [x]`.
and one-file-per-concept caps, self-attested authority fields from artifact
JSON are rejected, policy-test authority fixtures are named constants, and
empty or internally inconsistent Wesley generated inventory is rejected.
- [ ] 6. Make evidence posture explicit: translated git-warp evidence first,
native Continuum evidence only after native witnesshood is proven.
- [ ] 7. Prove the patch commit visibility contract: success means canonical
writer-tip advancement and visible graph truth, not just object creation.
- [ ] 8. Add the same-writer concurrent patch race witness with final-frontier
and visible-state assertions.
- [ ] 9. Project git-warp receipt facts into the generated Continuum
receipt-family shape with conformance tests.
- [ ] 10. Add the first `warp-ttd` smoke over generated-family git-warp receipt
facts instead of handwritten adapter-local receipt folklore.
- [x] 6. Make evidence posture explicit: translated git-warp evidence first,
native Continuum evidence only after native witnesshood is proven. The
current seam adds runtime-backed `ContinuumEvidencePosture` and
`ContinuumEvidenceStatus`; translated git-warp evidence is explicit
`translated-substrate` evidence, native Continuum evidence cannot be
constructed without `nativeWitnessRef`, and translated evidence rejects native
witness references.
- [x] 7. Prove the patch commit visibility contract: success means canonical
writer-tip advancement and visible graph truth, not just object creation. The
patch commit path now advances writer refs with `compareAndSwapRef()`,
rereads the writer ref before returning success, throws
`WRITER_COMMIT_NOT_VISIBLE` if the returned commit is not the visible writer
tip, and has focused tests proving both ref visibility and materialized graph
visibility.
- [x] 8. Add the same-writer concurrent patch race witness with final-frontier
and visible-state assertions. The regression witness creates two stale
builders for the same writer, commits them concurrently, proves exactly one
wins, asserts the writer ref names the winning SHA, and verifies only the
winning node is visible after materialization.
- [x] 9. Project git-warp receipt facts into the generated Continuum
receipt-family shape with conformance tests. `ContinuumReceiptProjector` now
maps `TickReceipt` into runtime-backed Continuum receipt-family `Receipt`
facts, `ContinuumReceiptFamilyProjection` carries the receipt-family artifact
descriptor and explicit evidence status, and non-receipt-family artifacts are
rejected.
- [x] 10. Add the first `warp-ttd` smoke over generated-family git-warp receipt
facts instead of handwritten adapter-local receipt folklore. The smoke starts
from a real committed git-warp patch, materializes real `TickReceipt` output,
loads the generated receipt-family fixture descriptor through the adapter
seam, projects the receipt into `ContinuumReceiptFamilyProjection`, queries
by head and frame for the `warp-ttd` target, and keeps evidence posture
explicitly translated rather than native.
- [ ] 11. Re-plan with evidence in hand before expanding into reading-envelope,
suffix/runtime-boundary, neighborhood-core, and settlement-family slices.

Expand Down
127 changes: 127 additions & 0 deletions docs/design/0150-v18-evidence-posture/v18-evidence-posture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
cycle: 0150
task_id: V18_evidence_posture
status: Complete
sponsors:
human: James
agent: Codex
started_at: 2026-05-21
completed_at: 2026-05-21
release_home: v18.0.0
---

# V18 Evidence Posture

## Pull

The generated-artifact seam can now admit Continuum-family descriptors, but
the next compatibility cut must prevent a shaped value from pretending to be a
native Continuum witness.

## Hill

`git-warp` has a runtime-backed evidence status that separates translated
substrate evidence from native Continuum evidence and requires a native witness
reference before native evidence can be claimed.

## Playback Questions

Agent:

- Does translated git-warp evidence carry an explicit translated posture?
- Does native Continuum evidence require a native witness reference?
- Does the model reject translated evidence that tries to smuggle in a native
witness reference?

Human:

- Can later v18 receipt projections say "this is git-warp evidence translated
into a Continuum-family shape" without overclaiming?

## Accessibility / Assistive Reading Posture

The evidence status is plain data with stable string fields. No visual-only
state is introduced.

## Localization / Directionality Posture

The posture values are protocol identifiers and not localized prose. Human
summaries remain ordinary strings supplied by callers.

## Agent Inspectability / Explainability Posture

The status object exposes posture, source runtime, basis reference, optional
native witness reference, and summary as inspectable fields.

## Non-Goals

- Do not implement native Continuum witness production.
- Do not generate receipt-family values in this slice.
- Do not build a generic WARP Optic engine.

## RED

Expected failing spec:

```text
npx vitest run test/unit/domain/continuum/ContinuumEvidenceStatus.test.ts
```

Observed RED:

```text
Error: Cannot find module '../../../../src/domain/continuum/ContinuumEvidencePosture.ts'
```

## GREEN

This slice adds:

- `ContinuumEvidencePosture`
- `ContinuumEvidenceStatus`

Translated git-warp evidence is represented as `translated-substrate` with
`sourceRuntime: "git-warp"`. Native Continuum evidence is represented as
`continuum-native` and cannot be constructed unless `nativeWitnessRef` is
present. Translated evidence rejects `nativeWitnessRef` so compatibility output
cannot smuggle native witnesshood through an optional field.

## Playback

Witness:

```text
npx vitest run test/unit/domain/continuum/ContinuumEvidenceStatus.test.ts test/unit/domain/index.exports.test.ts
Test Files 2 passed (2)
Tests 55 passed (55)

npm run typecheck:src -- --pretty false
```

Agent answers:

- Yes, translated git-warp evidence carries explicit translated posture.
- Yes, native Continuum evidence requires `nativeWitnessRef`.
- Yes, translated evidence with `nativeWitnessRef` is rejected.

Human answer:

- Later receipt-family projections can carry translated git-warp evidence
without claiming native Continuum witnesshood.

## SSJS Scorecard

- Runtime-backed forms: green; both new concepts are classes with constructor
validation and frozen instances.
- Boundary validation: green; no raw boundary parsing was introduced.
- Behavior ownership: green; posture validation and evidence-status invariants
live on the evidence concepts.
- Message parsing: green; no message parsing introduced.
- Ambient time or entropy: green; no ambient time or entropy introduced.
- Fake shape trust or cast-cosplay: green; native evidence cannot be claimed
without an explicit native witness reference.

## Closeout

This closes BEARING task 6 and gives receipt-family projection work an honest
evidence-status carrier.
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
cycle: 0151
task_id: V18_patch_commit_visibility
status: Complete
sponsors:
human: James
agent: Codex
started_at: 2026-05-21
completed_at: 2026-05-21
release_home: v18.0.0
---

# V18 Patch Commit Visibility

## Pull

Receipt-family projection depends on the source fact underneath it: a successful
patch commit must mean canonical writer-tip advancement and visible graph truth,
not merely Git object creation.

## Hill

Patch commit success is reported only after the writer ref is atomically
advanced to the returned patch commit and the returned commit is visible through
materialization.

## Playback Questions

Agent:

- Does patch commit use the persistence CAS ref surface for writer-tip
advancement?
- Does commit reject success when the writer ref does not point at the returned
commit after CAS?
- Does a successful graph patch become visible through materialization?

Human:

- Can later receipt-family projections trust a returned patch SHA as the
canonical writer-tip fact?

## Accessibility / Assistive Reading Posture

No user-facing visual surface changes. The contract is asserted through tests
and error codes.

## Localization / Directionality Posture

No localized strings are introduced. Error messages remain developer-facing.

## Agent Inspectability / Explainability Posture

The visibility failure path uses a stable error code so agents can distinguish
object creation from canonical writer-tip visibility.

## Non-Goals

- Do not change checkpoint, strand, or audit ref update behavior.
- Do not project receipt-family values yet.
- Do not rewrite existing patch history.

## RED

Expected failing spec:

```text
npx vitest run test/unit/domain/services/PatchCommitter.visibility.test.ts
```

Observed RED:

```text
expected [] to deeply equal [{ ref, newOid, expectedOid }]
promise resolved instead of rejecting
```

The old path used plain `updateRef()` and did not verify the post-update writer
ref before returning success.

## GREEN

This slice changes patch commit persistence to:

1. create the patch commit object,
2. atomically advance the writer ref with `compareAndSwapRef()`,
3. reread the writer ref,
4. report success only when the writer ref points at the returned commit SHA.

If the post-CAS visibility check fails, the commit path throws
`WriterError` with code `WRITER_COMMIT_NOT_VISIBLE`.

## Playback

Witness:

```text
npx vitest run test/unit/domain/services/PatchCommitter.visibility.test.ts test/unit/domain/services/PatchBuilder.cas.test.ts
Test Files 2 passed (2)
Tests 10 passed (10)

npm run typecheck:src -- --pretty false
npm run typecheck:test -- --pretty false
npm run lint:sludge
npx eslint --no-warn-ignored src/domain/services/PatchCommitter.ts src/domain/errors/WriterError.ts test/unit/domain/services/PatchCommitter.visibility.test.ts test/unit/domain/services/PatchBuilder.cas.test.ts
git diff --check
```

Agent answers:

- Yes, patch commit uses the CAS ref surface for writer-tip advancement.
- Yes, commit rejects success when the writer ref does not point at the
returned commit after CAS.
- Yes, the successful graph patch test proves materialization-visible graph
truth.

Human answer:

- Later receipt-family projections can trust a returned patch SHA as canonical
writer-tip evidence after successful commit.

## SSJS Scorecard

- Runtime-backed forms: green; existing `WriterError` carries the new stable
visibility code.
- Boundary validation: green; persistence stays behind the ref port.
- Behavior ownership: green; commit visibility is enforced inside the patch
commit path that owns patch persistence.
- Message parsing: green; no message parsing introduced.
- Ambient time or entropy: green; no ambient time or entropy introduced.
- Fake shape trust or cast-cosplay: green; success is now checked against the
canonical writer ref instead of inferred from object creation.

## Closeout

This closes BEARING task 7 and gives receipt projection a stronger source fact:
successful patch commit means canonical writer-tip visibility.
Loading
Loading