fix(status): report a project without a GitHub origin as absent - #2260
Conversation
tracedecay_status rendered the unobserved GitHub source as `not_observed`, while the doctor reads the same observation as `GitHubSourceReadV1::Absent`. Status now names it `absent`, the CLI filters that state, the user guide lists it, and the status behavior test pins the exact github_source object and markdown line. Fixes #2244
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 216c679566
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Some(source) => serde_json::to_value(&source)?, | ||
| None => json!({ | ||
| "state": "not_observed", | ||
| "state": "absent", |
There was a problem hiding this comment.
Preserve the unmounted state instead of claiming absence
When a checkout has a GitHub origin but its full advisory owner has not mounted—such as when indexing is disabled or there are no indexable files—github_source_status_v1 still returns None. This branch now reports state: "absent" even though the source exists, conflating an unavailable authority with a definitive absence; the reason on the next line explicitly acknowledges this second scenario. Keep an unmounted/not-observed state distinct from a checkout that actually lacks an origin.
AGENTS.md reference: AGENTS.md:L228-L229
Useful? React with 👍 / 👎.
| let github_source: Option<GitHubSourceStatusV1> = daemon_status | ||
| .get("github_source") | ||
| .filter(|source| source.get("state") != Some(&Value::from("not_observed"))) | ||
| .filter(|source| source.get("state") != Some(&Value::from("absent"))) |
There was a problem hiding this comment.
Continue accepting the previous not_observed response
When the updated CLI connects to a still-running daemon built from the parent revision, that daemon returns the placeholder { "state": "not_observed", ... }. Because this filter now excludes only absent, the placeholder is passed to serde_json::from_value::<GitHubSourceStatusV1>, which fails on the missing repository field and makes plain tracedecay status exit with an error during version skew. Filter both placeholder states, or decode them through a compatible typed response.
Useful? React with 👍 / 👎.
mcp_suitestatus_behavior_testhas failed on master since #2221 addedgithub_sourcetotracedecay_status.Root cause. The pinned markdown was missing the new
github_sourceline. The payload was also untruthful: status reported a project with no GitHub origin as{"state":"not_observed",...}, while the #2250 doctor authority reads the same observation asGitHubSourceReadV1::Absent.not_observedhas never shipped (it is not in v1.0.0-beta.54), so it is renamed in place.Change
tracedecay_statusreports a project with no GitHub origin as{"state":"absent","reason":"the checkout has no GitHub origin, or its advisory owner has not mounted in this daemon"}.statusfilter now matchesabsent, so the human status still prints no GitHub line for such a project.github_sourcetable gains anabsentrow.github_sourceobject and adds the**github_source:** {2 field(s)}markdown line.Fail before / pass after. The test below failed with the updated test on master code and passes with the fix:
Runtime journey. Debug
tracedecaybuilt from this change, one isolated daemon capped at 6 GB, and a fresh local git repo with no remote:Local proof
mcp_suite(full run): 574 passed, 0 failed. After rebasing onto 99b357d,status_behavior_testandmcp_cli_serve_testpass 18/18.cargo clippy -p tracedecay-runtime-core -p tracedecay-mcp -p tracedecay-cli -p tracedecay --all-targets -D warningsis clean with and withouttracedecay/test-transport,test-helpers.cargo fmt --all -- --checkis clean.Fixes #2244