Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5c77150
feat(ucns): consume canonical bridge and certification evidence
erinepshovel-code Jul 12, 2026
d640277
feat(result): preserve canonical UCNS certification evidence
erinepshovel-code Jul 12, 2026
45096db
build(ucns): pin canonical evidence-envelope producer
erinepshovel-code Jul 12, 2026
f05a241
test(ucns): cover canonical bridge and certification ingestion
erinepshovel-code Jul 12, 2026
bb6b794
feat(api): expose authoritative UCNS evidence record
erinepshovel-code Jul 12, 2026
73cc05f
test(result): bind UCNS bridge and certification evidence
erinepshovel-code Jul 12, 2026
cbe3be6
test(ucns): add canonical producer evidence contracts
erinepshovel-code Jul 12, 2026
1bd344b
fix(ucns): validate object-form evidence before state replacement
erinepshovel-code Jul 12, 2026
89b8587
ci(ucns): prove bridge and certification evidence boundaries
erinepshovel-code Jul 12, 2026
b03866b
docs(ucns): document canonical bridge and certification evidence
erinepshovel-code Jul 12, 2026
356417f
docs(result): add UCNS factorization evidence compartment
erinepshovel-code Jul 12, 2026
a9e0413
docs(status): record canonical UCNS evidence completion
erinepshovel-code Jul 12, 2026
fc8e4f9
ci(diagnostic): capture base evidence regression
erinepshovel-code Jul 12, 2026
9be6eeb
test(ucns): expect pinned canonical install guidance
erinepshovel-code Jul 12, 2026
0adc057
ci(diagnostic): remove temporary base workflow
erinepshovel-code Jul 12, 2026
fb08e53
docs(ucns): document canonical serialized evidence completion
erinepshovel-code Jul 12, 2026
e08d8f1
docs(agent): reconcile canonical UCNS evidence boundary
erinepshovel-code Jul 12, 2026
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
48 changes: 35 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: python -m pytest -q tests/test_integrity.py

ucns-integration:
name: Actual UCNS adapter / pinned public surface
name: Actual UCNS bridge and certification evidence
runs-on: ubuntu-latest

steps:
Expand All @@ -79,30 +79,42 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -e ".[dev,ucns]"

- name: Run UCNS adapter contracts
- name: Run UCNS adapter and evidence contracts
run: |
python -m pytest -q \
tests/test_ucns_adapter.py \
tests/test_ucns_dependency.py \
tests/test_ucns_evidence_consumer.py \
tests/test_measurement.py \
tests/test_shared_stack_contract.py

- name: Prove actual object identity survives the EDCM path
- name: Prove canonical certified evidence survives the EDCM path
run: |
python - <<'PY'
from fractions import Fraction

import edcm
import ucns

obj = ucns.UCNSObject(1, 1, [(Fraction(0), None)], [0])
result = edcm.build_default_layers().run({"ucns_object": obj})
assert result["ucns_geometry"]["stable_hash"] == ucns.stable_hash(obj)
assert result["ucns_integration"]["ucns_object_attached"] is True
assert result["ucns_integration"]["ucns_theorem_status_attached"] is False
bridge = ucns.bridge_record(ucns.S2)
factorization = ucns.factorization_evidence(ucns.S2)
result = edcm.build_default_layers().run({
"transcript": "A: Preserve authoritative UCNS evidence.",
"ucns_bridge_record_json": bridge.to_json(),
"ucns_factorization_evidence_json": factorization.to_json(),
})
contract = result["edcm_result"]
assert result["ucns_geometry"]["stable_hash"] == ucns.stable_hash(ucns.S2)
assert result["ucns_geometry"]["bridge_evidence_digest"] == bridge.evidence_digest
assert result["ucns_integration"]["ucns_object_attached"] is False
assert result["ucns_integration"]["ucns_bridge_record_attached"] is True
assert result["ucns_integration"]["ucns_factorization_evidence_attached"] is True
assert result["ucns_integration"]["ucns_negative_certification_attached"] is True
assert result["ucns_integration"]["ucns_theorem_status_attached"] is True
assert result["metapat_integration"]["metapat_package_available"] is False
assert result["edcm_result"]["ucns_geometry_identity"]["stable_hash"] == ucns.stable_hash(obj)
assert result["edcm_result"]["status_evidence"]["proof_status_transfers_to_measurement_validity"] is False
assert contract["schema_version"] == "1.1.0"
assert contract["ucns_geometry_identity"]["stable_hash"] == bridge.object_hash
assert contract["ucns_factorization_evidence"]["evidence_digest"] == factorization.evidence_digest
assert contract["ucns_factorization_evidence"]["negative_result_certified"] is True
assert contract["status_evidence"]["proof_status_transfers_to_measurement_validity"] is False
PY

