Skip to content

fix(aspire): persist managed Garnet data when a path is configured - #2643

Merged
rickylabs merged 9 commits into
mainfrom
fix/garnet-persistence
Nov 17, 2026
Merged

rickylabs merged 9 commits into
mainfrom
fix/garnet-persistence

Conversation

@rickylabs

@rickylabs rickylabs commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Enable native AOF persistence and recovery for managed Garnet when DataPath is configured. Acknowledged writes survive a hard server restart; launches without a data path retain ephemeral behavior.

Scope

  • Archetype / area: CLI generator and upstream cache integration.

Closes #2636

  • Decisions: existing DataPath selects durability for Container, Executable and both Auto arms. Use immediate AOF flush acknowledgement, native FileStream plus storage tiering and a shared log/checkpoint directory. The pinned server supports on-demand checkpoints; no new settings or dependencies.

Slices

  • S1 Research and locked DataPath/native-flag contract.
  • S2 Red static and real queue restart regressions, generator repair and durability docs.
  • S3 Generated consumers and supported full smoke.
  • S3 Independent final evaluation and required head checks.

Validation

  • Main baseline:3 no-path controls pass;3 DataPath tests fail. Actual queued jobs disappear after a hard restart despite the restarted server answering PING.
  • Repaired generator/persistence suites33/33 pass, including real AOF-only and checkpoint-plus-AOF-tail recovery with job delivery and acknowledgement.
  • Scoped check/lint/format, quality:gate, release:preflight and docs:accuracy pass. CLI doc lint zero at base and head; JSR dry-run passes with25 existing doctrine/slow-type warnings. No lock change.
  • Required CLI quality gate enforces canonical formatting for changed files. Generator and test now use that config; quality:cli passes. Normalizing the evaluated generator with the canonical formatter produces exactly the current file. Earlier legacy-style decision is superseded; no launch policy changed.
  • Generated prose/corpus/barrel/publish refresh and freshness checks pass. Supported full runtime passes: Postgres124gates, SQLite116gates plus8showcase gates, scaffold-static and desktop-native. Local one-pass exits1 at unavailable Postgres/local Docker, cleanup passes. Independent IMPL-EVAL PASS; follow-up IMPL-EVAL PASS confirms canonical formatting and deterministic readiness. Required quality passes; deps-report policy-skipped; review-thread gate0/0. Final verdict-retention commit changes only run artifacts.
  • Ownership preview: zero run-owned cleanup commands. Runtime tests verify unique labels and immutable IDs before removing their containers/volumes; foreign resources untouched.
issue: 2636
entries:
  - box-index: 1
    evidence: "https://github.com/rickylabs/netscript/pull/2643#issuecomment-6926976716 — generated launch flags/paths,33 passing generator/persistence tests and native recovery."
  - box-index: 2
    evidence: "https://github.com/rickylabs/netscript/pull/2643#issuecomment-6926976716 — two real hard-container-restart queue delivery tests."
  - box-index: 3
    evidence: "https://github.com/rickylabs/netscript/pull/2643#issuecomment-6926976716 — three no-path controls plus25 adjacent generator tests."
  - box-index: 4
    evidence: "https://github.com/rickylabs/netscript/pull/2643#issuecomment-6926976716 — CLI README and KV/queues/cron durability guide."

Harness

  • Run dir: .llm/runs/fix-garnet-persistence--issue-2636/.
  • Phase: impl-eval. Straightforward tier; PLAN-EVAL N/A for verified native configuration passthrough with locked policy; mandatory independent IMPL-EVAL.

Drift / Debt

Pinned server lacks newer checkpoint scheduling. Native FileStream plus storage-tier handles the checkpoint-device alignment described in upstream2239; pinned-version checkpoint and AOF recovery both pass. No version bump, Redis Streams dependency or saga transport changes.

Definition of Done

  • DataPath launch enables AOF/checkpoint storage and recovery, proved by red/green tests.
  • A real queued job survives a Garnet container restart.
  • No-path behavior unchanged; both durability modes documented.
  • Static/full-runtime gates, independent evaluation, required checks and review threads pass.
  • Taxonomy and milestone0.0.10.

