Skip to content

Scaffold the Pegma workspace and land cache-core Phase 1 - #1

Merged
cursor[bot] merged 3 commits into
mainfrom
claude/cache-core-phase-1-9768
Aug 15, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
claude/cache-core-phase-1-9768

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

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 main of health (simplest complete workspace) and scheduler (newer two-package sibling): pnpm + Corepack pnpm@10.34.5, Node >=22, CI on 22/24, SHA-pinned Actions, CodeQL, trusted-publisher publish.yml, scripts/release-packages.mjs that invokes a real npm CLI (ignores npm_execpath), AGENTS/CONTRIBUTING/SECURITY, docs/PROJECT_PLAN.md in 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 Spine Clock + 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)

  1. Conformance packaging. storage-core and storage-blobs export the suite as @pegma/<core>/conformance. Nathan's spec named a first-class @pegma/cache-conformance package. 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).
  2. Release script. health's release-packages.mjs is single-package. This repo has two public packages, so the script is scheduler's multi-package version with names adapted. Lockfile importers are checked for dependencies / devDependencies / optionalDependencies only (no required peerDependencies section). Caret-zero follows npm (^0 → <1.0.0, ^0.0 → <0.1.0, ^0.0.3 is only 0.0.3); exact prerelease pins match by identity; pnpm peer suffixes are stripped at the first (.
  3. Dependabot. health and scheduler do not ship Dependabot config; this PR does not either.
  4. pnpm-workspace.yaml. health is a single package. This file adds scheduler's linkWorkspacePackages / preferWorkspacePackages so the unpublished @pegma/cache-core workspace pin resolves.

Review follow-ups

  • Codex P1/P2 (c0180416aee4e7c367d58fae889f1ecfa6fe1dda): isolate fallback outcomes in single-flight; snapshot tag arrays before indexing.
  • Bugbot (2a58d85071e88388cc13591d7fd52b52062895b8): encode before reindexing so a thrown codec cannot drop the previous tag index; delete purges expired entries and reports them as not live, matching get.

Gate

Locally, on Node 22:

  • pnpm run format:check
  • pnpm run check
  • pnpm test (43 passing)
  • pnpm run release:check

Do not publish. Trusted-publisher npm config is documented in docs/RELEASING.md and is not enabled by this PR.

Open in Web Open in Cursor 

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/cache-core/src/index.ts Resolved
Comment thread packages/cache-core/src/index.ts Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread packages/cache-core/src/index.ts Resolved
Comment thread packages/cache-core/src/index.ts Resolved
cursoragent and others added 2 commits August 15, 2026 16:29
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>
@cursor
cursor Bot merged commit 1d28ccc into main Aug 15, 2026
5 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the claude/cache-core-phase-1-9768 branch August 16, 2026 00:45
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.

3 participants