metapat-integration:
Expand Down Expand Up @@ -148,6 +160,7 @@ jobs:
assert result["ucns_integration"]["ucns_package_available"] is False
assert result["edcm_result"]["metapat_semantic_constraints"]["source_statements"] == envelope.source_statements
assert result["edcm_result"]["ucns_geometry_identity"]["state"] == "NA"
assert result["edcm_result"]["ucns_factorization_evidence"]["state"] == "NA"
assert result["edcm_result"]["status_evidence"]["semantic_labels_are_measurement_values"] is False
PY

Expand Down Expand Up @@ -176,10 +189,11 @@ jobs:
tests/test_metapat_adapter.py \
tests/test_ucns_adapter.py \
tests/test_ucns_dependency.py \
tests/test_ucns_evidence_consumer.py \
tests/test_measurement.py \
tests/test_shared_stack_contract.py

- name: Prove all identities remain separate
- name: Prove all identities and evidence states remain separate
run: |
python - <<'PY'
import edcm
Expand All @@ -199,8 +213,14 @@ jobs:
assert contract["metapat_semantic_constraints"]["canon_digest"] == envelope.canon_digest
assert contract["metapat_semantic_constraints"]["provenance_digest"] == envelope.provenance_digest
assert contract["ucns_geometry_identity"]["stable_hash"] == ucns.stable_hash(adaptation.ucns_object)
assert contract["ucns_geometry_identity"]["bridge_evidence_digest"]
assert contract["ucns_factorization_evidence"]["state"] == "NA"
assert contract["edcm_policy_manifest"]["manifest_hash"] == PolicyManifest().manifest_hash()
assert contract["readouts"]["state"] == "measured"
assert contract["status_evidence"]["ucns_bridge_record_attached"] is True
assert contract["status_evidence"]["ucns_factorization_evidence_attached"] is False
assert contract["status_evidence"]["ucns_negative_certification_attached"] is False
assert contract["status_evidence"]["ucns_theorem_status_attached"] is True
assert contract["status_evidence"]["proof_status_transfers_to_measurement_validity"] is False
assert contract["status_evidence"]["semantic_labels_are_measurement_values"] is False
PY
Expand Down Expand Up @@ -254,12 +274,14 @@ jobs:
assert callable(edcm.select_metapat_adapter)
assert callable(edcm.build_result_contract)
assert callable(edcm.run_integrity_gate)
assert hasattr(edcm, "UCNSFactorizationEvidenceRecord")
assert edcm.run_integrity_gate().passed is True
assert files("edcm.measurement.canon").joinpath("data", "markers_v1.json").is_file()
result = edcm.build_default_layers().run({"input": "wheel smoke"})
assert result["ucns_integration"]["ucns_package_available"] is False
assert result["metapat_integration"]["metapat_package_available"] is False
assert result["layer_provenance"]["measurement"]["canonical"] is True
assert result["edcm_result"]["readouts"]["state"] == "NA"
assert result["edcm_result"]["ucns_factorization_evidence"]["state"] == "NA"
print(f"edcm {edcm.__version__} wheel smoke passed")
PY
101 changes: 82 additions & 19 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ python -m build
python -m twine check dist/*
```

CI separately verifies base, integrity, UCNS-only, METAPAT-only, full shared-stack, and clean-wheel modes. The integrity gate must also pass from the installed wheel.
CI separately verifies base, integrity, UCNS evidence, METAPAT-only, full shared-stack, and clean-wheel modes. The integrity gate must also pass from the installed wheel.

## Integrity and source of truth

Expand Down Expand Up @@ -82,27 +82,67 @@ Preserve exact source statements, references, constraints, permitted interpretat

Direct absence of `metapat` is typed unavailability. Transitive import errors, missing producer surfaces, unsupported schemas, invalid provenance, unknown fields, and wrong envelope types remain visible failures.

## UCNS geometry
## Canonical UCNS geometry and status evidence

Do not look for or recreate `ucns.SemanticsLayer`. Consume actual:
EDCM owns the consumer adapter. UCNS owns the algebra, bridge-record schema, factorization policy, and certification evidence.

Consume only the actual producer surfaces:

```text
ucns.UCNSObject
ucns.object_record
ucns.stable_hash
ucns.CANONICAL_SERIALIZATION_VERSION
typed domain prerequisite metadata
ucns.UCNSBridgeRecord
ucns.UCNSFactorizationEvidence
ucns.bridge_record
ucns.BRIDGE_RECORD_SCHEMA_ID / VERSION
ucns.FACTORIZATION_EVIDENCE_SCHEMA_ID / VERSION
producer from_json / from_dict constructors
```

Accepted geometry keys are mutually exclusive:

```text
ucns_object
ucns_bridge_record
ucns_bridge_record_json
ucns_bridge_record_dict
```

A live object must be converted through `ucns.bridge_record()` so live and serialized geometry use one canonical identity path.

After geometry, accepted factorization-evidence keys are mutually exclusive:

```text
ucns_factorization_evidence
ucns_factorization_evidence_json
ucns_factorization_evidence_dict
```

The factorization record must bind to the same stable object hash as the geometry bridge record. A mismatch fails closed.

Independent status fields are:

```text
ucns_package_available
ucns_adapter_active
ucns_object_attached
ucns_bridge_record_attached
ucns_scope_metadata_attached
ucns_factorization_evidence_attached
ucns_negative_certification_attached
ucns_theorem_status_attached
```

Direct absence of `ucns` is typed geometry absence. Transitive import errors, missing public surfaces, unsupported schemas, malformed geometry, and non-`UCNSObject` values remain visible failures.
Package availability alone attaches nothing. A validated bridge record attaches typed UCNS domain/theorem-status evidence. Negative certification attaches only when a matching authoritative factorization record passes the UCNS producer policy and states `negative_result_certified = true`.

Package availability alone never implies object, scope, negative-certification, or theorem evidence attachment.
An attached uncertified result remains evidence while the negative-certification flag stays false. Unit-domain evidence never becomes a primality certification.

Direct absence of `ucns` is typed geometry absence. Transitive import failures, missing producer surfaces, unsupported schemas, malformed or coerced records, wrong object types, unknown fields, invalid digests, and geometry/evidence hash mismatch remain visible failures.

## Layer and result behavior

`build_default_layers(policy_manifest=None)` assembles:

1. composite semantics: independent METAPAT authority and UCNS geometry sublayers;
1. composite semantics: independent METAPAT authority and UCNS geometry/status-evidence sublayers;
2. canonical `edcm.measurement`;
3. canonical shared-stack composition;
4. canonical final result-contract delivery.
Expand All @@ -118,36 +158,48 @@ composition
delivery
```

Every supported pipeline result includes `edcm_result` with:
Every supported pipeline result includes `edcm_result` schema `edcm.shared-stack-result/1.1.0` with:

```text
source_evidence
metapat_semantic_constraints
ucns_geometry_identity
ucns_factorization_evidence
edcm_policy_manifest
implementation_provenance
readouts
status_evidence
unresolved_constraints
```

`epoch_identity` binds METAPAT canon/provenance, UCNS geometry, EDCM manifest, and implementation selection. `result_identity` additionally binds source evidence and readouts. Canon or manifest rotation must change epoch identity rather than mutating historical identity.
`epoch_identity` binds METAPAT canon/provenance, UCNS bridge geometry, EDCM manifest, and implementation selection. `result_identity` additionally binds source evidence, readouts, UCNS factorization evidence, and attachment states.

Factorization evidence changes result identity, not measurement epoch identity, because it is attached status evidence rather than readout-governing geometry or policy. Canon or manifest rotation must change epoch identity rather than mutating historical identity.

## Object and proof boundaries

`ConstraintField`, `FieldMotion`, metric axes, readouts, windows, and operator turns are EDCM objects constructed using UCNS geometry. They are not substitutes for `ucns.UCNSObject`.

Keep source evidence, METAPAT semantic authority, UCNS geometry identity, EDCM policy identity, and EDCM readouts separate.
Keep source evidence, METAPAT semantic authority, UCNS geometry identity, UCNS status/certification evidence, EDCM policy identity, and EDCM readouts separate.

UCNS equality does not imply EDCM measurement equivalence. UCNS or METAPAT theorem/domain/certification status is attached evidence only and never promotes EDCM empirical validity.

UCNS equality does not imply EDCM measurement equivalence. UCNS or METAPAT theorem/domain status is attached evidence only and never promotes EDCM empirical validity.
Every UCNS evidence view preserves:

```text
theorem_status_transfer = false
measurement_validity_claim = false
proof_status_transfers_to_measurement_validity = false
```

## Non-negotiable guardrails

- `NA != 0`.
- No-bone, empty-field, absent-adapter, and missing-context cases remain typed absence or `NA`.
- No-bone, empty-field, absent-adapter, missing-context, and absent-evidence cases remain typed absence or `NA`.
- Ordered windows compose with `SeqAppend`; never average testimony-bearing order.
- METAPAT semantic labels never become measured values merely by being named.
- Deterministic transcript metrics do not establish diagnosis, intent, consciousness, external truth, or root ontology.
- UCNS evidence digests establish content identity, not signed producer authentication.

These frontier gates remain non-operational until their named falsifiers and tests exist:

Expand All @@ -160,7 +212,19 @@ Do not replace `NotImplementedError` with constants, heuristics, language-model

## Testing expectations

Base tests pass without UCNS or METAPAT installed. Integration tests use actual pinned sibling packages. The full-stack fixture proves identity separation, deterministic measurement, `NA != 0`, fail-closed producer validation, canon/manifest epoch rotation, and no proof-status transfer.
Base tests pass without UCNS or METAPAT installed. Integration tests use actual pinned sibling packages.

The UCNS evidence suite must prove:

- live and serialized bridge records resolve the same stable identity;
- canonical producer constructors reject tampered, unknown, missing, coerced, or unsupported records;
- certified `S2` preserves exact search, catalogue coverage, pruning, scope, and evidence digest;
- incomplete-catalogue and unit-domain results remain uncertified;
- factorization evidence cannot attach without matching geometry;
- package availability alone attaches no evidence;
- certification never transfers to EDCM measurement validity.

The full-stack fixture proves identity separation, deterministic measurement, `NA != 0`, fail-closed producer validation, canon/manifest epoch rotation, and no proof-status transfer.

The integrity suite must include adversarial byte mutation, added/missing canon files, authority reversal, and no-fork identity checks.

Expand All @@ -179,9 +243,8 @@ Optional skips are explicit. Fake sibling implementations may test adversarial c

Still unresolved:

- official serialized UCNS bridge-record ingestion beyond live `UCNSObject` / `object_record`;
- validated negative-certification and theorem-status evidence envelopes;
- cryptographically signed UCNS producer or transport authentication;
- repo-local skill-lib installation and drift/msdmd CI gates;
- remaining historical L0/L1/L2/L3 split, P assignment, matrix wiring, bidirectional alerts, and Bridge-home decisions.

These unresolveds do not reopen measurement authority, semantic-authority ownership, integrity guarantees, or the proof-transfer firewall.
These unresolveds do not reopen measurement authority, semantic-authority ownership, canonical evidence schemas, certification policy, integrity guarantees, or the proof-transfer firewall.
Loading
Loading