Skip to content

fix(status): count extension-converted agents as synced - #392

Merged
runkids merged 5 commits into
mainfrom
runkids/391-extension-agent-status
Oct 4, 2026
Merged

runkids merged 5 commits into
mainfrom
runkids/391-extension-agent-status

Conversation

@runkids

@runkids runkids commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)

Linked Issue

Refs #391

Summary

An agent target with an extension writes each agent under output_ext (reviewer.toml) with transformed content, and the manifest tracks that output name. status, doctor and the dashboard's Sync tab counted synced agents by looking for the source name and comparing with the source content, so every converted agent was missing: 0/N with drift after a successful sync.

  • internal/sync: add SyncedExtensionOutputs(). An agent counts as synced when the manifest tracks an output with the same stem and the file still matches its recorded hash. Matching by stem avoids loading the extension spec in status paths.
  • cmd/skillshare: countLinkedAgents takes the agents config and uses the new counter for extension targets (global and project status, status --json). doctor does the same and keeps reporting leftover broken links.
  • internal/targetsummary: the dashboard's ManagedCount uses the new counter for extension targets.

Known limit: an output left by a previous output_ext still counts as synced until the next sync. Telling it apart would require running the extension from status, which it does not do.

Tests

  • TestStatus_AgentsExtension_CountsConvertedOutputs (integration): two agents through an output_ext: toml extension; status --json reports 2/2, drift: false, doctor reports 2/2 linked. Fails against a binary built from main.
  • TestSyncedExtensionOutputs_CountsTrackedRenamedOutputs (unit): counts the renamed output, and not after it was edited.
  • make check in the devcontainer: all unit and integration tests pass.
  • Not run: UI tests, website build (no frontend or docs changes).

Checklist

  • I've read CONTRIBUTING.md
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

An agent target with an extension writes each agent under output_ext
(reviewer.toml) with transformed content, and the manifest tracks that
output name. status, doctor and the dashboard's Sync tab counted synced
agents by looking for the source name and comparing with the source
content, so every converted agent was missing: status showed 0/N with
drift, doctor said the same, and the Sync tab kept them pending after a
successful sync.

For an extension target, count an agent as synced when the manifest
tracks an output with the same stem and that file still matches its
recorded hash. Matching by stem avoids loading the extension spec in
status paths. doctor keeps reporting leftover broken links for these
targets.

Refs #391
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 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-10-04T12:05:42.795767Z c43bb76 Manual request
ℹ️ 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.

@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: f403ea5a6f

ℹ️ 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".

Comment thread internal/sync/agent_sync.go Resolved
Counting an extension output as synced from its output hash alone missed
the common case: the user edits the agent in the source and runs status
to see whether a sync is due. The output still matched the manifest, so
status, doctor and the dashboard reported no drift although the next
sync would regenerate it.

Sync now records a SHA-256 of the source each output was converted from
in the manifest (sources), and status counts an output only when both
the output and that fingerprint are current. Outputs recorded by earlier
releases have no fingerprint and count as current until the next sync
records one, so upgrading does not show the 0/N the report was about.

Refs #391, Codex review on #392.
@runkids

runkids commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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: d589e4f92f

ℹ️ 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".

Comment thread internal/sync/agent_sync.go Resolved
Two agents that flatten to the same name matched the same manifest entry
and were both counted, so status could report 2/2 with one output on
disk. Each manifest key now satisfies one agent.

Refs Codex review on #392.
@runkids

runkids commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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: c43bb763f9

ℹ️ 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".

Comment thread cmd/skillshare/status_agents.go Resolved
Comment thread internal/sync/agent_sync.go Resolved
@runkids
runkids merged commit a265155 into main Oct 4, 2026
8 checks passed
@runkids
runkids deleted the runkids/391-extension-agent-status branch October 4, 2026 12:12
runkids added a commit that referenced this pull request Oct 5, 2026
…414)

* fix(diff): compare extension agent outputs and apply target filters

#392 taught status and doctor to recognise converted extension outputs,
but diff (CLI) and the Sync tab (/api/diff) still compared the target
directory's *.md files against the source name. A target whose extension
renames the output (codex -> .toml) therefore listed every agent as
pending after a sync.

Both diff paths now use the same manifest-based check as status, and
report tracked outputs whose source is gone as prune items. They also
apply the target's include/exclude and the agents' frontmatter targets,
so an agent that sync would skip is no longer shown as pending.

Refs #391

* chore(release): request 0.24.6

The pending feat commits would make Release Please propose 0.25.0. This
batch is meant to ship as the 0.24.6 patch, so ask for that version.

Release-As: 0.24.6
runkids added a commit that referenced this pull request Oct 5, 2026
Extension outputs were matched to an agent by stem alone. A plain copy
that sync tracked before the target enabled an extension (reviewer.md)
passed for the converted output, so status, doctor, diff and the Sync tab
reported the target in sync while the next sync would write reviewer.toml
and prune the copy.

Only a transform records a source fingerprint, so an output without one
is no longer counted as converted. Outputs written before fingerprints
existed (before 0.24.5) show as pending until the next sync, which is
what they were already reported as before #392.

Refs #415
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.

1 participant