Remove presentation text closure authority
This commit is contained in:
parent
e48e2ad521
commit
db5b7492bc
6 changed files with 56 additions and 116 deletions
|
|
@ -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!("<!-- epiphany-section:{item_slug}:start -->");
|
||||
let end_marker = format!("<!-- epiphany-section:{item_slug}:end -->");
|
||||
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!("<!-- epiphany-status:{item_slug}:start -->");
|
||||
let end_marker = format!("<!-- epiphany-status:{item_slug}:end -->");
|
||||
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": []}});
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -660,4 +660,4 @@ current_status:
|
|||
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
|
||||
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
|
||||
last_completed_repo_swarm_cut: Huginn live-fire has crossed the first real repo Body from Persona pressure to branch-local Hands commit and Soul/Mind closure, and now has repeatable closure and redacted-public-proof mouths. On `E:\Projects\Huginn` branch `epiphany/huginn/first-awakening`, `tools/epiphany_local_run.ps1 -Mode repo-persona-intake` accepted item `huginn-inspection-readback-livefire`, Weksa/Persona intake remained sealed, and `epiphany-work derive-plan` lowered it to model-authored safe family `repo.status_section` for `README.md` only. `tools/epiphany_local_run.ps1 -Mode repo-swarm-run` advanced four bounded pulses: run-from-plan, adopt-from-plan, execute-from-plan, and close-from-execute. Huginn commit `e9b07c38fceabbdc89ea35c2156326c80c0393a2` updated only `README.md`; closure receipt `.epiphany\work\work-close-huginn-inspection-readback-livefire.json` records status `closed`, Soul verdict `passed`, Mind state commit `repo-work-close-huginn-inspection-readback-livefire-mind-commit`, safe family `repo.status_section`, path scope `README.md`, Bifrost publication gate, and `privateStateExposed=false`. Verification also ran Huginn's TypeScript compiler through concrete Node path: `C:\Program Files\nodejs\node.exe E:\Projects\Huginn\node_modules\typescript\bin\tsc -p tsconfig.json` passed. Native verifier `epiphany-repo-livefire-closure-smoke --workspace E:\Projects\Huginn --item huginn-inspection-readback-livefire --expected-path README.md --expected-family repo.status_section --expected-gate awaiting-publication --expected-blocker bifrost-publication-missing` checks closure receipt, Mind map entry, overview gate/blocker, authority seals, and `git show` changed paths, returning `status=ok`, `soulVerdict=passed`, `publicationGate=Bifrost`, and `privateStateExposed=false`. Wrapper `tools/epiphany_local_run.ps1 -Mode repo-livefire-closure -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exposes the same read-only proof through the local operator mouth; artifact `local-20260621-190156-803-2f85ba15` printed commit, path, gate, blocker, Soul verdict, Mind commit receipt, and `privateStateExposed=False` without push, merge, publication, or target mutation. New wrapper `tools/epiphany_local_run.ps1 -Mode repo-work-public-proof -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exports the redacted proof bundle and repo-local Verse index without publishing; artifact `local-20260621-190645-345-4555b1dc` wrote `.epiphany\public\proof-bundles\repo-work-public-proof-huginn-inspection-readback-livefire.json`, proof id `repo-work-public-proof-huginn-inspection-readback-livefire`, SHA-256 `857545b199f3e37eb06c2e757e5cfc201958e46667bb1f8403fd333a22620f63`, nine artifact rows, zero publication rows, and `privateStateExposed=False`. swarm overview readback `local-20260621-190701-140-b9519ec6` sees the `REPO-WORK-PUBLIC-PROOF` row and action row from Huginn's repo-local Verse with the same SHA-256 while Bifrost publication remains missing. Launcher compact modes are now named compact operator-context modes instead of read-only modes, and `bifrost-public-proof` summaries print item, target public Verse, room, proof SHA-256, review receipts, and credit receipts so publication receipts are auditable without claiming upstream sync.
|
||||
next_action: Finish the closure conceptual-substitution pass. Doctrine requests now split Imagination authoring, Self routing, Maintainer review, Soul verification, Mind admission, and Hands mutation; no composite owner or OR gate remains. Every consequence-bearing closure family is typed or deleted. Direct source inventory is 17 content.contains occurrences across six presentation-only families: worklog, planning/checklist notes, managed/status sections, and task cards. Classify these explicitly as presentation-only and either type their small structural contracts or remove closure assertions that pretend presentation text is authority. Then audit beyond closure for remaining borrowed-owner strings and false provider mirrors.
|
||||
next_action: Continue the conceptual-substitution audit beyond closure. closure_family_assertions now contains zero content.contains calls; consequence-bearing families are typed or deleted, while worklog/notes/sections/task cards are explicitly presentationOnly and rely on common committed target/path/blob evidence. The whole-function regression test forbids substring authority from returning. Next scan the rest of epiphany-work and adjacent operator projections for composite owner labels, requested-versus-live provider claims, renderer names leaking upstream, and readbacks that self-attest from copied constants.
|
||||
|
|
|
|||
Reference in a new issue