Skip to content

fix(status): report a project without a GitHub origin as absent - #2260

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fleet/small-items-3-status-absent
Sep 26, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fleet/small-items-3-status-absent

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

mcp_suite status_behavior_test has failed on master since #2221 added github_source to tracedecay_status.

Root cause. The pinned markdown was missing the new github_source line. 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 as GitHubSourceReadV1::Absent. not_observed has never shipped (it is not in v1.0.0-beta.54), so it is renamed in place.

Change

  • tracedecay_status reports 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"}.
  • The CLI status filter now matches absent, so the human status still prints no GitHub line for such a project.
  • The user guide's github_source table gains an absent row.
  • The test asserts the exact github_source object 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:

status_behavior_test.rs:180: assertion `left == right` failed
  left: Object {"reason": String("the checkout has no GitHub origin, or its advisory owner has not mounted in this daemon"), "state": String("not_observed")}
 right: Object {"reason": String("..."), "state": String("absent")}

Runtime journey. Debug tracedecay built from this change, one isolated daemon capped at 6 GB, and a fresh local git repo with no remote:

$ tracedecay init && cd src && tracedecay status --json --project-path ..
github_source: {"reason": "the checkout has no GitHub origin, or its advisory owner has not mounted in this daemon", "state": "absent"}
$ tracedecay status | grep -iE "github|error"   # no output (exit 1)

Local proof

  • mcp_suite (full run): 574 passed, 0 failed. After rebasing onto 99b357d, status_behavior_test and mcp_cli_serve_test pass 18/18.
  • cargo clippy -p tracedecay-runtime-core -p tracedecay-mcp -p tracedecay-cli -p tracedecay --all-targets -D warnings is clean with and without tracedecay/test-transport,test-helpers.
  • cargo fmt --all -- --check is clean.

Fixes #2244

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
@changeset-bot

changeset-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 216c679

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy merged commit 6df7c4f into master Sep 26, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T20:15:22.603006Z 216c679 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy deleted the fleet/small-items-3-status-absent branch September 26, 2026 20:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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")))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(mcp): status markdown pin misses github_source since #2221

1 participant