🤖 Generated with Codex

@rickylabs rickylabs added this to the 0.0.10 milestone Nov 16, 2026
@rickylabs rickylabs removed ci:skip-e2e ci:skip-scaffold Skip the scaffold-static (deno-only) scaffold gate labels Nov 16, 2026
@rickylabs

rickylabs commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner Author

[PHASE: IMPL]

Managed Garnet now derives durability from the existing DataPath contract in Container, Executable and both Auto arms. Native AOF/recovery flags use immediate flush acknowledgement; log/checkpoint paths share the retained directory. Native FileStream plus storage tiering handles the pinned server's device-alignment requirement. No-path launches preserve the existing Lua/endpoint arguments. CLI and persistence guide document both modes and the latency tradeoff.

Regression evidence: on main, the three DataPath assertions fail while three no-path controls pass. In the real emitted-argv queue test, two ready jobs disappear after hard server restart despite PING readiness. At this head, generator and persistence suites pass33/33, including AOF-only and checkpoint-plus-AOF-tail hard-restart cases, delivery and acknowledgement. Test file: garnet-persistence_test.ts. Run with NETSCRIPT_TEST_GARNET_DOCKER=1 and the structured test wrapper. Source test uses exact emitted flags and proves unique resource ownership before cleanup.

Scoped check/lint/format, quality:gate, release:preflight, docs:accuracy, corpus and publish freshness pass. CLI doc lint zero on base/head; JSR dry-run passes with25 existing warnings. Existing generator style preserved without punctuation churn. Full runtime supported-runner run and independent evaluation remain pending; no full-runtime pass is claimed.

Run evidence: .llm/runs/fix-garnet-persistence--issue-2636/. No new dependencies, lock churn, Redis Streams or saga transport edits.

Final supported full smoke: workflow43940698080 SUCCESS at source head3ab21381d: Postgres124/124, SQLite116/116 plus showcase8/8, scaffold-static and desktop-native all pass. Evidence-only followup1e16cc31d changes only run artifacts. Local one-pass stopped at Postgres health timeout (no local Docker), cleanup passed and follow-up ownership preview has zero owned commands. Final independent IMPL-EVAL next.

@rickylabs

Copy link
Copy Markdown
Owner Author

[PHASE: IMPL-EVAL] [VERDICT: PASS]

Managed Garnet DataPath persistence is complete and independently verified at the evaluated head: native AOF recovery, immediate flush acknowledgement, FileStream + storage-tier device configuration, and a shared log/checkpoint directory on every managed launch arm, with no-path argv unchanged.

Route & identity

  • Tier: straightforward, implementation-evaluation. Requested and observed route glm_5_3_flash/provider_default (live matrix primary; no fallback, no substitution). Separate session; different vendor family from the generator (Codex gpt-6.1-sol/xhigh, OpenAI). Policy maxRounds 5.
  • Evaluated head: 1e16cc31d6ca06335e8cd5636e5c10d5675e37de (branch fix/garnet-persistence, base origin/main b0eb079575968e843b781579673c9fe2ae250e07). Delta from the green source head 3ab21381d4b475e3dbd9377415b9ef51fb0586e8 is evidence-only: two run-artifact files under .llm/runs/fix-garnet-persistence--issue-2636/, no product/tests/docs change (verified by diff).
  • Full verdict artifact: .llm/runs/fix-garnet-persistence--issue-2636/evaluate.md (uncommitted by evaluation policy).

Independently observed gates

