Skip to content

✨ Spek recheck cadence for continuous convergence - #10655

Merged
clubanderson merged 3 commits into
v5from
feat/spek-recheck-cadence
Oct 5, 2026
Merged

clubanderson merged 3 commits into
v5from
feat/spek-recheck-cadence

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add opt-in runs.spektacular.recheck config for continuous Spek convergence.
  • Add scheduled/manual campaign recheck creation as linked Spek revisions starting at spec.
  • Attach drift evidence, expose recheck state in campaign JSON/dashboard, and import only new/changed plan tasks with a configurable cap.
  • Document cadence/generation/delta semantics in Spek docs and ADR-0020.

Mapping to acceptance criteria

  • Cadence re-runs: scheduler tick creates linked revision_of / revision campaigns when due.
  • Manual trigger: POST /api/campaigns/{id}/recheck supports immediate rechecks, 409 in-flight, and ?force=true for disabled campaigns.
  • Off by default: runs.spektacular.recheck.enabled defaults false.
  • Delta semantics: final recheck plans diff task content hashes against the prior plan; empty delta imports nothing; caps record audit.
  • Drift evidence: revisions carry drift.codebase_changed, prior_revision, delta_count, and recheck_reason.
  • Observability: campaign list/detail and dashboard panel include recheck cadence/next/last delta and a Recheck action.

Config example

runs:
  spektacular:
    enabled: true
    recheck:
      enabled: true
      default_interval: 168h
      max_delta_tasks: 50

API

  • POST /api/campaigns/{id}/recheck
  • Campaign JSON adds recheck: { enabled, interval, last_at, next_at, in_flight, last_delta_count }.
  • Recheck revisions may include drift: { codebase_changed, prior_head_sha, current_head_sha, prior_revision, delta_count, recheck_reason }.

Follow-up

Validation

  • bash src/scripts/check-api-reference-citations.sh --fix
  • go test -count=1 ./pkg/config ./pkg/knowledge ./pkg/spektacular ./pkg/dashboard -run 'TestRunsConfig|TestCampaignRecheck|TestCampaigns|TestLeaseAdapter|TestHubRunner'
  • go build ./...
  • go vet ./pkg/config ./pkg/knowledge ./pkg/spektacular ./pkg/dashboard

Closes #10652
Closes #10664
Closes #10665
Closes #10666

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#10670 🐛 dashboard: collapsed stats spacing/plurals; drop bogus FAQ count same files src/pkg/dashboard/static/index.html
#10671 🐛 dashboard: topbar up-next tile truncates agent name same files src/pkg/dashboard/static/index.html
#10661 🐛 dashboard: double Overview chart transition durations same files src/pkg/dashboard/static/index.html
#10602 ✨ feat: label-driven repos skip un-park notice and keep needs-human same files dashboard/openapi.json
src/docs/api-reference.md

clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the feat/spek-recheck-cadence branch from 090ad93 to ad30ea8 Compare October 5, 2026 18:15
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson force-pushed the feat/spek-recheck-cadence branch from 34706c9 to 703983e Compare October 5, 2026 18:29
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Add opt-in continuous convergence rechecks for Spektacular campaigns. Rechecks mint linked spec-stage revisions, expose manual and scheduled triggers, attach drift evidence, and import only plan deltas capped by config.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/spek-recheck-cadence branch from e8b1315 to 155dc69 Compare October 5, 2026 18:44
clubanderson and others added 2 commits October 5, 2026 18:44
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@clubanderson
clubanderson merged commit e2308bf into v5 Oct 5, 2026
31 of 32 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/spek-recheck-cadence branch October 5, 2026 18:46
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

1 participant