diff --git a/crates/tracedecay-cli/src/status_cmd.rs b/crates/tracedecay-cli/src/status_cmd.rs index 8e11cf2940..a0cead9f6d 100644 --- a/crates/tracedecay-cli/src/status_cmd.rs +++ b/crates/tracedecay-cli/src/status_cmd.rs @@ -488,7 +488,7 @@ async fn handle_status_command_within( .unwrap_or_default(); let github_source: Option = daemon_status .get("github_source") - .filter(|source| source.get("state") != Some(&Value::from("not_observed"))) + .filter(|source| source.get("state") != Some(&Value::from("absent"))) .cloned() .map(serde_json::from_value) .transpose()?; diff --git a/crates/tracedecay-mcp/src/handlers/info/status.rs b/crates/tracedecay-mcp/src/handlers/info/status.rs index 1bfdac8abe..a8324db605 100644 --- a/crates/tracedecay-mcp/src/handlers/info/status.rs +++ b/crates/tracedecay-mcp/src/handlers/info/status.rs @@ -451,7 +451,7 @@ pub async fn handle_status( output["github_source"] = match github_source_status_v1(ctx.project_root()) { Some(source) => serde_json::to_value(&source)?, None => json!({ - "state": "not_observed", + "state": "absent", "reason": "the checkout has no GitHub origin, or its advisory owner has not mounted in this daemon", }), }; diff --git a/crates/tracedecay/tests/mcp_suite/status_behavior_test.rs b/crates/tracedecay/tests/mcp_suite/status_behavior_test.rs index 762ce1975f..5b4dee86a5 100644 --- a/crates/tracedecay/tests/mcp_suite/status_behavior_test.rs +++ b/crates/tracedecay/tests/mcp_suite/status_behavior_test.rs @@ -177,6 +177,13 @@ async fn tracedecay_status_reports_the_sealed_branch_and_keeps_diagnostics_opt_i assert!(compact.get("node_count").is_none()); assert_eq!(compact["server"]["errors"], 0); assert!(compact["server"].get("worktree_mismatch").is_none()); + assert_eq!( + compact["github_source"], + json!({ + "state": "absent", + "reason": "the checkout has no GitHub origin, or its advisory owner has not mounted in this daemon", + }) + ); let worktree_id = &compact["code_index_freshness"]["worktree"]["worktree_id"]; let generation_id = &compact["graph_statistics"]["generation_id"]; @@ -280,6 +287,7 @@ async fn tracedecay_status_reports_the_sealed_branch_and_keeps_diagnostics_opt_i "## Project Status\n\ **active_branch:** status-proof\n\ **code_index_freshness.status:** current\n\ + **github_source:** {{2 field(s)}}\n\ **graph_statistics:** {{6 field(s)}}\n\ **memory.status:** nominal\n\ {owner_bullets}\ diff --git a/docs/USER-GUIDE.md b/docs/USER-GUIDE.md index 32b8e94ebb..444bd1d59d 100644 --- a/docs/USER-GUIDE.md +++ b/docs/USER-GUIDE.md @@ -900,6 +900,7 @@ checkout's exact head, and a remedy when there is one: | `bound` | A credential authorizes the reads. | | `unauthenticated_public` | No credential was found, so the repository is read anonymously as a public repository. That allows 60 requests per hour. Discovery uses the REST issue search's `head:` qualifier, which also finds fork-headed pull requests. | | `denied_no_credential` | No credential was found and GitHub refused the anonymous read: the repository is private or absent. Run `gh auth login`, or set `GH_TOKEN` to a token with read access, then reopen the project. | +| `absent` | No GitHub source was observed: the checkout has no GitHub `origin`, or its advisory owner has not mounted in this daemon yet. | ### Private GitHub review sources