Repository navigation
Scaffold the Pegma workspace and land cache-core Phase 1 - #1
Conversation
Add the org-standard pnpm monorepo (health/scheduler layout), Phase 1 packages @pegma/cache-core and @pegma/cache-conformance, and prove the in-memory store against the conformance suite. Adapter packages are named in the plan only. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14ab66c920
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 14ab66c. Configure here.
Single-flight now coalesces get and compute separately so mixed fail-open/fail-closed callers keep their own policy. Memory-store set copies tags before indexing so later array mutation cannot desync invalidateTags. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Memory-store set now encodes first so a thrown codec leaves the previous entry and tag index intact. Delete purges expired rows and reports them as not live, matching get. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>

Turns this empty GitHub template into an org-standard Pegma workspace and lands Phase 1 of the cache-core plan. Nothing is published, tagged, or merged.
What landed
Workspace copied from current
mainof health (simplest complete workspace) and scheduler (newer two-package sibling): pnpm + Corepackpnpm@10.34.5, Node>=22, CI on 22/24, SHA-pinned Actions, CodeQL, trusted-publisherpublish.yml,scripts/release-packages.mjsthat invokes a real npm CLI (ignoresnpm_execpath), AGENTS/CONTRIBUTING/SECURITY,docs/PROJECT_PLAN.mdin billing-core plan voice,docs/RELEASING.md.LICENSE copyright is now
Copyright (c) 2026 RetireGolden, LLC.Phase 1 packages only (no adapter packages):
@pegma/cache-core—CacheResult,CacheCodec,CacheKey+formatCacheKey,CacheStore(get/set/delete/getOrCompute/invalidateTags/ping), injected SpineClock+Logger(@pegma/spine@0.1.2), JSON/bytes codecs, process-local single-flight helper, optional XFetch, in-memory store, unavailable-backend test double.@pegma/cache-conformance— framework-free suite: namespace isolation, TTL vs injected Clock, N parallel misses → exactly 1 compute, tag invalidation, fail-open compute / fail-closed refuse when the backend errors.Tests prove the in-memory store passes the suite. Redis / Azure Redis / ElastiCache / Upstash are named as later phases in the plan and are not created here.
Sibling conflicts (followed the sibling, noted here)
@pegma/<core>/conformance. Nathan's spec named a first-class@pegma/cache-conformancepackage. This PR follows the spec's package list so later adapters can depend on the suite without pulling the memory store. The shape matches the siblings (conformanceCases, no test-framework dependency).release-packages.mjsis single-package. This repo has two public packages, so the script is scheduler's multi-package version with names adapted. Lockfile importers are checked fordependencies/devDependencies/optionalDependenciesonly (no requiredpeerDependenciessection). Caret-zero follows npm (^0→<1.0.0,^0.0→<0.1.0,^0.0.3is only0.0.3); exact prerelease pins match by identity; pnpm peer suffixes are stripped at the first(.pnpm-workspace.yaml. health is a single package. This file adds scheduler'slinkWorkspacePackages/preferWorkspacePackagesso the unpublished@pegma/cache-coreworkspace pin resolves.Review follow-ups
c0180416aee4e7c367d58fae889f1ecfa6fe1dda): isolate fallback outcomes in single-flight; snapshot tag arrays before indexing.2a58d85071e88388cc13591d7fd52b52062895b8): encode before reindexing so a thrown codec cannot drop the previous tag index;deletepurges expired entries and reports them as not live, matchingget.Gate
Locally, on Node 22:
pnpm run format:checkpnpm run checkpnpm test(43 passing)pnpm run release:checkDo not publish. Trusted-publisher npm config is documented in
docs/RELEASING.mdand is not enabled by this PR.