Skip to content

audit-archived-not-merged: add spec for audit command and shipped stage#58

Merged
androidand merged 3 commits into
mainfrom
audit-archived-not-merged
Jul 24, 2026
Merged

audit-archived-not-merged: add spec for audit command and shipped stage#58
androidand merged 3 commits into
mainfrom
audit-archived-not-merged

Conversation

@androidand

@androidand androidand commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What

Add `specsync audit` — a read-only command that cross-references archived OpenSpec changes against GitHub PRs to find archived changes whose PR was never merged.

Changes

  • New `specsync audit` command with flags:
    • `-json` for machine-readable output
    • `-fail-on-unmerged` to exit non-zero on unmerged changes
    • `-mark-shipped` to write shipped metadata for merged PRs
  • New `shipped` stage — extends the lifecycle: `active → complete → archived → shipped`
  • PR matching via specsync marker, branch name convention (`feat/-`), or PR title
  • Archived immutability preserved — only `shipped` metadata can override archived stage

Files

  • `audit.go` — Audit function, matchPRToChange, isDigits helpers
  • `audit_test.go` — comprehensive tests for matching, audit, shipped metadata
  • `change.go` — StageShipped constant, refreshState shipped override
  • `cmd/specsync/main.go` — runAudit, parseStatusMapping shipped stage
  • `README.md` — audit section added
  • `site/features.json` — audit feature entry added

Closes #59

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploying specsync with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5330792
Status: ✅  Deploy successful!
Preview URL: https://2c8c5401.specsync.pages.dev
Branch Preview URL: https://audit-archived-not-merged.specsync.pages.dev

View logs

@androidand
androidand force-pushed the audit-archived-not-merged branch from 5615583 to d815df3 Compare July 24, 2026 07:31
- Remove stray closing brace causing build failure
- Allow shipped metadata to override archived stage (other metadata still blocked)
- Fix multi-segment branch matching (e.g., skein/feat/52-slug)
- Add specsync audit to README.md and site/features.json
- Fix spec scenario: shipped changes re-queried on subsequent runs
- Apply gofmt formatting
@androidand
androidand merged commit e8712f7 into main Jul 24, 2026
2 checks passed
@androidand
androidand deleted the audit-archived-not-merged branch July 24, 2026 08:08
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.

Audit archived changes against merged PRs

1 participant