Skip to content

feat(opencode): stage inactive memory pilot with home-PVC persistence - #255

Merged
xnoto merged 9 commits into
mainfrom
feat/opencode-memory-pilot
Sep 20, 2026
Merged

xnoto merged 9 commits into
mainfrom
feat/opencode-memory-pilot

Conversation

@xnoto

@xnoto xnoto commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Stage the owner-approved, TEI-free OpenCode memory pilot without registering or deploying it. Reconciled with current main without reverting SMS retirement or the production chart 0.4.0 pin.

  • Inactive multi-source Application selects opencode-server:0.4.1 and the matching PVC/Service overlay.
  • Dedicated 10Gi ReadWriteOnce home claim, mounted by the chart at /home/opencode; no production claim sharing.
  • ClusterIP Service on 4096 only; no TEI, sidecar, public route, or new backend.
  • Pilot-specific provider/server Secret names; no Secret values or stubs.
  • CI guard asserts exact storage/service/Application/values contracts and inactive Kustomization references.

Issue: N/A — owner design/implementation approval and explicit TEI-removal instruction.

Type of change

  • Feature / enhancement
  • Documentation
  • GitOps desired state (manifests, kustomize, charts, SOPS/KSOPS secrets)
  • CI / reusable workflow

Validation

  • Required pull-request checks pass — run 35485957229 at head 5223e6f0f1d440bb759cb29f6d2c550088daf92e: test and dns-cleanup-script succeeded.
  • No generated centrally maintained files hand-edited — canonical staged resources and repository-owned CI guard only.

Independent adversarial and infrastructure-security reviews ADVANCE for inactive staging. QA reviewed exact contracts and deliberate activation-only gaps; DevOps DESIGN review ADVANCE for delivery contracts. Concurrency reconciliation preserved production ownership and inactive pilot. No Critical/High inactive-staging finding remains. No local execution or live runtime verification claimed.

Impact and rollout

Producer companion: charts PR #107, proposed 0.4.1 (publication still a later gate).

workloads/opencode-memory-pilot/application.yaml is absent from workloads/apps and excluded from its own overlay. Merging this preparation does not create the pilot Application, PVC, Service, or Deployment. Existing main CI/root sync can run normally but cannot reach this staged pilot. No automated child sync; only CreateNamespace=true, without the unnecessary missing-resource dry-run exemption.

Activation is separately approved after chart publication, local-embedding runtime compatibility checks, isolated SOPS/KSOPS Secret provisioning, controlled synthetic-client access, and published-chart Service-selector/port verification. Register the Application in a separate activation PR, intentionally update the inactivity guard, and obtain explicit manual-sync confirmation.

No TEI or replacement hosted embedding API. Local ONNX compatibility on Alpine remains unverified. Raw prompts persist; synthetic-only is procedural. ClusterIP is cluster-reachable, not namespace isolation; dedicated Basic authentication is the access boundary, with no NetworkPolicy enforcement claim.

Owner accepts home-PVC persistence for now; external backup/encryption/restore hardening deferred, with no node-loss DR promise. No production home, artifacts, agent definitions or credentials changed. No main merge, publication, registration, sync or restart performed.

Safety and secrets

  • No plaintext secrets, decrypted SOPS values, state, kubeconfigs, tokens, or new private endpoints
  • No local OpenTofu init/plan/apply/destroy/import/state operations run or claimed
  • Activation and rollback limits described above

AI-assisted; independent specialist scrutiny applied. Kept draft to make deferred activation explicit.