Gate Result Evidence
Combined generator + persistence suite PASS Evaluator's own run of the mandated command with the Docker test flag enabled on the remote daemon: exit 0, passed:33 failed:0 ignored:0 — both hard-restart delivery oracles (AOF-only and checkpoint+AOF-tail) executed, two ready jobs delivered and acked after KILL/start of an owned container fed the exact emitted argv
Slice typecheck PASS structured check wrapper over the template helpers root: exit 0, 47 files, 0 failures
Pinned-binary flags PASS ghcr.io/microsoft/garnet:2.2.1 --help probed in an evaluator-owned auto-removed container: --aof, --recover, --aof-commit-freq (default 0), --aof-commit-wait, --storage-tier, --device-type, --logdir, --checkpointdir all exist; no checkpoint-frequency option in the pinned help (consistent with the no-timer decision and the upstream #2239 FileStream workaround)
quality:gate (quality:scan + arch:check) PASS exit 0; all listed warnings pre-existing in files untouched by this diff
CLI doc lint PASS exit 0, all three entrypoints 0
CLI JSR dry-run + audit PASS dry-run Success exit 0; audit exit 0 with exactly 25 pre-existing warnings, none in changed files
release:preflight PASS exit 0, four PASS lines
docs:accuracy PASS exit 0, docs accuracy: PASS
Formatter style preservation PASS new test passes the canonical CLI quality config (0 findings); PR-touched generator file has no findings under the described temporary semicolon-off config; remaining findings are pre-existing drift in untouched sibling files
Full runtime (supported runner) PASS workflow 43940698080 SUCCESS at 3ab21381d…: Postgres 124/124, SQLite 116/116 + showcase 8/8, scaffold-static success, desktop-native job succeeded (one non-blocking step error annotation; job conclusion succeeded)
Slice trail PASS 5 commits, each touching the run dir; red test commit precedes the fix commit; PLAN-EVAL N/A recorded with verified-flags rationale before implementation
Resource hygiene PASS post-run scan: zero containers/volumes bearing the test ownership label; no saga-transport edits, no dependency or lock changes

Findings

  1. Low, informational: the supported-runner desktop-native job shows one non-blocking step error annotation while concluding succeeded; recorded for honesty, job-level verdict stands.
  2. Low, informational: nine untouched sibling files in the generator's register folder do not conform to the temporary generator formatter config; no action for this PR.
    No blocking findings.

Harness summary

  • Acceptance coverage: issue [aspire] Managed Garnet starts with no persistence flag #2636 boxes 1–4 backed by generated flags/paths + 33 passing tests, real restart delivery, no-path controls + adjacent generator tests, and CLI README + durability guide — all independently confirmed above.
  • Close-gate posture verified (closing keyword in body, fenced acceptance-evidence block, issue boxes checked with linked evidence); no merge or publish authorized by this evaluation.

Next

  • Generator: proceed with the post-PASS responsibilities — readiness transition, current required checks, and the review-thread gate. PR remains draft until then.
  • Owner/coordinator: merge remains a human decision; nothing here authorizes ready-merge.

@rickylabs
rickylabs marked this pull request as ready for review November 16, 2026 20:07
@rickylabs

Copy link
Copy Markdown
Owner Author

[PHASE: IMPL]

Required quality:cli rejected the legacy-style formatter decision. Commit7cbcfbd3a normalizes only the owned generator with the canonical CLI config; canonical formatter output of the independently evaluated source equals the current generator exactly. Full CLI quality now passes (lint1289files, fmt1164files).

A repeated real-runtime probe hit connection refusal during readiness before delivery assertions. Test readiness now has a deterministic20-second bound and reports its phase; original enqueue/KILL/restart/delivery/ack assertions and5-second delivery bound remain. Combined generator/persistence suite passes33/33 again, including both real hard-restart cases. This boot failure is recorded rather than presented as a durability failure. Green supported full smoke remains at the same generated launch behavior. Independent narrow follow-up evaluation next; required current checks still gate completion.

@rickylabs

Copy link
Copy Markdown
Owner Author

[PHASE: IMPL-EVAL] [VERDICT: PASS]

Cycle 2 delta re-evaluation PASS at head 7cbcfbd3a17e1ddd715c464d589705084ccdf3f6: the only source delta since the retained cycle 1 PASS (1e16cc31d, comment 6927774411) is the required canonical formatting of the owned generator plus a strictly stronger test fixture. Verdict recorded in .llm/runs/fix-garnet-persistence--issue-2636/evaluate.md (cycle 2 section, uncommitted).

Independent delta verification

  1. Generator is formatter-only — extracted the cf901366b generator, ran it through the canonical CLI quality config formatter, and byte-compared against current HEAD: identical (646 → 646 lines, 198 reflowed). No launch, flag, or API change; durable/no-path argv composition semantically unchanged.
  2. Test fixture strictly strengthened — PING readiness is now deterministic (200 attempts × 100 ms, no jitter, bounded 20 s) and failures report phase (initial readiness / restart readiness / recovered delivery). The prior failure was connection-refused at readiness before any delivery assertion. Data loss cannot be masked: after restart the exact ['checkpoint','aof-tail'] delivery assertion, per-message ack, health ready==0, and the unchanged 5-second delivery deadline still apply. Enqueue, KILL/start, and readiness requirement unchanged.
  3. Delta surface — git diff 1e16cc31d..HEAD: generator + test + 4 run artifacts only. No deno.lock, dependency, saga transport, or Streams changes; no tests skipped.

Independent gates at this head

  • Combined generator + persistence suite re-run by this evaluator against the pinned 2.2.1 container: 33/33 passed, 0 failed, 0 ignored (exit 0), including both real hard-restart delivery oracles (AOF-only and checkpoint + AOF-tail). Test-owned containers/volumes zero after the run; foreign resources untouched.
  • Required quality (quality:cli) check pass on this head (job 133586872245); deps-report skipping per policy.
  • Remaining check-test shards still pending in run 43949084683 (in progress); close-gate red is solely the PR body's intentionally unchecked final DoD box (reproduced locally: issue [aspire] Managed Garnet starts with no persistence flag #2636 snapshot clean, only that box named) — expected pre-verdict posture, not a delta finding.
  • PR state verified: open, ready for review, status:impl-eval, Closes #2636 in body, fenced acceptance-evidence block, issue [aspire] Managed Garnet starts with no persistence flag #2636 acceptance boxes all checked with linked evidence.

Findings

  • none blocking
  • low (informational): legacy formatting remains in untouched generator sibling files (pre-existing, unchanged); optional future hygiene only.
  • low (informational): required CI run 43949084683 still in progress (shards pending); close-gate red is the pending final DoD box awaiting this verdict.

Next

  • Generator: commit run artifacts (evaluate.md cycle 2) as artifact-only commit, complete DoD final box after required checks and review-thread gate go green at the current head, then status:ready-merge per the run contract. No merge or publication authorized by this evaluation.

@rickylabs

Copy link
Copy Markdown
Owner Author

[PHASE: REVIEW]

Ready for review at ec80039. Independent IMPL-EVAL PASS and narrow follow-up PASS retained;33/33real generator/persistence tests execute both hard-restart oracles. Supported full runtime Postgres124/124, SQLite116/116+showcase8/8, static/native all green at identical generated behavior. Final commit retains verdict/run evidence only.

Required head quality is SUCCESS; deps-report policy-skipped. Local close-gate PASS at this head with all four issue boxes and complete PR DoD; review-thread gate0threads/0unanswered. Remaining optional shards are still pending; no current failures. No merge/ready-merge/auto-merge/publication performed.

@rickylabs

Copy link
Copy Markdown
Owner Author

[PHASE: IMPL]

Evaluated head: 7cbcfbd3a17e1ddd715c464d589705084ccdf3f6 (approved tip ec80039185f04eeea1c97e33cc888bb713f7f9ce). New head: ef9b327b4eaeed54566707cf585be83af17eb1b9, merging main d1221210eec62787eb9b18fe3809c1e1b0d55725. The delta is merge plus canonical regeneration only: the PR's handwritten diff against main is byte-identical before and after, with no handwritten conflict resolution. Prose/corpus/publish freshness, release:preflight and docs:accuracy pass; labels and acceptance evidence are unchanged.

@rickylabs
rickylabs merged commit ecf982d into main Nov 17, 2026
31 checks passed
@github-actions github-actions Bot added the canary:0.0.10-canary.4 Published NetScript prerelease 0.0.10-canary.4 label Nov 17, 2026
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.

[aspire] Managed Garnet starts with no persistence flag

1 participant