Skip to content

introduce ctx to SPIKE#287

Merged
v0lkan merged 7 commits into
mainfrom
chore/introduce-ctx
Jun 20, 2026
Merged

introduce ctx to SPIKE#287
v0lkan merged 7 commits into
mainfrom
chore/introduce-ctx

Conversation

@v0lkan

@v0lkan v0lkan commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Introduces ctx as an optional, project-scoped AI context layer and
cleans up the agent-facing repository contract that ctx init plus a
GitNexus indexing run left inconsistent. Also fixes two release-blockers
surfaced along the way: a broken make docs on current Zola, and a red
make audit (govulncheck).

ctx introduction — specs/introduce-ctx.md

  • CLAUDE.md is the canonical agent guide; AGENTS.md reduced to a pointer
  • GitNexus block extracted to GITNEXUS.md (managed markers preserved), framed optional / "if installed"
  • Makefile.ctxmakefiles/Ctx.mk (matches the makefiles/*.mk convention); root Makefile uses -include ./makefiles/Ctx.mk
  • .gitignore: .claude/, .context/ingest/, ideas//inbox//outbox/, GETTING_STARTED.md, Makefile.ctx
  • CONTRIBUTING.md: new "Optional: AI-Assisted Development Tooling" section
  • commits the .context/ memory tree

Docs build fix — specs/zola-022-highlighting.md

  • migrate docs-src/config.toml to the Zola 0.22 Giallo [markdown.highlighting] table; theme base16-ocean-dark (retired) → material-theme-ocean
  • regenerate the published docs/ tree

Vulnerability remediation — specs/vuln-remediation.md

  • pin toolchain go1.26.4 (patched stdlib), keeping the go 1.25.5 baseline
  • bump cloudflare/circl v1.6.3, go-jose/v4 v4.1.4, golang.org/x/net v0.55.0; go mod tidy
  • govulncheck now reports 0 called vulnerabilities

Additional work in this PR

Beyond introducing ctx, this PR also fixes two pre-existing problems found while getting the branch green:

Security — cleared all govulncheck advisories. Pinned the Go toolchain to 1.26.4 (patched stdlib) and bumped
cloudflare/circl → v1.6.3, go-jose/v4 → v4.1.4, golang.org/x/net → v0.55.0, and x/crypto/grpc (→ v0.52.0 / v1.79.3). make
audit now reports 0 vulnerabilities.

Fixed the minio-rolearn Integration Test (red on main). Root cause: the keepers were never seeded with the root-key shares, so SPIKE Nexus looped forever in InitializeBackingStoreFromKeepers and the startup probe killed it. Adding a
bootstrap workload surfaced three further bugs:

  • Missing keeper seeding — added a spike-bootstrap Job (+ ServiceAccount/RBAC for its idempotency ConfigMap) and wired it
    into setup.sh (dropped --wait, since Nexus can't be Ready pre-seed).
  • Self-deadlock in bootstrap.VerifyInitialization — write-lock then read-lock on the same non-reentrant RWMutex; switched
    to RootKeySeedNoLock.
  • Wrong verify key — the post-seed probe was encrypted with the raw seed instead of the canonical root key
    (ComputeShares(seed) marshalled); the seed is reduced mod the P256 order, so Nexus's cipher could never decrypt it.
  • Missing lite-mode route — /v1/bootstrap/verify was only registered when Nexus had a backing store; in lite mode it fell
    through to a 400. Registered it in routeWithNoBackingStore (lite is the encryption-only backend — it holds the root key
    and already exposes the cipher/operator routes, so verify belongs there).

Verified end-to-end on a local kind cluster with production images: bootstrap Job succeeds, idempotency ConfigMap written,

Nexus reaches Ready in ~30s. make test + make audit pass.

Verification

  • make test
  • make audit ✅ (govulncheck: 0 called vulnerabilities)
  • make docs ✅ (Zola 0.22, 59 pages, 0 errors)

v0lkan added 3 commits June 13, 2026 13:04
Adopt `ctx` as an optional, project-scoped AI context layer and clean up
the agent-facing repository contract that `ctx init` plus a GitNexus
indexing run left inconsistent. Also fixes a release-blocking docs build
break and clears the pre-existing govulncheck failures so the audit gate
is green.

ctx introduction (Spec: specs/introduce-ctx.md):
- CLAUDE.md is the canonical agent guide; AGENTS.md reduced to a pointer
- GitNexus block extracted to GITNEXUS.md (markers preserved for
  regeneration); CLAUDE.md keeps a short, optional "Companion Tools"
  pointer framed as "if installed"
- Makefile.ctx moved to makefiles/Ctx.mk to match the makefiles/*.mk
  convention; root Makefile uses -include ./makefiles/Ctx.mk
- .gitignore: ignore .claude/, .context/ingest/, ideas/, inbox/,
  outbox/, GETTING_STARTED.md, and the regenerated root Makefile.ctx
- CONTRIBUTING.md gains an "Optional: AI-Assisted Development Tooling"
  section (ctx, GitNexus), explicitly optional
- commit the .context/ memory tree

docs build (Spec: specs/zola-022-highlighting.md):
- migrate docs-src/config.toml highlighting to the Zola 0.19+
  [markdown.highlighting] table; theme base16-ocean-dark (retired by the
  0.22 Giallo highlighter) -> material-theme-ocean
- regenerate the published docs/ tree

vulnerability remediation (Spec: specs/vuln-remediation.md):
- pin toolchain go1.26.4 (patched stdlib) keeping the go 1.25.5 baseline
- bump circl v1.6.2->v1.6.3, go-jose/v4 v4.1.3->v4.1.4,
  x/net v0.48.0->v0.55.0; go mod tidy
- govulncheck now reports 0 called vulnerabilities

Spec: specs/introduce-ctx.md
Spec: specs/zola-022-highlighting.md
Spec: specs/vuln-remediation.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
Add a low-priority Maintenance task to bump the remaining dependencies
whose advisories govulncheck reports but the code does not call.

Spec: specs/vuln-remediation.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
…ries

Bump golang.org/x/crypto v0.51.0 -> v0.52.0 (13 advisories) and
google.golang.org/grpc v1.78.0 -> v1.79.3 (GO-2026-4762), clearing the
uncalled advisories that remained after the initial remediation.
govulncheck now reports zero vulnerabilities total (not just zero
called); make test and make audit both pass.

Spec: specs/vuln-remediation.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
@v0lkan v0lkan self-assigned this Jun 13, 2026
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown

Summary

Status Count
🔍 Total 5855
✅ Successful 4533
⏳ Timeouts 0
🔀 Redirected 12
👻 Excluded 3
❓ Unknown 0
🚫 Errors 1307
⛔ Unsupported 0

Errors per input

Errors in docs/about/index.html

Errors in docs/about/intro/index.html

Errors in docs/about/project-status/index.html

Errors in docs/architecture/adrs/adr-0001/index.html

Errors in docs/architecture/adrs/adr-0002/index.html

Errors in docs/architecture/adrs/adr-0003/index.html

Errors in docs/architecture/adrs/adr-0004/index.html

Errors in docs/architecture/adrs/adr-0005/index.html

Errors in docs/architecture/adrs/adr-0006/index.html

Errors in docs/architecture/adrs/adr-0007/index.html

Errors in docs/architecture/adrs/adr-0008/index.html

Errors in docs/architecture/adrs/adr-0009/index.html

Errors in docs/architecture/adrs/adr-0010/index.html

Errors in docs/architecture/adrs/adr-0011/index.html

Errors in docs/architecture/adrs/adr-0012/index.html

Errors in docs/architecture/adrs/adr-0013/index.html

Errors in docs/architecture/adrs/adr-0014/index.html

Errors in docs/architecture/adrs/adr-0015/index.html

Errors in docs/architecture/adrs/adr-0016/index.html

Errors in docs/architecture/adrs/adr-0017/index.html

Errors in docs/architecture/adrs/adr-0018/index.html

Errors in docs/architecture/adrs/adr-0019/index.html

Errors in docs/architecture/adrs/adr-0020/index.html

Errors in docs/architecture/adrs/adr-0021/index.html

Errors in docs/architecture/adrs/adr-0022/index.html

Errors in docs/architecture/adrs/adr-0023/index.html

Errors in docs/architecture/adrs/adr-0024/index.html

Errors in docs/architecture/adrs/adr-0025/index.html

Errors in docs/architecture/adrs/adr-0026/index.html

Errors in docs/architecture/adrs/adr-0027/index.html

Errors in docs/architecture/adrs/adr-0028/index.html

Errors in docs/architecture/adrs/adr-0029/index.html

Errors in docs/architecture/adrs/adr-0030/index.html

Errors in docs/architecture/adrs/adr-0031/index.html

Errors in docs/architecture/adrs/adr-0032/index.html

Errors in docs/architecture/adrs/index.html

Errors in docs/architecture/architectural-decision-records/index.html

Errors in docs/architecture/index.html

Errors in docs/architecture/security-model/index.html

Errors in docs/architecture/system-overview/index.html

Errors in docs/community/contact/index.html

Errors in docs/community/hello/index.html

Errors in docs/community/index.html

Errors in docs/community/presentations/index.html

Errors in docs/community/resources/index.html

Errors in docs/development/api-docs/index.html

Errors in docs/development/bare-metal/index.html

Errors in docs/development/index.html

Errors in docs/development/local-deployment/index.html

Errors in docs/development/sdk-integration/index.html

Errors in docs/getting-started/bare-metal/index.html

Errors in docs/getting-started/index.html

Errors in docs/getting-started/quickstart/index.html

Errors in docs/operations/backup/index.html

Errors in docs/operations/build/index.html

Errors in docs/operations/index.html

Errors in docs/operations/production/index.html

Errors in docs/operations/recovery/index.html

Errors in docs/operations/release/index.html

Errors in docs/recipes/backup-and-restore/index.html

Errors in docs/recipes/bootstrapping-spike/index.html

Errors in docs/recipes/break-the-glass-recovery/index.html

Errors in docs/recipes/choosing-a-backend-store/index.html

Errors in docs/recipes/deploying-spike/index.html

Errors in docs/recipes/encryption-as-a-service/index.html

Errors in docs/recipes/go-sdk-integration/index.html

Errors in docs/recipes/granting-a-workload-access/index.html

Errors in docs/recipes/index.html

Errors in docs/recipes/production-hardening/index.html

Errors in docs/recipes/root-key-keepers-recovery/index.html

Errors in docs/recipes/storing-and-reading-secrets/index.html

Errors in docs/recipes/troubleshooting/index.html

Errors in docs/recipes/upgrading-spike/index.html

Errors in docs/recipes/writing-access-policies/index.html

Errors in docs/tracking/changelog/index.html

Errors in docs/tracking/index.html

Errors in docs/tracking/snapshots/index.html

Errors in docs/usage/cli/index.html

Errors in docs/usage/commands/cipher/index.html

Errors in docs/usage/commands/index.html

Errors in docs/usage/commands/operator/index.html

Errors in docs/usage/commands/policy/index.html

Errors in docs/usage/commands/secret/index.html

Errors in docs/usage/configuration/index.html

Errors in docs/usage/index.html

Full Github Actions output

v0lkan added 4 commits June 13, 2026 18:12
…ify)

The Integration Test CI job was red on main: SPIKE Nexus never became
ready because the keepers were never seeded with the root-key shares, so
Nexus looped forever in InitializeBackingStoreFromKeepers and the startup
probe killed it. Adding a bootstrap workload surfaced three more bugs in
the bootstrap verify path.

Fixes:
- ci/integration/minio-rolearn: add a spike-bootstrap Job (+ ServiceAccount
  and RBAC for its idempotency ConfigMap) that seeds the keepers, and wire
  it into setup.sh (drop --wait; Nexus cannot be ready pre-seed).
- bootstrap: fix a self-deadlock in VerifyInitialization that took a write
  lock then a read lock on the same non-reentrant RWMutex; use
  RootKeySeedNoLock.
- bootstrap: encrypt the verify probe with the canonical root key
  (ComputeShares(seed) marshalled) instead of the raw seed, which Nexus's
  cipher cannot decrypt (the seed is reduced mod the P256 order).
- nexus: register /v1/bootstrap/verify in lite mode
  (routeWithNoBackingStore); it was only registered with a backing store,
  so lite-mode verify always hit the 400 fallback. Lite mode holds the
  root key and already exposes the other root-key routes, so verify
  belongs there too.

Verified end to end on kind: bootstrap Job succeeds, idempotency ConfigMap
written, Nexus reaches Ready in ~30s with production images.

Spec: specs/integration-bootstrap-fix.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
Add a task-oriented recipes/ section (problem/TL;DR/workflow/tips/
pitfalls/cross-links/next) with the three Tier-1 recipes that were the
hardest gaps in understanding SPIKE: choosing a backend store
(memory/lite/sqlite), bootstrapping, and the root-key/keepers/recovery
mechanics. Full 14-recipe plan + checklist in specs/recipes-plan.md.
Published docs/ regeneration (make docs) and Tiers 2-4 are follow-up.

Spec: specs/recipes-plan.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
…tion

The Integration Test CI job was red, but not because of SPIKE: the whole
stack (keepers, Nexus, Pilot, bootstrap) came up healthy. The job died in
setup.sh when every MinIO pod hit ImagePullBackOff. Bitnami removed its
free docker.io/bitnami/* images from Docker Hub and relocated them to
docker.io/bitnamilegacy/*, so the chart's default image tags now 404 and
Helm's post-install --wait timed out.

Fixes:
- minio-values.yaml: redirect all four chart images (image, clientImage,
  console.image, defaultInitContainers.volumePermissions.image) to
  bitnamilegacy/*, and set global.security.allowInsecureImages=true since
  the chart's verification gate rejects non-bitnami/ repositories.
- setup.sh: pin the chart to --version 17.0.21 so the image tags stay
  aligned with the tags mirrored in the frozen legacy repository.

Verified: live-registry checks (bitnami/* -> 404, bitnamilegacy/* -> 200),
helm template renders cleanly with every image on bitnamilegacy/* and no
verification error, make lint-go + make test pass.

Spec: specs/minio-bitnami-image-relocation.md
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
@v0lkan

v0lkan commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Ignoring the documentation errors; it's a CI workflow bug as it checks the live site which is not published yet.

Would require a separate issue to work on.

cc: @CoderMungan .

@v0lkan v0lkan merged commit 85651f2 into main Jun 20, 2026
15 checks passed
@v0lkan v0lkan deleted the chore/introduce-ctx branch June 20, 2026 19:26
@CoderMungan

Copy link
Copy Markdown
Contributor

Ignoring the documentation errors; it's a CI workflow bug as it checks the live site which is not published yet.

Would require a separate issue to work on.

cc: @CoderMungan .

I saw the issue and would like to request that a new issue be opened. I am excited to work on it.

@v0lkan

v0lkan commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @CoderMungan for your help. I'll check out the PR "soon".

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.

2 participants