Skip to content

ci: spec-numbering - Add allocation ledger and validator - #4065

Merged
eleshar merged 1 commit into
aiops/spec-kit-upgrade-v1-4-4from
ci/spec-numbering-allocation-ledger
Nov 24, 2026
Merged

eleshar merged 1 commit into
aiops/spec-kit-upgrade-v1-4-4from
ci/spec-numbering-allocation-ledger

Conversation

@eleshar

@eleshar eleshar commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Build/CI Pull Request

Linked issues

Relates to #3891

Refs GIT-2676

Stacked on #4064. The base is that pull request's branch, so this diff shows only the ledger work. GitHub retargets this pull request to develop when #4064 merges.

Build/CI change

  • What: Specification numbers are checked against a ledger, .github/specs/ALLOCATIONS.json, instead of requiring an unbroken run of directories. One shared helper, scripts/validation/spec-allocations.cjs, serves both the audit (audit-specs.sh) and the generator (create-new-feature.sh).
  • Why: The "Specification Validation" check fails on every pull request that touches specifications, because 020, 021 and 022 have no directory. 020 is pending in docs: release-agents - Specify portable changelog and release agents #3883. 021 and 022 are retired. The ledger records that, so the gap is accounted for and nothing is renumbered.
  • Source: This applies the draft patch and ledger that Ash approved as draft content on GIT-2676 on 4 November 2026, on top of the Spec Kit v1.4.4 scripts from aiops: spec-kit - Upgrade to v1.4.4 and keep local changes #4064.

Differences from the approved draft:

Change Reason
Tests read a frozen copy of the bootstrap ledger (scripts/validation/__fixtures__/spec-allocations-bootstrap.json) The draft tests read the live ledger and assert 24 allocations and "next is 025". They would fail as soon as any allocation is added.
Ledger row 025, spec-kit-upgrade, materialised #4064 adds that directory. The design requires the directory and its row in the same candidate.
CATALOG.md hunks re-applied by hand, with 026 as the next number The hunks did not apply because #4064 already lists 025.
"Last updated" fields use 24 November 2026 The landing date. Headings keep the 4 November drafting date.

The patch applied without change to the v1.4.4 create-new-feature.sh.

Baseline & Target

Checks run locally on this branch:

Check Result
bash .specify/scripts/bash/audit-specs.sh Exit 0
Same, with SPEC_ALLOCATION_BASELINE set to the frozen bootstrap ledger Exit 0, baseline-compared
bash .specify/scripts/bash/validate-catalog.sh Exit 0
bats tests/bash 79 of 79 pass
Jest, spec-allocations.test.js 66 of 66 pass
Generator dry run Reports 026
Generator dry run with --number 21 (retired) Exit 1, no writes
ESLint on the two new JavaScript files No findings
ShellCheck (errors) on both scripts No findings
markdownlint-cli2 on changed Markdown, repository config 0 issues
actionlint on the workflow No findings
Semgrep (p/security-audit, p/secrets) on changed code 0 findings
gitleaks on the staged diff No leaks
specify integration status 2 modified managed files, unchanged from #4064

Not reformatted: Prettier would reflow the two JavaScript files and the two JSON files. They are kept as approved.

Rollback

  • Plan: Revert this pull request. With no ledger present the audit falls back to the strict directory check, which is the behaviour before this change. No data or external state changes.

Notes

  • Secrets and permissions: None. The workflow change adds path triggers only. Permissions and gates are unchanged.
  • Behaviour changes in the generator: --timestamp is rejected in the numbered root. A --number that conflicts now fails instead of being silently replaced. Node.js is required.
  • Not in this pull request: The 020 transition from pending to materialised. That belongs in docs: release-agents - Specify portable changelog and release agents #3883 once this has merged, as the GIT-2676 design sets out.
  • Not done: No renumbering, no placeholder specifications, no constitution change.

Changelog

Added

  • Specification Allocation Lifecycle — Adds an offline pending/materialised/retired ledger and coordinated audit/allocation checks, preserving 020, 023 and 024 without renumbering.

Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant): not relevant, no user interface
  • Docs/readme/changelog updated (if user-facing)
  • Security checklist completed (where relevant):
    • Untrusted input validated and sanitised
    • No secrets/sensitive data introduced; OWASP risks reviewed
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

Apply the draft patch approved on GIT-2676 (4 November 2026) on top of
the Spec Kit v1.4.4 scripts. Specification numbers are now checked
against .github/specs/ALLOCATIONS.json instead of directory contiguity,
so 020 (pending) and 021/022 (retired) no longer fail the audit.

Changes beyond the approved draft:

- Tests read a frozen copy of the bootstrap ledger, so adding an
  allocation does not break them.
- Add the materialised row for 025 (Spec Kit upgrade).
- Re-apply the catalogue hunks by hand; they did not apply because the
  catalogue now lists 025.
- Use the landing date for the "last updated" fields.

Refs GIT-2676
@eleshar
eleshar requested review from a team and ashleyshaw as code owners November 24, 2026 11:10
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e0ddbb1 and a2c57e7.

Files selected for processing: 15

  • .github/specs/013-spec-folder-refactor/checklists/requirements.md
  • .github/specs/013-spec-folder-refactor/spec.md
  • .github/specs/ALLOCATIONS.json
  • .github/specs/CATALOG.md
  • .github/specs/MAINTENANCE.md
  • .github/workflows/validate-specifications.yml
  • .specify/scripts/bash/audit-specs.sh
  • .specify/scripts/bash/create-new-feature.sh
  • CHANGELOG.md
  • docs/GOVERNANCE_REVISION_LOG.md
  • scripts/validation/__fixtures__/spec-allocations-bootstrap.json
  • scripts/validation/__tests__/spec-allocations.test.js
  • scripts/validation/spec-allocations.cjs
  • tests/bash/audit-specs.bats
  • tests/bash/specs-directory.bats
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@linear-code

linear-code Bot commented Nov 24, 2026

Copy link
Copy Markdown

GIT-2676

@github-actions

Copy link
Copy Markdown
Contributor

AI Feedback Validation Report

❌ No issue link found: the PR must include Resolves #123 or Closes #123.

Required actions

  1. Link this PR to its issue with Resolves #123 or Closes #123 in the description.
  2. Track AI review feedback in FEEDBACK_RESPONSE.md with a status per item.
  3. For deferred feedback, open a follow-up issue and link it.

@github-actions

Copy link
Copy Markdown
Contributor

PR Template Routing

Branch Type: ci
Scope: spec-numbering-allocation-ledger
Template: pr_ci.md
Labels Applied: type:ci

This PR was automatically routed based on the branch naming strategy.

@mergify

mergify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@eleshar
eleshar merged commit 58c4352 into aiops/spec-kit-upgrade-v1-4-4 Nov 24, 2026
20 checks passed
@eleshar
eleshar deleted the ci/spec-numbering-allocation-ledger branch November 24, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants