Skip to content

fix: static Caplet vault configuration - #238

Merged
ian-pascoe merged 3 commits into
mainfrom
worktree/calm-harbor-9761
Jul 22, 2026
Merged

fix: static Caplet vault configuration#238
ian-pascoe merged 3 commits into
mainfrom
worktree/calm-harbor-9761

Conversation

@ian-pascoe

@ian-pascoe ian-pascoe commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve Vault grant targets from effective config and Caplet File provenance
  • quarantine static Caplets with unresolved Vault references so Host startup can continue
  • accept canonical-equivalent Caplets roots during lockfile validation
  • update the Node/pnpm runtime and stabilize macOS, WebSocket, remote lifecycle, and package-runtime verification

Verification

  • pnpm verify
  • 3,013 tests passed; 47 skipped
  • built package runtime smoke passed, including the 256 MiB streaming bundle scenario

Release

  • includes a patch changeset for @caplets/core

Summary by CodeRabbit

  • Bug Fixes

    • Vault grants now resolve correctly from both configuration files and Caplet files.
    • Caplets with unresolved Vault references are quarantined during Host startup instead of blocking startup entirely.
    • Caplet roots now work reliably when accessed through canonically equivalent paths, including symlinked locations.
    • Vault access grants now retain accurate source information for improved management and troubleshooting.
  • Chores

    • Updated supported development tooling and container build versions.
    • Improved temporary-file handling and runtime smoke-test reliability.

@socket-security

socket-security Bot commented Jul 22, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @sentry/node-core is 62.0% likely obfuscated

Confidence: 0.62

Location: Package overview

From: pnpm-lock.yamlnpm/@sentry/node@10.67.0npm/@sentry/node-core@10.67.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@sentry/node-core@10.67.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm astro is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: apps/catalog/package.jsonnpm/astro@7.1.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/astro@7.1.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ian-pascoe, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bc66d8c-40fc-4a02-90c7-148c502be995

📥 Commits

Reviewing files that changed from the base of the PR and between 2c44729 and faadf2a.

📒 Files selected for processing (11)
  • Dockerfile
  • apps/catalog/package.json
  • apps/docs/package.json
  • mise.toml
  • package.json
  • packages/core/src/cli.ts
  • packages/core/src/config.ts
  • packages/core/src/engine.ts
  • packages/core/test/cli.test.ts
  • packages/core/test/host-storage-config.test.ts
  • packages/core/test/serve-http.test.ts
📝 Walkthrough

Walkthrough

Vault grants now preserve configuration origins, unresolved Vault references are quarantined during startup, and canonical-equivalent Caplet roots pass lockfile validation. Toolchain metadata, test setup, WebSocket helpers, and runtime smoke checks are also updated.

Changes

Vault recovery and grant origins

Layer / File(s) Summary
Vault grant origin resolution
packages/core/src/cli.ts, packages/core/test/cli.test.ts
Vault grant commands derive origin kind and path from the Caplet’s active configuration source and reload grants using that metadata.
Startup quarantine and warning propagation
packages/core/src/config.ts, packages/core/src/engine.ts, packages/core/test/host-storage-config.test.ts, .changeset/calm-vault-origins.md
Configuration loading quarantines unresolved Vault references, emits warnings, and allows Host startup to continue without enabling affected servers.

Canonical Caplet roots

Layer / File(s) Summary
Canonical root validation
packages/core/src/lockfile.ts, packages/core/test/caplets-lockfile.test.ts
Lockfile path checks compare resolved paths against the canonical Caplet root and test symlink-equivalent roots.

Runtime and test maintenance

Layer / File(s) Summary
Toolchain and package metadata
Dockerfile, package.json, apps/*/package.json, packages/*/package.json, mise.toml, .omp/lsp.json, .gitignore
pnpm, Node, Bun engine, LSP, and temporary-file configuration is updated.
Test runtime and asynchronous socket handling
apps/dashboard/vitest.config.ts, apps/dashboard/src/components/DashboardApp.test.tsx, packages/core/test/*
Test storage and temporary-directory handling is normalized, timer assertions are made deterministic, and WebSocket JSON messages are buffered per socket.
Runtime smoke-plan synchronization
scripts/check-package-runtime.mjs, scripts/package-runtime-plan-000-smoke.mjs
Smoke checks use a peer operator, wait for caplet-count convergence, and revise RSS threshold calculations.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Host
  participant ConfigLoader
  participant VaultResolver
  participant WarningSink
  Host->>ConfigLoader: load stored and overlay Caplets
  ConfigLoader->>VaultResolver: resolve Vault references
  VaultResolver-->>ConfigLoader: resolved values or unresolved warnings
  ConfigLoader->>WarningSink: forward overlay warnings
  ConfigLoader-->>Host: assembled configuration with quarantined Caplets
Loading

Possibly related PRs

Poem

A rabbit watched the Vault keys glow,
While grants found origins below.
Roots aligned through symlinked trails,
Tests queued messages and chased details.
“Hop,” said Bunny, “startup now flows!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly matches the main change around fixing static Caplet Vault configuration.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree/calm-harbor-9761

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ian-pascoe ian-pascoe changed the title Fix static Caplet vault configuration fix: static Caplet vault configuration Jul 22, 2026
@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes static Caplet Vault configuration and updates runtime verification. The main changes are:

  • Resolve Vault grant provenance from the effective Caplet source.
  • Quarantine unresolved Caplets without reactivating shadowed definitions.
  • Accept canonically equivalent roots during lockfile validation.
  • Update Node and pnpm tooling and stabilize runtime tests.

Confidence Score: 5/5

This looks safe to merge.

  • The updated merge logic keeps quarantined overrides from exposing lower-precedence Caplets.
  • Vault grant commands now use the effective source selected by the configuration overlay.
  • No blocking issues remain in the reviewed fixes.

Important Files Changed

Filename Overview
packages/core/src/config.ts Tracks quarantined IDs during source merging so lower-precedence definitions remain disabled.
packages/core/src/cli.ts Uses the effective overlay source as the origin of locally created Vault grants.
packages/core/src/engine.ts Passes Vault recovery and warning options through the host-storage configuration loader.
packages/core/src/lockfile.ts Validates existing destinations against the canonical Caplets root.

Reviews (2): Last reviewed commit: "fix: address vault configuration review" | Re-trigger Greptile

Comment thread packages/core/src/config.ts
Comment thread packages/core/src/cli.ts Outdated
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.omp/lsp.json:
- Around line 3-5: Update the typescript-language-server configuration entry in
.omp/lsp.json to invoke typescript-language-server with the --stdio argument
instead of tsc with --lsp --stdio, ensuring it uses the available LSP executable
and preserves the existing entry structure.

In `@mise.toml`:
- Around line 3-4: Replace the latest toolchain values in the mise configuration
with explicit Node and pnpm versions matching the repository’s Dockerfile,
package manifests, and pinned pnpm metadata. Keep both tool definitions present
and aligned with those declared requirements.

In `@package.json`:
- Around line 74-76: Restore the repository-wide pnpm pin to 11.7.0: update
package.json, Dockerfile, apps/catalog/package.json, and apps/docs/package.json
so the packageManager values and Docker PNPM_VERSION are all aligned with that
version.

In `@packages/core/src/engine.ts`:
- Around line 194-198: Update CapletsEngine.create() to forward
options.vaultRecoveryTarget in the options object passed to
loadConfigWithHostStorage, preserving the caller-selected recovery target for
both startup and reload.

In `@packages/core/test/serve-http.test.ts`:
- Around line 5507-5525: Update the socket event handling around
nextSocketJson() so the close event uses the same queue-failure logic as the
error event: record the close error/state in queue.error and reject all pending
queue.waiters. Preserve the existing error handling and outcome queuing
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d1f18b6-a0a7-45c3-be4f-4a125ad156e0

📥 Commits

Reviewing files that changed from the base of the PR and between ba2323a and 2c44729.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • .changeset/calm-vault-origins.md
  • .gitignore
  • .omp/lsp.json
  • Dockerfile
  • apps/catalog/package.json
  • apps/dashboard/src/components/DashboardApp.test.tsx
  • apps/dashboard/vitest.config.ts
  • apps/docs/package.json
  • mise.toml
  • package.json
  • packages/cli/package.json
  • packages/core/package.json
  • packages/core/src/cli.ts
  • packages/core/src/config.ts
  • packages/core/src/engine.ts
  • packages/core/src/lockfile.ts
  • packages/core/test/caplets-lockfile.test.ts
  • packages/core/test/cli.test.ts
  • packages/core/test/engine.test.ts
  • packages/core/test/host-storage-config.test.ts
  • packages/core/test/native-remote.test.ts
  • packages/core/test/serve-http.test.ts
  • packages/core/test/setup-env.ts
  • scripts/check-package-runtime.mjs
  • scripts/package-runtime-plan-000-smoke.mjs
💤 Files with no reviewable changes (2)
  • packages/core/package.json
  • packages/cli/package.json

Comment thread .omp/lsp.json
Comment thread mise.toml Outdated
Comment thread package.json Outdated
Comment thread packages/core/src/engine.ts
Comment thread packages/core/test/serve-http.test.ts
@ian-pascoe
ian-pascoe merged commit 52cbc75 into main Jul 22, 2026
10 checks passed
@ian-pascoe
ian-pascoe deleted the worktree/calm-harbor-9761 branch July 22, 2026 13:13
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