diff --git a/epiphany-core/src/bin/epiphany-hands-action-smoke.rs b/epiphany-core/src/bin/epiphany-hands-action-smoke.rs index 64ac6e31..cead182d 100644 --- a/epiphany-core/src/bin/epiphany-hands-action-smoke.rs +++ b/epiphany-core/src/bin/epiphany-hands-action-smoke.rs @@ -6,20 +6,17 @@ use epiphany_core::hands_action_review_for_intent; use epiphany_core::hands_command_receipt_for_review; use epiphany_core::hands_commit_receipt_for_review; use epiphany_core::hands_patch_receipt_for_review; -use epiphany_core::hands_pr_receipt_for_review; use epiphany_core::initialize_runtime_spine; use epiphany_core::put_hands_action_intent; use epiphany_core::put_hands_action_review; use epiphany_core::put_hands_command_receipt; use epiphany_core::put_hands_commit_receipt; use epiphany_core::put_hands_patch_receipt; -use epiphany_core::put_hands_pr_receipt; use epiphany_core::runtime_hands_action_intent; use epiphany_core::runtime_hands_action_review; use epiphany_core::runtime_hands_command_receipt; use epiphany_core::runtime_hands_commit_receipt; use epiphany_core::runtime_hands_patch_receipt; -use epiphany_core::runtime_hands_pr_receipt; use serde_json::json; use std::path::PathBuf; @@ -105,20 +102,6 @@ fn main() -> Result<()> { ); put_hands_commit_receipt(&store, &commit)?; - let pr = hands_pr_receipt_for_review( - "hands-pr-smoke".to_string(), - &intent, - &review, - &commit, - "https://github.com/GameCult/EpiphanyAgent/pull/smoke".to_string(), - "smoke".to_string(), - "Smoke Hands PR publication receipt".to_string(), - "bifrost-publication-receipt-smoke".to_string(), - "Recorded a typed PR receipt shape for Bifrost-blessed GitHub publication.".to_string(), - "2026-06-02T00:01:00Z".to_string(), - ); - put_hands_pr_receipt(&store, &pr)?; - let stored_intent = runtime_hands_action_intent(&store, "hands-intent-smoke")?.expect("stored Hands intent"); let stored_review = @@ -129,7 +112,6 @@ fn main() -> Result<()> { .expect("stored Hands command"); let stored_commit = runtime_hands_commit_receipt(&store, "hands-commit-smoke")?.expect("stored Hands commit"); - let stored_pr = runtime_hands_pr_receipt(&store, "hands-pr-smoke")?.expect("stored Hands PR"); if stored_review.intent_id != stored_intent.intent_id { anyhow::bail!("Hands review lost its intent edge"); @@ -149,13 +131,6 @@ fn main() -> Result<()> { { anyhow::bail!("Hands commit receipt lost its intent/review edge"); } - if stored_pr.intent_id != stored_intent.intent_id - || stored_pr.review_id != stored_review.review_id - || stored_pr.commit_receipt_id != stored_commit.receipt_id - { - anyhow::bail!("Hands PR receipt lost its intent/review/commit edge"); - } - println!( "{}", serde_json::to_string_pretty(&json!({ @@ -166,8 +141,6 @@ fn main() -> Result<()> { "patchReceiptId": stored_patch.receipt_id, "commandReceiptId": stored_command.receipt_id, "commitReceiptId": stored_commit.receipt_id, - "prReceiptId": stored_pr.receipt_id, - "bifrostPublicationReceiptId": stored_pr.bifrost_publication_receipt_id, "changedPaths": stored_patch.changed_paths, }))? ); diff --git a/epiphany-core/src/bin/epiphany-hands-action.rs b/epiphany-core/src/bin/epiphany-hands-action.rs index 4c8da98f..f30bb442 100644 --- a/epiphany-core/src/bin/epiphany-hands-action.rs +++ b/epiphany-core/src/bin/epiphany-hands-action.rs @@ -7,14 +7,11 @@ use epiphany_core::HandsActionReview; use epiphany_core::hands_command_receipt_for_review; use epiphany_core::hands_commit_receipt_for_review; use epiphany_core::hands_patch_receipt_for_review; -use epiphany_core::hands_pr_receipt_for_review; use epiphany_core::put_hands_command_receipt; use epiphany_core::put_hands_commit_receipt; use epiphany_core::put_hands_patch_receipt; -use epiphany_core::put_hands_pr_receipt; use epiphany_core::runtime_hands_action_intent; use epiphany_core::runtime_hands_action_review; -use epiphany_core::runtime_hands_commit_receipt; use serde_json::json; use std::env; use std::fs; @@ -28,7 +25,6 @@ fn main() -> Result<()> { Command::RecordPatch(command) => record_patch(&args.store, command)?, Command::RecordCommand(command) => record_command(&args.store, command)?, Command::RecordCommit(command) => record_commit(&args.store, command)?, - Command::RecordPr(command) => record_pr(&args.store, command)?, Command::RecordPass(command) => record_pass(&args.store, command)?, }; println!("{}", serde_json::to_string_pretty(&output)?); @@ -46,7 +42,6 @@ enum Command { RecordPatch(RecordPatchArgs), RecordCommand(RecordCommandArgs), RecordCommit(RecordCommitArgs), - RecordPr(RecordPrArgs), RecordPass(RecordPassArgs), } @@ -83,16 +78,6 @@ struct RecordCommitArgs { validate_commit_sha: bool, } -#[derive(Debug)] -struct RecordPrArgs { - gate: GateArgs, - commit_receipt_id: String, - pull_request_url: String, - pull_request_number: String, - pull_request_title: String, - bifrost_publication_receipt_id: String, -} - #[derive(Debug)] struct RecordPassArgs { gate: GateArgs, @@ -119,7 +104,6 @@ impl Args { "record-patch" => Command::RecordPatch(parse_record_patch(tokens)?), "record-command" => Command::RecordCommand(parse_record_command(tokens)?), "record-commit" => Command::RecordCommit(parse_record_commit(tokens)?), - "record-pr" => Command::RecordPr(parse_record_pr(tokens)?), "record-pass" => Command::RecordPass(parse_record_pass(tokens)?), _ => return Err(anyhow!("unknown command {command_name}\n{}", usage())), }; @@ -179,26 +163,6 @@ fn parse_record_commit(tokens: impl Iterator) -> Result) -> Result { - let mut options = ParsedOptions::parse(tokens)?; - let gate = options.take_gate()?; - let commit_receipt_id = options.take_required("--commit-receipt-id")?; - let pull_request_url = options.take_required("--pull-request-url")?; - let pull_request_number = options.take_required("--pull-request-number")?; - let pull_request_title = options.take_required("--pull-request-title")?; - let bifrost_publication_receipt_id = - options.take_required("--bifrost-publication-receipt-id")?; - options.finish()?; - Ok(RecordPrArgs { - gate, - commit_receipt_id, - pull_request_url, - pull_request_number, - pull_request_title, - bifrost_publication_receipt_id, - }) -} - fn parse_record_pass(tokens: impl Iterator) -> Result { let mut options = ParsedOptions::parse(tokens)?; let gate = options.take_gate()?; @@ -398,60 +362,6 @@ fn record_commit(store: &PathBuf, args: RecordCommitArgs) -> Result Result { - let (intent, review) = load_gate(store, &args.gate, "pr")?; - let commit_receipt = - runtime_hands_commit_receipt(store, &args.commit_receipt_id)?.ok_or_else(|| { - anyhow!( - "Hands commit receipt {} was not found", - args.commit_receipt_id - ) - })?; - if commit_receipt.intent_id != intent.intent_id || commit_receipt.review_id != review.review_id - { - return Err(anyhow!( - "Hands commit receipt {} belongs to intent {}/review {}, not {}/{}", - commit_receipt.receipt_id, - commit_receipt.intent_id, - commit_receipt.review_id, - intent.intent_id, - review.review_id - )); - } - let receipt_id = args - .gate - .receipt_id - .unwrap_or_else(|| generated_receipt_id("hands-pr")); - let receipt = hands_pr_receipt_for_review( - receipt_id, - &intent, - &review, - &commit_receipt, - args.pull_request_url, - args.pull_request_number, - args.pull_request_title, - args.bifrost_publication_receipt_id, - args.gate.summary, - now(), - ); - put_hands_pr_receipt(store, &receipt)?; - Ok(json!({ - "status": "ok", - "type": "epiphany.hands.pr_receipt", - "receiptId": receipt.receipt_id, - "intentId": receipt.intent_id, - "reviewId": receipt.review_id, - "commitReceiptId": receipt.commit_receipt_id, - "commitSha": receipt.commit_sha, - "branch": receipt.branch, - "pullRequestUrl": receipt.pull_request_url, - "pullRequestNumber": receipt.pull_request_number, - "bifrostPublicationReceiptId": receipt.bifrost_publication_receipt_id, - "changedPaths": receipt.changed_paths, - "store": store, - })) -} - fn record_pass(store: &PathBuf, args: RecordPassArgs) -> Result { let patch = record_patch( store, @@ -660,7 +570,7 @@ fn take_value(tokens: &mut impl Iterator, name: &str) -> Result &'static str { - "usage: epiphany-hands-action [--store path] (--gate-summary path | --intent-id id --review-id id) --summary text ..." + "usage: epiphany-hands-action [--store path] (--gate-summary path | --intent-id id --review-id id) --summary text ..." } #[cfg(test)] @@ -675,7 +585,6 @@ mod tests { use epiphany_core::runtime_hands_command_receipt; use epiphany_core::runtime_hands_commit_receipt; use epiphany_core::runtime_hands_patch_receipt; - use epiphany_core::runtime_hands_pr_receipt; use epiphany_core::runtime_latest_hands_receipt_chain_after; #[test] @@ -815,96 +724,6 @@ mod tests { Ok(()) } - #[test] - fn records_pr_receipt_against_commit_and_bifrost_publication() -> Result<()> { - let temp = tempfile::tempdir()?; - let store = temp.path().join("runtime-spine.msgpack"); - seed_gate(&store, vec!["src".to_string()])?; - record_commit( - &store, - RecordCommitArgs { - gate: gate_args("hands-commit-test"), - commit_sha: "abc123".to_string(), - branch: "codex/test".to_string(), - changed_paths: vec!["src/lib.rs".to_string()], - validate_commit_sha: false, - }, - )?; - - let result = record_pr( - &store, - RecordPrArgs { - gate: gate_args("hands-pr-test"), - commit_receipt_id: "hands-commit-test".to_string(), - pull_request_url: "https://github.com/GameCult/EpiphanyAgent/pull/1".to_string(), - pull_request_number: "1".to_string(), - pull_request_title: "Route Bifrost publication proof".to_string(), - bifrost_publication_receipt_id: "bifrost-publication-receipt-test".to_string(), - }, - )?; - - assert_eq!( - result - .pointer("/bifrostPublicationReceiptId") - .and_then(serde_json::Value::as_str), - Some("bifrost-publication-receipt-test") - ); - let receipt = - runtime_hands_pr_receipt(&store, "hands-pr-test")?.expect("stored Hands PR receipt"); - assert_eq!(receipt.commit_receipt_id, "hands-commit-test"); - assert_eq!(receipt.commit_sha, "abc123"); - assert_eq!( - receipt.pull_request_url, - "https://github.com/GameCult/EpiphanyAgent/pull/1" - ); - assert_eq!( - receipt.bifrost_publication_receipt_id, - "bifrost-publication-receipt-test" - ); - Ok(()) - } - - #[test] - fn refuses_pr_receipt_when_review_does_not_allow_publication() -> Result<()> { - let temp = tempfile::tempdir()?; - let store = temp.path().join("runtime-spine.msgpack"); - seed_gate_with_operations( - &store, - vec!["src".to_string()], - vec![ - "patch".to_string(), - "command".to_string(), - "commit".to_string(), - ], - )?; - record_commit( - &store, - RecordCommitArgs { - gate: gate_args("hands-commit-test"), - commit_sha: "abc123".to_string(), - branch: "codex/test".to_string(), - changed_paths: vec!["src/lib.rs".to_string()], - validate_commit_sha: false, - }, - )?; - - let result = record_pr( - &store, - RecordPrArgs { - gate: gate_args("hands-pr-test"), - commit_receipt_id: "hands-commit-test".to_string(), - pull_request_url: "https://github.com/GameCult/EpiphanyAgent/pull/1".to_string(), - pull_request_number: "1".to_string(), - pull_request_title: "Route Bifrost publication proof".to_string(), - bifrost_publication_receipt_id: "bifrost-publication-receipt-test".to_string(), - }, - ); - - assert!(result.is_err()); - assert!(runtime_hands_pr_receipt(&store, "hands-pr-test")?.is_none()); - Ok(()) - } - #[test] fn refuses_patch_receipt_outside_requested_paths() -> Result<()> { let temp = tempfile::tempdir()?; diff --git a/epiphany-core/src/hands_gateway.rs b/epiphany-core/src/hands_gateway.rs index 0bce1c3f..bd2df4b3 100644 --- a/epiphany-core/src/hands_gateway.rs +++ b/epiphany-core/src/hands_gateway.rs @@ -400,6 +400,7 @@ pub fn hands_commit_receipt_for_review( } } +#[cfg(test)] #[allow(clippy::too_many_arguments)] pub fn hands_pr_receipt_for_review( receipt_id: String, diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 5a494164..da17545e 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -805,6 +805,7 @@ pub use runtime_spine::put_hands_action_review; pub use runtime_spine::put_hands_command_receipt; pub use runtime_spine::put_hands_commit_receipt; pub use runtime_spine::put_hands_patch_receipt; +#[cfg(test)] pub use runtime_spine::put_hands_pr_receipt; pub use runtime_spine::put_mind_gateway_review; pub use runtime_spine::put_mind_state_commit_receipt; diff --git a/epiphany-core/src/runtime_spine.rs b/epiphany-core/src/runtime_spine.rs index 508afb58..481c571e 100644 --- a/epiphany-core/src/runtime_spine.rs +++ b/epiphany-core/src/runtime_spine.rs @@ -1573,6 +1573,7 @@ pub fn runtime_hands_commit_receipt( cache.get::(receipt_id) } +#[cfg(test)] pub fn put_hands_pr_receipt(store_path: impl AsRef, receipt: &HandsPrReceipt) -> Result<()> { validate_non_empty(&receipt.receipt_id, "Hands PR receipt id")?; validate_non_empty(&receipt.intent_id, "Hands PR intent")?; diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 5dfaf7f5..7f3260c7 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -351,3 +351,12 @@ receipt-chain slots, artifact rows, gate parameters, and readiness functions are deleted. Repo work now stops honestly at `awaiting-publication`; provider publication and merge evidence need a new owner-aligned ingest/projection path before readiness can advance. + +## Caller-transcribed PR publication proof + +`epiphany-hands-action record-pr` accepted a PR URL/number/title and Bifrost +publication receipt ID from one caller, resolved none of them, and persisted a +Hands PR receipt. The command and its tests are deleted. The PR constructor and +runtime writer are test-only; the typed record remains an ingest/read contract +until an authenticated GitHub/Bifrost adapter owns publication evidence. The +Hands smoke now proves only patch, command, and commit consequences. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index a325d9d2..561d27f4 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -84,6 +84,9 @@ The confirmed conceptual substitutions have been cut: overview, readiness, scheduling, receipt-chain, or proof-bundle paths. Dead writer artifacts cannot remain living authority; closed work waits at `awaiting-publication` until an owner-aligned provider projection exists. +- `epiphany-hands-action record-pr` is deleted. Caller-transcribed PR and + Bifrost fields cannot create Hands publication proof; PR construction and + persistence are test-only pending an authenticated adapter owner. The presentation boundary is now plain: `swarm overview` is a generic compact read-only projection. Gjallar is a downstream TUI application on Nightwing and is not an Epiphany organ, provider, owner, runtime, or architectural dependency. Eve/CultUI graphs may be lowered or composited downstream without Epiphany caring which presentation client does it. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index eec81ed5..d2be5d41 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index a540793b..6ac161ee 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -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 modeling pass beyond receipt writers. Fresh-repo proof, `epiphany-work publish`/`sync`, and every legacy publish/sync aggregate reader are deleted; dead-writer JSON can no longer advance overview, readiness, scheduler, receipt-chain, or proof state. Design owner-aligned Bifrost/GitHub/maintainer evidence projection only when the real ingest boundary is known. Meanwhile inventory remaining projections, caches, adapters, schedulers, coordinators, and compatibility surfaces that assert facts owned elsewhere. + next_action: Continue the conceptual-substitution modeling pass beyond receipt writers. Fresh-repo proof, `epiphany-work publish`/`sync`, legacy aggregate readers, and caller-transcribed Hands `record-pr` are deleted; PR construction/writing is test-only until an authenticated GitHub/Bifrost adapter owns it. Audit the remaining public receipt constructors/writers and caller-supplied authority references, then inventory projections, caches, adapters, schedulers, coordinators, and compatibility surfaces that assert facts owned elsewhere.