Correct interpreter brief ownership

This commit is contained in:
Meta Vens 2026-07-13 03:48:10 +01:00
commit 27689867d6
9 changed files with 228 additions and 72 deletions

View file

@ -206,9 +206,10 @@ fn run_smoke(args: Args) -> Result<Value> {
"safe_action_family = \"repo.interpreter_brief\"",
)?;
require_text(&brief_text, "[interpreter]")?;
require_text(&brief_text, "status = \"draft\"")?;
require_text(&brief_text, "owner = \"Mind\"")?;
require_text(&brief_text, "source = \"Imagination\"")?;
require_text(&brief_text, "status = \"awaiting-mind-interpretation\"")?;
require_text(&brief_text, "authoring_owner = \"Imagination\"")?;
require_text(&brief_text, "requested_interpreter = \"Mind\"")?;
require_text(&brief_text, "interpretation_admitted = false")?;
require_text(
&brief_text,
"purpose = \"public-pressure-to-action-semantics\"",

View file

@ -3767,9 +3767,10 @@ fn derive_repo_interpreter_brief_plan(
String::new(),
"[interpreter]".to_string(),
format!("id = {}", toml_basic_string(&brief_id)),
"status = \"draft\"".to_string(),
"owner = \"Mind\"".to_string(),
"source = \"Imagination\"".to_string(),
"status = \"awaiting-mind-interpretation\"".to_string(),
"authoring_owner = \"Imagination\"".to_string(),
"requested_interpreter = \"Mind\"".to_string(),
"interpretation_admitted = false".to_string(),
"purpose = \"public-pressure-to-action-semantics\"".to_string(),
"requires_consensus_readback = true".to_string(),
"requires_safe_family_choice = true".to_string(),
@ -3836,13 +3837,13 @@ fn derive_repo_interpreter_brief_plan(
"[verification]".to_string(),
"asks = [".to_string(),
" \"Soul verifies the interpreter brief path changed and contains the accepted pressure summary.\",".to_string(),
" \"Soul verifies Mind owns interpretation while candidate actions remain non-authoritative.\",".to_string(),
" \"Soul verifies Imagination authored a non-authoritative request for Mind interpretation.\",".to_string(),
" \"Soul verifies semantic checks, required gates, and authority denials are present.\",".to_string(),
" \"Soul verifies no paths outside the declared interpreter brief changed.\"".to_string(),
"]".to_string(),
String::new(),
"[rollback]".to_string(),
"hints = [\"Remove the interpreter brief if Mind misread Imagination consensus or the semantic checks are incomplete.\"]".to_string(),
"hints = [\"Remove the interpreter brief if Imagination misrepresented the consensus or the semantic checks are incomplete.\"]".to_string(),
String::new(),
];
let command = powershell_set_lines_command(&target_path, &lines);
@ -3850,7 +3851,7 @@ fn derive_repo_interpreter_brief_plan(
safe_action_family: "repo.interpreter_brief".to_string(),
target_path,
plan_summary: format!(
"Mind derived a repo interpreter brief from accepted {} pressure.",
"Imagination derived a request for Mind interpretation from accepted {} pressure.",
input.source
),
command,
@ -3861,7 +3862,7 @@ fn derive_repo_interpreter_brief_plan(
"Soul verifies no paths outside the declared interpreter brief changed.".to_string(),
],
rollback_hints: vec![
"Remove the generated interpreter brief if Mind misinterpreted Imagination consensus.".to_string(),
"Remove the generated interpreter brief if Imagination misrepresented the consensus.".to_string(),
],
derivation: plan_derivation_receipt(input, action_family, "repo.interpreter_brief"),
})
@ -7142,114 +7143,77 @@ fn closure_family_assertions(
safe_family_planning = planning_brief_safe_family_readback(&content);
}
"repo.interpreter_brief" => {
let brief = parse_repo_interpreter_brief(&content).ok();
push_assertion(
&mut assertions,
"interpreter-brief-schema-present",
content.contains("schema_version = \"epiphany.repo_interpreter_brief.v0\""),
brief
.as_ref()
.is_some_and(RepoInterpreterBrief::has_canonical_identity),
"Committed interpreter brief carries the schema version.".to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-family-present",
content.contains("safe_action_family = \"repo.interpreter_brief\""),
brief
.as_ref()
.is_some_and(RepoInterpreterBrief::has_canonical_identity),
"Committed interpreter brief carries the safe action family.".to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-summary-present",
content.contains(&compact_summary),
brief
.as_ref()
.is_some_and(|value| value.summary == compact_summary),
"Committed interpreter brief contains the accepted pressure summary.".to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-draft-state",
content.contains("[interpreter]")
&& content.contains("status = \"draft\"")
&& content.contains("owner = \"Mind\"")
&& content.contains("source = \"Imagination\"")
&& content.contains("purpose = \"public-pressure-to-action-semantics\"")
&& content.contains("requires_consensus_readback = true")
&& content.contains("requires_safe_family_choice = true")
&& content.contains("requires_requested_paths = true")
&& content.contains("requires_verification_asks = true")
&& content.contains("requires_evidence_needs = true")
&& content.contains("candidate_actions_non_authoritative = true"),
"Committed interpreter brief stays draft, Mind-owned, and non-authoritative."
brief.as_ref().is_some_and(RepoInterpreterBrief::is_imagination_request_for_mind),
"Committed interpreter brief remains an Imagination-authored request for Mind interpretation."
.to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-semantic-checks",
content.contains("[semantic_checks]")
&& content.contains("intent_summary_required = true")
&& content.contains("scope_boundary_required = true")
&& content.contains("requested_paths_required = true")
&& content.contains("verification_required = true")
&& content.contains("evidence_required = true")
&& content.contains("rollback_required = true")
&& content.contains("non_goals_required = true")
&& content.contains("open_questions_required = true")
&& content.contains("consensus_alignment_required = true"),
brief
.as_ref()
.is_some_and(RepoInterpreterBrief::has_semantic_checks),
"Committed interpreter brief names semantic checks before action adoption."
.to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-allowed-outputs",
content.contains("[allowed_outputs]")
&& content.contains("\"repo.consensus_brief\"")
&& content.contains("\"repo.objective_draft\"")
&& content.contains("\"repo.adoption_request\"")
&& content.contains("\"repo.work_order\"")
&& content.contains("\"repo.verification_request\"")
&& content.contains("\"repo.publication_request\"")
&& content.contains("may_request_replanning = true")
&& content.contains("may_request_more_consensus = true")
&& content.contains("may_adopt_objective = false")
&& content.contains("may_schedule_work = false")
&& content.contains("may_touch_substrate = false")
&& content.contains("may_publish = false")
&& content.contains("may_deploy = false"),
brief.as_ref().is_some_and(RepoInterpreterBrief::has_allowed_outputs),
"Committed interpreter brief limits outputs to candidate families or more planning."
.to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-gates",
content.contains("[required_gates]")
&& content.contains("imagination_consensus_required = true")
&& content.contains("mind_review_required = true")
&& content.contains("soul_source_grounding_required = true")
&& content.contains("bifrost_publication_review_required = true")
&& content.contains("hands_receipt_required_before_state_change = true")
&& content.contains("substrate_receipt_required_before_mutation = true")
&& content.contains("idunn_receipt_required_before_deployment = true"),
brief.as_ref().is_some_and(RepoInterpreterBrief::has_required_gates),
"Committed interpreter brief names consensus, Mind, Soul, Bifrost, Hands, Substrate, and Idunn gates."
.to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-authority-seals",
content.contains("[authority]")
&& content.contains("direct_state_commit_authorized = false")
&& content.contains("objective_adoption_authorized = false")
&& content.contains("self_scheduling_authorized = false")
&& content.contains("substrate_access_authorized = false")
&& content.contains("hands_action_authorized = false")
&& content.contains("shell_command_authorized = false")
&& content.contains("commit_authorized = false")
&& content.contains("publication_authorized = false")
&& content.contains("deployment_execution_authority = false")
&& content.contains("cross_body_mutation_authorized = false"),
brief.as_ref().is_some_and(RepoInterpreterBrief::has_authority_seals),
"Committed interpreter brief denies state/adoption/scheduling/substrate/action/shell/commit/publication/deployment/cross-body authority."
.to_string(),
);
push_assertion(
&mut assertions,
"interpreter-brief-private-seal",
content.contains("private_state_exposed = false")
&& content.contains("private_worker_transcripts_allowed = false")
&& content.contains("raw_result_payloads_allowed = false"),
brief
.as_ref()
.is_some_and(|value| !value.private_state_exposed)
&& brief
.as_ref()
.is_some_and(RepoInterpreterBrief::has_authority_seals),
"Committed interpreter brief preserves private-state and transcript seals."
.to_string(),
);
@ -15281,6 +15245,7 @@ idunn_deployment_authority_required = true
"repo.sync_request",
"repo.pr_request",
"repo.maintainer_review_request",
"repo.interpreter_brief",
"repo.objective_draft",
"repo.adoption_request",
"repo.scheduling_request",

View file

@ -1,3 +1,132 @@
#[derive(Debug, Deserialize)]
pub(super) struct RepoInterpreterBrief {
pub(super) schema_version: String,
pub(super) safe_action_family: String,
pub(super) summary: String,
pub(super) private_state_exposed: bool,
interpreter: RepoInterpreterRequest,
semantic_checks: std::collections::BTreeMap<String, bool>,
allowed_outputs: RepoInterpreterOutputs,
required_gates: std::collections::BTreeMap<String, bool>,
authority: std::collections::BTreeMap<String, bool>,
}
impl RepoInterpreterBrief {
pub(super) fn has_canonical_identity(&self) -> bool {
self.schema_version == "epiphany.repo_interpreter_brief.v0"
&& self.safe_action_family == "repo.interpreter_brief"
}
pub(super) fn is_imagination_request_for_mind(&self) -> bool {
let i = &self.interpreter;
i.status == "awaiting-mind-interpretation"
&& i.authoring_owner == "Imagination"
&& i.requested_interpreter == "Mind"
&& !i.interpretation_admitted
&& i.purpose == "public-pressure-to-action-semantics"
&& i.requires_consensus_readback
&& i.requires_safe_family_choice
&& i.requires_requested_paths
&& i.requires_verification_asks
&& i.requires_evidence_needs
&& i.candidate_actions_non_authoritative
}
pub(super) fn has_semantic_checks(&self) -> bool {
[
"intent_summary_required",
"scope_boundary_required",
"requested_paths_required",
"verification_required",
"evidence_required",
"rollback_required",
"non_goals_required",
"open_questions_required",
"consensus_alignment_required",
]
.iter()
.all(|key| self.semantic_checks.get(*key) == Some(&true))
}
pub(super) fn has_allowed_outputs(&self) -> bool {
let o = &self.allowed_outputs;
o.candidate_safe_families
== [
"repo.consensus_brief",
"repo.objective_draft",
"repo.adoption_request",
"repo.work_order",
"repo.verification_request",
"repo.publication_request",
]
&& o.may_request_replanning
&& o.may_request_more_consensus
&& !o.may_adopt_objective
&& !o.may_schedule_work
&& !o.may_touch_substrate
&& !o.may_publish
&& !o.may_deploy
}
pub(super) fn has_required_gates(&self) -> bool {
[
"imagination_consensus_required",
"mind_review_required",
"soul_source_grounding_required",
"bifrost_publication_review_required",
"hands_receipt_required_before_state_change",
"substrate_receipt_required_before_mutation",
"idunn_receipt_required_before_deployment",
]
.iter()
.all(|key| self.required_gates.get(*key) == Some(&true))
}
pub(super) fn has_authority_seals(&self) -> bool {
[
"direct_state_commit_authorized",
"objective_adoption_authorized",
"self_scheduling_authorized",
"substrate_access_authorized",
"hands_action_authorized",
"shell_command_authorized",
"commit_authorized",
"publication_authorized",
"deployment_execution_authority",
"cross_body_mutation_authorized",
"private_worker_transcripts_allowed",
"raw_result_payloads_allowed",
"private_state_exposed",
]
.iter()
.all(|key| self.authority.get(*key) == Some(&false))
}
}
#[derive(Debug, Deserialize)]
struct RepoInterpreterRequest {
status: String,
authoring_owner: String,
requested_interpreter: String,
interpretation_admitted: bool,
purpose: String,
requires_consensus_readback: bool,
requires_safe_family_choice: bool,
requires_requested_paths: bool,
requires_verification_asks: bool,
requires_evidence_needs: bool,
candidate_actions_non_authoritative: bool,
}
#[derive(Debug, Deserialize)]
struct RepoInterpreterOutputs {
candidate_safe_families: Vec<String>,
may_request_replanning: bool,
may_request_more_consensus: bool,
may_adopt_objective: bool,
may_schedule_work: bool,
may_touch_substrate: bool,
may_publish: bool,
may_deploy: bool,
}
pub(super) fn parse_repo_interpreter_brief(text: &str) -> Result<RepoInterpreterBrief> {
toml::from_str(text).context("interpreter brief is not valid typed TOML")
}
#[derive(Debug, Deserialize)]
pub(super) struct RepoObjectiveDraft {
pub(super) schema_version: String,

View file

@ -2,6 +2,44 @@
mod preparation_tests {
use super::*;
#[test]
fn interpreter_comment_cannot_counterfeit_state_authority_seal() {
let text = r#"
schema_version = "epiphany.repo_interpreter_brief.v0"
safe_action_family = "repo.interpreter_brief"
summary = "summary"
private_state_exposed = false
[interpreter]
status = "awaiting-mind-interpretation"
authoring_owner = "Imagination"
requested_interpreter = "Mind"
interpretation_admitted = false
purpose = "public-pressure-to-action-semantics"
requires_consensus_readback = true
requires_safe_family_choice = true
requires_requested_paths = true
requires_verification_asks = true
requires_evidence_needs = true
candidate_actions_non_authoritative = true
[semantic_checks]
[allowed_outputs]
candidate_safe_families = []
may_request_replanning = false
may_request_more_consensus = false
may_adopt_objective = false
may_schedule_work = false
may_touch_substrate = false
may_publish = false
may_deploy = false
[required_gates]
[authority]
# direct_state_commit_authorized = false
direct_state_commit_authorized = true
"#;
let brief = parse_repo_interpreter_brief(text).expect("fixture is typed TOML");
assert!(!brief.has_authority_seals());
}
#[test]
fn objective_draft_comment_cannot_counterfeit_adoption_seal() {
let text = r#"

View file

@ -1105,6 +1105,20 @@ and privacy field replace substring recognition.
Eighteen high-authority closure families are typed. Direct source inventory now
reports 363 substring occurrences across fifteen remaining families.
## Imagination output as Mind-owned interpretation
`derive_repo_interpreter_brief_plan` is deterministic safe-family lowering from
accepted Persona/Imagination pressure, yet the emitted document said
`owner = "Mind"` and the plan summary claimed Mind derived it. Mind had not
acted. The artifact now states its real authority: Imagination authored a
non-authoritative request, Mind is the requested interpreter, and
`interpretation_admitted = false`. Preparation owns the typed closure. Its
negative fixture prevents comments from counterfeiting state authority, while
the class guard prevents the family returning to substring truth.
Nineteen high-authority closure families are typed. Direct source inventory now
reports 303 substring occurrences across fourteen remaining families.
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.

View file

@ -52,6 +52,7 @@
- Idunn deployment and aftercare outcomes have no local production writer. The synthetic deployment-config family smoke and its green aggregate MVP-gate handoff are deleted; config audit/runbook remain pre-deployment surfaces, while typed Idunn readers await genuine daemon-authored ingest.
- Bifrost artifact-acceptance and metrics requests remain open until actual Bifrost/Maintainer receipts are ingested. The stale response-closing request-family smokes, accounting bundle, wrapper mode, and aggregate green gate are deleted.
- Repo-work readiness reports are sight only. The generic readiness-review approval command and writer are deleted because one caller supplied four unresolved reviewer labels. `repo.readiness_review_request` now assigns routing to Self, lists Maintainer/Soul/Mind/Bifrost as independent required reviewers, and names no readiness-approval owner; typed review readers await genuine multi-organ/provider evidence.
- Interpreter Brief is preparation cargo authored by Imagination from accepted public pressure. It requests Mind interpretation and remains `interpretation_admitted=false`; it is not Mind-owned state until a genuine Mind path supplies and admits interpretation evidence.
- 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.
- Imagination owner: consensus participant selection, packet reference, receipt status/id, and adoption gate.

View file

@ -360,6 +360,14 @@ governance closure and a counterfeit-approval fixture protect that boundary.
Eighteen high-authority families are typed; direct source inventory reports 363
substring occurrences across fifteen remaining families.
Interpreter Brief no longer steals Mind's name. Deterministic Imagination
lowering now emits an Imagination-authored request for Mind interpretation with
`interpretation_admitted=false`; it does not claim Mind authored or owns an
interpretation that Mind never produced. Preparation owns its typed closure and
counterfeit-state-authority fixture. Nineteen high-authority families are typed;
direct source inventory reports 303 substring occurrences across fourteen
remaining families.
The latest structural count is 32 closure family branches, 744 remaining
substring assertions in the closure region, and 1,284 lines in
`closure_contracts.rs`. Do not blindly generate a struct forest for every

Binary file not shown.

View file

@ -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: Continue the conceptual-substitution pass. Eighteen high-authority closure families are typed and guarded. Direct source inventory reports 363 content.contains occurrences across fifteen remaining families. Workflow owns adoption, scheduling, work-order, and verification; preparation owns Objective Draft. Readiness review no longer has a composite owner: Self routes independent Maintainer/Soul/Mind/Bifrost review requests, readiness_approval_owner is none, and no local aggregate may mint approval. Next map collaboration/preparation cargo, especially planning and interpreter briefs, before selecting another authority cut. External governance should converge on tooling plus publication/accounting; operations retains policy/deployment. Provider chronology is explicitly external and guarded as arrival order. Continue auditing evidence/security mirrors and adapters for borrowed authority.
next_action: Continue the conceptual-substitution pass. Nineteen high-authority closure families are typed and guarded. Direct source inventory reports 303 content.contains occurrences across fourteen remaining families. Workflow owns adoption, scheduling, work-order, and verification. Preparation owns Objective Draft and Interpreter Brief; the latter is now honestly Imagination-authored request cargo awaiting Mind interpretation, not fake Mind-owned state. Readiness routing remains Self-owned with independent reviewers and no local approval owner. Next map consensus and planning brief authority before another preparation cut. External governance should converge on tooling plus publication/accounting; operations retains policy/deployment. Provider chronology is explicitly external and guarded as arrival order. Continue auditing evidence/security mirrors and adapters for borrowed authority.