From db5b7492bc5f8baec229347d22bd067bdbf4f951 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 13 Jul 2026 04:24:01 +0100 Subject: [PATCH] Remove presentation text closure authority --- epiphany-core/src/bin/epiphany-work.rs | 150 ++++-------------- ...onceptual-substitution-audit-2026-07-12.md | 13 ++ notes/epiphany-current-algorithmic-map.md | 1 + notes/fresh-workspace-handoff.md | 6 + state/ledgers.msgpack | Bin 474696 -> 475089 bytes state/map.yaml | 2 +- 6 files changed, 56 insertions(+), 116 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-work.rs b/epiphany-core/src/bin/epiphany-work.rs index 3e79faad..4913c19f 100644 --- a/epiphany-core/src/bin/epiphany-work.rs +++ b/epiphany-core/src/bin/epiphany-work.rs @@ -5763,6 +5763,15 @@ fn closure_family_assertions( } let safe_family = string_from_json(&plan_receipt, &["derivation", "safeActionFamily"]) .unwrap_or_else(|| "manual-or-unknown".to_string()); + let presentation_only = matches!( + safe_family.as_str(), + "repo.append_worklog" + | "repo.markdown_planning_note" + | "repo.checklist_note" + | "repo.markdown_managed_section" + | "repo.status_section" + | "repo.task_card" + ); let target_paths = first_plan_action(&plan_receipt) .map(|action| string_array_field(action, "changedPaths")) .unwrap_or_else(|| string_array_from_json(execute_receipt, &["changedPaths"])); @@ -5782,7 +5791,6 @@ fn closure_family_assertions( .or_else(|| string_from_json(&plan_receipt, &["objective"])) .unwrap_or_else(|| item.to_string()); let compact_summary = compact_line(&summary); - let item_slug = sanitize(item); let committed_content = read_committed_file(workspace, commit_sha, &target_path)?; let mut assertions = Vec::new(); push_assertion( @@ -5793,122 +5801,17 @@ fn closure_family_assertions( ); let content = committed_content.unwrap_or_default(); match safe_family.as_str() { - "repo.append_worklog" => { + "repo.append_worklog" + | "repo.markdown_planning_note" + | "repo.checklist_note" + | "repo.markdown_managed_section" + | "repo.status_section" + | "repo.task_card" => { push_assertion( &mut assertions, - "worklog-summary-present", - content.contains(&compact_summary), - "Committed worklog contains the accepted pressure summary.".to_string(), - ); - } - "repo.markdown_planning_note" => { - push_assertion( - &mut assertions, - "planning-summary-present", - content.contains(&compact_summary), - "Committed planning note contains the accepted pressure summary.".to_string(), - ); - push_assertion( - &mut assertions, - "planning-authority-seal-present", - content.contains("Authority seal"), - "Committed planning note carries an authority seal.".to_string(), - ); - } - "repo.checklist_note" => { - push_assertion( - &mut assertions, - "checklist-summary-present", - content.contains(&compact_summary), - "Committed checklist contains the accepted pressure summary.".to_string(), - ); - push_assertion( - &mut assertions, - "checklist-items-present", - content.contains("- [ ]"), - "Committed checklist carries branch-local checklist items.".to_string(), - ); - push_assertion( - &mut assertions, - "checklist-authority-present", - content.contains("Authority"), - "Committed checklist carries an authority section.".to_string(), - ); - } - "repo.markdown_managed_section" => { - let start_marker = format!(""); - let end_marker = format!(""); - push_assertion( - &mut assertions, - "managed-section-start-marker", - content.contains(&start_marker), - "Committed managed section contains its start marker.".to_string(), - ); - push_assertion( - &mut assertions, - "managed-section-end-marker", - content.contains(&end_marker), - "Committed managed section contains its end marker.".to_string(), - ); - push_assertion( - &mut assertions, - "managed-section-summary-present", - content.contains(&compact_summary), - "Committed managed section contains the accepted pressure summary.".to_string(), - ); - } - "repo.status_section" => { - let start_marker = format!(""); - let end_marker = format!(""); - push_assertion( - &mut assertions, - "status-section-start-marker", - content.contains(&start_marker), - "Committed repo status section contains its start marker.".to_string(), - ); - push_assertion( - &mut assertions, - "status-section-end-marker", - content.contains(&end_marker), - "Committed repo status section contains its end marker.".to_string(), - ); - push_assertion( - &mut assertions, - "status-section-summary-present", - content.contains(&compact_summary), - "Committed repo status section contains the accepted pressure summary.".to_string(), - ); - push_assertion( - &mut assertions, - "status-section-private-seal", - content.contains("Private state exposed: false"), - "Committed repo status section preserves the private-state seal.".to_string(), - ); - } - "repo.task_card" => { - push_assertion( - &mut assertions, - "task-card-schema-present", - content.contains("schema_version = \"epiphany.repo_work_task_card.v0\""), - "Committed task card carries the task-card schema version.".to_string(), - ); - push_assertion( - &mut assertions, - "task-card-family-present", - content.contains("safe_action_family = \"repo.task_card\""), - "Committed task card carries the task-card safe family.".to_string(), - ); - push_assertion( - &mut assertions, - "task-card-summary-present", - content.contains(&compact_summary), - "Committed task card contains the accepted pressure summary.".to_string(), - ); - push_assertion( - &mut assertions, - "task-card-private-seal", - content.contains("private_state_exposed = false"), - "Committed task card preserves the private-state seal.".to_string(), + "presentation-only-family", + true, + "Presentation formatting carries no closure authority; committed target/path evidence remains authoritative.".to_string(), ); } "repo.tool_request" => { @@ -7578,6 +7481,7 @@ fn closure_family_assertions( json!({ "status": if passed { "passed" } else { "failed" }, "safeActionFamily": safe_family, + "presentationOnly": presentation_only, "targetPath": target_path, "planReceiptPath": plan_receipt_path, "assertions": assertions @@ -13970,6 +13874,22 @@ idunn_deployment_authority_required = true } } + #[test] + fn closure_has_no_substring_authority() { + let source = include_str!("epiphany-work.rs"); + let start = source + .find("fn closure_family_assertions(") + .expect("closure start"); + let end = source[start..] + .find("fn push_assertion(") + .map(|offset| start + offset) + .expect("closure end"); + assert!( + !source[start..end].contains("content.contains"), + "closure regained presentation substring authority" + ); + } + #[test] fn collaboration_policy_generator_owns_its_proposal_fields() { let receipt = json!({"feedback": {"candidateActionRefs": [], "publicDiscussionRefs": []}}); diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index bee02ae3..c81250b9 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -1245,6 +1245,19 @@ All remaining substring-backed families are presentation-only. Direct source inventory is 17 occurrences across worklog, planning/checklist notes, managed/status sections, and task cards. +## Presentation formatting as Soul closure truth + +The final six families checked summaries, headings, markers, checkboxes, and +TOML labels with substring assertions. Those are renderer/content concerns, +not authority. Common closure already proves the recorded target blob exists at +the claimed commit and path. The six branches are collapsed into an explicit +`presentationOnly=true` classification; formatting carries no closure +authority. A whole-function regression test proves `closure_family_assertions` +contains zero `content.contains` calls. + +The closure conceptual-substitution pass is complete: zero substring authority +remains in closure. + The same inspection found 33 consecutive duplicate `#[cfg(test)]` attributes on provider constructors/writers and their re-exports. One gate already makes each item test-only; the second owned nothing. The duplicates are removed. diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 3f29b1ee..59c202ee 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -57,6 +57,7 @@ - The deterministic `repo.tool_capabilities` and `repo.eve_surface` safe families are deleted. Expected tool ids and invented surface/row/lowering catalogs cannot substitute for host advertisements or provider-published composition graphs. Live paths are typed tool requests/host receipts, Odin discovery, Eve connection receipts, and provider-owned publication. - `repo.body_manifest` is deleted. An unconsumed `epiphany.toml` that invents Body/Verse/Eve identity and capability hints is not observed runtime state or admitted birth configuration. Runtime state, repo birth receipts, and provider advertisements own those facts. - Doctrine update requests split authority: Imagination authors, Self routes, Maintainer reviews, Soul verifies, Mind admits doctrine state, and Hands mutates `AGENTS.md` under receipts. There is no Maintainer/Mind composite owner or OR gate. +- Closure has no substring authority. Worklog, planning/checklist notes, managed/status sections, and task cards are explicitly presentation-only; closure relies on committed target/path/blob evidence instead of treating formatting text as Soul truth. - `repo.planning_brief` is deleted. It contained no candidate work-item records and let copied global catalog/schema/closure constants self-attest as per-item planning and readiness evidence. The live preparation chain is consensus draft -> interpretation request -> objective draft -> Mind adoption. - There is no aggregate repo-swarm MVP gate. The former smoke manually aggregated fixture summaries into green rows and `demoReady=true`; it and its wrapper are deleted. Whole-organism readiness requires a live-fire path whose claimed consequences are observed at their owning boundaries. - Persona owner: `collaboration-feedback` writes public, bounded feedback only after that provider receipt exists. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 52fc9619..dba43a1a 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -412,6 +412,12 @@ doctrine state, and Hands mutates `AGENTS.md` under receipts. Typed operations closure and a counterfeit-Hands fixture protect the chain. The remaining source inventory is 17 occurrences across six presentation families. +The six presentation families are now explicitly `presentationOnly=true` and +share no formatting assertions. Common commit/path/blob evidence remains the +closure proof; summaries, headings, markers, and checkboxes no longer +impersonate Soul authority. A whole-function regression test proves zero +`content.contains` calls remain in closure. + Consensus Brief keeps its honest draft/unconverged semantics but no longer proves them with substring presence. Preparation owns its typed consensus, Imagination route, inputs, authority, and privacy closure; a malicious comment diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 3563d1bb31938e00ccb651596199e7fcf21493ec..baf8ea4353ef0ffd4bae7ee608b814c1aadb0cf6 100644 GIT binary patch delta 400 zcmYk1ze)o^5Qn{}3EGJ^VvqsrOD-2Rkf4nZApQZ-CTuQq$->_5Wp^(oHYqH801at< z0ufS(FCezIK1)DnuhHVi6f^V9H=m30*H8I%+gsmn2Eon8Qt9|*zUK`*&)iQ757UB2 zadnxpLRqC0-=>AqytVc89tPo|A2j@0{W7RGLt;F#@14o@iAqv|7P}A$WipKrDH&mE zGbVhKb&TaUvs_6?Gu^`qT<{UZN+--(E_=R`Vhk}$xZr4j(LRn+!6R-V)o4&!=C)61 z?8xd2Tf|Qi!nwjHwwf~AuXcp$01kN<={BfaY5waN9AvIhfpbjMkX&OfnSfdYazjlb zz>GodPMHc^^_4(B&SaFEYwVGVaZgw@PK+S=gD`{G8Q#YWon