Skip to content

fix(api): keep queued run comments from expiring plans - #223

Open
shuntianyifang wants to merge 3 commits into
theam:mainfrom
shuntianyifang:codex/fix-queue-plan-freshness
Open

fix(api): keep queued run comments from expiring plans#223
shuntianyifang wants to merge 3 commits into
theam:mainfrom
shuntianyifang:codex/fix-queue-plan-freshness

Conversation

@shuntianyifang

@shuntianyifang shuntianyifang commented Aug 30, 2026

Copy link
Copy Markdown

Summary

  • Prefix new control-plane and MCP queue acknowledgements with a hidden Facility run marker.
  • Ignore queue acknowledgements during issue-revision calculation only when a GitHub Bot posts an exact recognized message.
  • Keep legacy markerless Facility acknowledgements compatible while treating user lookalikes, appended content, and mismatched run IDs as material changes.

Why

Closes #222

Facility could count its own queued-run acknowledgement as a new issue revision. An already approved architect plan would then appear stale before the builder started.

Testing

  • pnpm --filter @facility/api exec vitest run --fileParallelism=false test/github-issue-revision.test.ts test/builder-plan-policy.integration.test.ts (34 passed, 0 skipped)
  • pnpm --filter @facility/api typecheck
  • pnpm exec biome check on all five changed files
  • git diff --check

The full release-shaped pnpm verify runs in GitHub Actions on Ubuntu with Node.js 22. It is not reported as a Windows-local result because the upstream checkout currently has unrelated Windows-only baseline failures; no repository check or test was disabled.

@shuntianyifang shuntianyifang changed the title fix: keep queued run comments from expiring plans fix(api): keep queued run comments from expiring plans Aug 30, 2026

@adrian-lorenzo adrian-lorenzo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution!

The acknowledgement regex accepts a narrower agent-name grammar than the APIs enforce. The MCP trigger accepts an agent definition name or command handle, including /architect, while agent definitions can also use names such as release planner or architect.v2. Facility emits acknowledgements for those valid values, but this matcher still counts them as material issue changes, so the stale-plan failure remains.

Please make acknowledgement recognition work for every valid agent name or command handle, and add regression coverage for a slash command and a custom agent name. With that fixed, this should be ready.

@shuntianyifang
shuntianyifang force-pushed the codex/fix-queue-plan-freshness branch from ee31bd4 to 8f03d10 Compare September 1, 2026 12:20
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.

Facility queue acknowledgement comments can make approved Builder plans stale

2 participants