@xnoto
xnoto marked this pull request as ready for review September 20, 2026 03:55
@xnoto
xnoto requested a review from a team as a code owner September 20, 2026 03:55
@xnoto
xnoto merged commit 502400e into main Sep 20, 2026
1 check passed
@xnoto
xnoto deleted the feat/opencode-memory-pilot branch September 20, 2026 03:58
xnoto added a commit to makeitworkcloud/charts that referenced this pull request Sep 20, 2026
… TEI (#107)

## Summary

Implement the owner-approved, TEI-free `opencode-mem` pilot as an opt-in
mode of `opencode-server` **0.4.1**. Reconciled with concurrent main
**0.4.0** while preserving its cloud-architecture reviewer and all 24
production agents.

- Default production mode remains memory-disabled.
- Pilot mode renders only a dedicated ConfigMap and one-container
`Recreate` Deployment, locked to isolated resource/Secret/PVC names.
- Select `opencode-mem@2.26.0`, local embeddings, disabled cleanup, and
restricted synthetic-only agent configuration.
- Persist memory data/model cache under
`/home/opencode/.opencode-mem/data`; no production home, artifacts,
OAuth seed, or MCP mounts.
- No TEI sidecar, remote embedding API, custom image, or backup service.
- Correct inherited CI false-green behavior (`tee` pipeline failure
propagation and recursive Make output); add 31 regression tests.
- Add only the missing final newline to packaged `qa-engineer.md`; agent
instruction text is unchanged. Its checksum impact is explicit below.

Issue: N/A — owner-approved implementation and explicit TEI-removal
instruction.

## Type of change

- [x] Bug fix
- [x] Feature / enhancement
- [x] Documentation
- [x] GitOps desired state (manifests, kustomize, charts, SOPS/KSOPS
secrets)
- [x] CI / reusable workflow

## Validation

- [x] Required pull-request checks pass — [run
35486595405](https://github.com/makeitworkcloud/charts/actions/runs/35486595405)
at head `18d4cd12082348cc5b5bdaed3f4ea2ec621b9e22`: `test`, `detect`,
and `package opencode-server` succeeded; GitOps updater skipped as
expected for a PR.
- [x] Generated or centrally distributed files were not hand-edited —
canonical inputs only; Helm owns rendered resources.

Primary inspected the actual test log: **31 tests ran and passed**,
alongside hygiene, strict Helm lint/template, existing agent
contract/render/archive checks, and packaging. Tests compare original
baseline ConfigMap semantics and every agent's source bytes, allowing
only the exact missing-EOF-newline correction in `qa-engineer.md`.
Whole-manifest comparison, including checksum, uses baseline
`32a6b91cc3a881b861bdac087655c3935bb15454` plus that single enumerated
correction.

Initial green run 35482301899 was rejected as evidence because `tee`
masked an actual Make failure and pilot tests were not reached. Strict
Bash/pipefail and recursive-Make fixes now fail closed; later failing
runs were corrected, not waived.

Independent adversarial review ADVANCE including final EOF/test delta;
infrastructure security ADVANCE for inactive staging; QA found no
test-logic blocker and final CI supplies the missing execution evidence.
DevOps DESIGN review ADVANCE for delivery contracts (not a
completed-code audit). Independent release-readiness fallback reviewed
staging; the specialized Kimi release-review model was unavailable. No
unresolved Critical/High inactive-staging finding. No local validation
or runtime memory test is claimed.

## Impact and rollout

Producer: `makeitworkcloud/charts/opencode-server:0.4.1`. Companion:
[kustomize-cluster PR
#255](makeitworkcloud/kustomize-cluster#255).

**Merge/publication requires separate explicit confirmation.** A charts
main merge publishes OCI and the existing workflow opens an
auto-merge-enabled production chart-pin PR. That production consumer
does not enable pilot mode. The hygiene-required EOF correction changes
the configuration checksum, so normal production pod rollout can occur
after chart selection even with memory disabled; do not describe this as
byte-identical production manifests.

The companion pilot Application is outside active Kustomizations with no
automated sync. Later activation requires published-chart verification,
native local ONNX/Alpine compatibility and runtime checks, package/model
provenance, isolated SOPS-managed provider/server Secrets, controlled
synthetic-client access, published-chart Service linkage, separately
approved Application registration and manual sync. Review/pin the
retained init image before activation.

**Runtime remains unverified:** local ONNX embeddings have not been
demonstrated compatible with the stock Alpine image. TCP probes prove
only a listening server, not plugin/model readiness. The plugin retains
raw prompts and its import/export tool performs filesystem I/O;
synthetic-only use is operating policy, not a redaction sandbox. Local
Hugging Face library/model downloads remain; only TEI is removed.

Owner accepts home-PVC persistence; off-node backup/restore hardening is
deferred, with no HA or node-loss recovery promise. No main merge,
publication, Application registration, sync, or restart performed by
this work. Rollback requires separately reviewed chart selection; never
overwrite an OCI version.

## Safety and secrets

- [x] No plaintext secrets, decrypted SOPS values, state, kubeconfigs,
tokens, or new private endpoints
- [x] No local OpenTofu init/plan/apply/destroy/import/state operations
run or claimed
- [x] Publication consequences, checksum rollout, and rollback limits
described above

AI-assisted; primary and independent specialist review applied. Kept
draft to make pending rollout/runtime gates explicit.
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.

1 participant