Skip to content

⚠️ Retire /api/campaigns, campaign Jam and Recheck - #18407

Merged
kubestellar-prow[bot] merged 3 commits into
v5from
retire-campaigns-api
Nov 16, 2026
Merged

kubestellar-prow[bot] merged 3 commits into
v5from
retire-campaigns-api

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Second of three PRs that retire inception Campaigns in favour of Inception (spek) sessions. The first one (#18400) removed the Campaigns tab.

One-time export (runs before anything is gone)

On startup, Hive checks for /data/inception/campaigns/ or campaign-jam.json. The Jam file lives in data.metrics_dir, falling back to data.logs_dir, then data.agents_dir, matching the old Jam store. If either exists, Hive writes one read-only tarball:

  • Path: /data/exports/campaigns-<YYYY-MM-DD>.tar.gz
  • Permissions: file 0600, directory 0700 when created
  • Contents:
    • inception/campaigns/<id>/...: each archive's state.json and wiki/ snapshot
    • inception/state.json, when present
    • campaign-jam.json: threads, suggestions, polls, decisions, spec revisions and project-sync state
  • Symlinks are skipped, not followed.
  • The file is written to a temp file, then renamed into place.

Hive logs the path once, at WARN, as retired campaigns exported. Once any campaigns-*.tar.gz exists, no new export is written, so restarts stay quiet. A failed export is logged and never blocks boot.

The original files are only read. They stay in place for one release, and nothing deletes them. Knowledge facts from past inception runs (the inception-wiki vault and the knowledge store) are separate and untouched.

The code is in the new pkg/campaignexport package, with tests. The boot hook is in cmd/hive/boot_knowledge_deps.go. The export is documented in src/docs/inception.md#retired-campaigns-export.

Removed

  • api_campaigns*.go (list, get, resume, release, revise, delete, Jam, Jam live, Jam agents, Jam GitHub Projects sync), campaign_recheck.go, campaign_discovery.go, recheck_discovery.go, and their tests.
  • All 19 /api/campaigns routes in api.go. They are also removed from dashboard/openapi.json, along with the now-empty Campaigns tag, and from docs/api-reference/health-status-events.md.
  • The recheck tick in pkg/spektacular/adapter.go.
  • In stage_leases.go: the recheck delta import in ImportRunPlan and the recheck evidence appended to spec-stage titles.
  • The Jam evidence in achievements2.go. Jam was the only source of the review role, so Full SDLC Fireteam now needs spec, plan and implement coverage by three distinct actors. Without this change the badge could never be earned.
  • The Spek recheck block in Settings: its features API fields, settings search entry, parity-allowlist entries and parity-test cases.

Config: accepted, ignored, never fails

The whole runs.spektacular.recheck block existed only for recheck.

  • It is still accepted on load, so an existing hive.yaml keeps loading.
  • It no longer takes part in validation: the old discovery-source and proxy validators are removed, so it can never fail validation.
  • It has no effect. WarnDeprecatedSpektacularRecheck logs a one-line deprecation once per process.
  • A new test, TestSpektacularRecheckBlockIsAcceptedAndIgnored, pins this with sources the old validator rejected.
  • The typed fields are gone, so a Settings save no longer writes the block back.

The HIVE_JAM_PROJECT_SYNC_URL and HIVE_JAM_PROJECT_SYNC_TOKEN env vars are now unused.

Docs

  • inception.md gains a "Retired campaigns export" section.
  • spektacular.md: the Jam and Continuous convergence sections are replaced with retirement notes.
  • ADR-0020 is marked retired.
  • runs.md, integrations/spektacular.md and design/achievements-2.md are updated.

Next

PR 3 retires the inception API, its watcher and the brainstorm inception mode.

v6

The v5 to v6 top-up carries this change to v6. The v6-only transcript fact-confirmation panel from the old wizard was already removed by an earlier top-up.

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 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
#18411 ✨ Inbox: drag and drop documents into the Inbox same files dashboard/openapi.json
src/docs/api-reference/knowledge.md
src/pkg/dashboard/static/index.html
#18408 ✨ Inbox: record recordings directly in hive (backend) CONFLICT dashboard/openapi.json
src/docs/api-reference/auth.md (conflict)
src/docs/api-reference/configuration.md (conflict)
src/docs/api-reference/knowledge.md
src/docs/api-reference/packs-and-acmm.md (conflict)
src/pkg/dashboard/api.go
src/pkg/dashboard/settings_parity_allowlist.txt
#18405 ✨ Inbox: send items into an Inception (spek) session same files dashboard/openapi.json
src/docs/api-reference/auth.md
src/docs/api-reference/dashboard-misc.md
src/docs/api-reference/health-status-events.md
src/docs/inception.md
src/pkg/dashboard/static/index.html

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

3 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/cmd/hive/boot_knowledge_deps.go 102 CONDITIONALS_NEGATION
src/cmd/hive/boot_knowledge_deps.go 106 CONDITIONALS_NEGATION
src/cmd/hive/boot_knowledge_deps.go 110 CONDITIONALS_NEGATION

Verdict: uncovered (#17349).

@hivecommons-hive

Copy link
Copy Markdown
Contributor
254e478

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 254e47806287) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • test_removal — deletes 12 test file(s) (Deletes test files or guts test coverage)
    • src/pkg/config/spektacular_discovery_test.go
    • src/pkg/config/spektacular_recheck_discovery_test.go
    • src/pkg/dashboard/api_campaigns_jam_agents_test.go
    • src/pkg/dashboard/api_campaigns_jam_collections_test.go
    • src/pkg/dashboard/api_campaigns_jam_live_test.go
    • src/pkg/dashboard/api_campaigns_jam_projects_test.go
    • src/pkg/dashboard/api_campaigns_jam_test.go
    • src/pkg/dashboard/api_campaigns_test.go
    • src/pkg/dashboard/campaign_discovery_test.go
    • src/pkg/dashboard/campaign_recheck_test.go
    • src/pkg/dashboard/recheck_discovery_branches_test.go
    • src/pkg/dashboard/recheck_discovery_test.go

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
Remove the campaign API (list/get/resume/release/revise/delete/recheck
and every /jam route), campaign Jam, campaign recheck and outward
discovery, the spektacular adapter's recheck tick, the recheck delta
import and spec-title evidence in stage leases, the Jam evidence in
achievements, and the Spek recheck settings.

Before anything is gone, boot writes a one-time read-only export of
/data/inception/campaigns and campaign-jam.json to
/data/exports/campaigns-<date>.tar.gz (0600) and logs its path once; the
originals stay in place.

runs.spektacular.recheck is still accepted on load, never fails
validation, has no effect and logs a deprecation warning once.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/scanner: coverage is red and the branch is 2 commits behind v5 (baseline triage: MERGE_BASE, not a shared incident). This is a human-authored branch so I am not pushing; please merge v5 in (signed off) and re-run. hive/awaiting-ci: held until then.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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 merged commit 5332740 into v5 Nov 16, 2026
92 of 94 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the retire-campaigns-api branch November 16, 2026 13:39
clubanderson added a commit that referenced this pull request Nov 16, 2026
…the rewrite window

The run-detail panel (toggleCampaignRunDetail, renderRunDetailPanel and
its source badge) lived only in campaigns.js and was reached only from
Campaigns rows, which v5 retired (#18400, #18407). Drop the two static
guards that pinned it. The Dockerfile metacopy rewrite list is re-wrapped
so hivectl stays inside the window test_hivectl_extraction_contract.sh
reads.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant