Skip to content

feat: resolve managed owner-global items - #10

Merged
ygpark80 merged 1 commit into
mainfrom
feat/runner-routing-managed-items
Aug 21, 2026
Merged

feat: resolve managed owner-global items#10
ygpark80 merged 1 commit into
mainfrom
feat/runner-routing-managed-items

Conversation

@ygpark80

@ygpark80 ygpark80 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

User description

Closes circlesac/padawan#195

Changes

  • Resolve service-managed plain items in owner-global coordinates.
  • Preserve project-before-global resolution order.
  • Keep item titles and secret names out of coordinate read payloads.

Testing

  • bun test node/src/ cli/src/ (75 passed, 1 skipped)
  • npm run build:sdk

Notes

  • The published SDK/CLI release is required before consumers outside this worktree use the resolver.

CodeAnt-AI Description

Resolve service-managed plain items from owner-global references

What Changed

  • cvlt read vlt://… can now resolve plain items managed by a private service in owner-global Vaults
  • Resolution keeps project-specific items ahead of owner-global items
  • Read requests avoid sending item titles or secret names while supporting both encrypted and plain candidates
  • Added coverage for owner-global plain-item resolution and inheritance order

Impact

✅ Plain service-managed items resolve from owner-global references
✅ Project-specific values continue to take precedence
✅ Secret names stay out of coordinate read requests

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Aug 21, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR c505744 Aug 21, 2026 · 10:20 10:23

@codeant-ai

codeant-ai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d4407348-3c27-4f37-92c5-5ab1daf9eaf3


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.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 21, 2026
@ygpark80
ygpark80 merged commit 5aac28c into main Aug 21, 2026
2 checks passed
@ygpark80
ygpark80 deleted the feat/runner-routing-managed-items branch August 21, 2026 10:22
Comment on lines +220 to +240
const vaultRow = {
id: vaultId,
attribute_version: 1,
content_version: 2,
created_at: "2026-08-21T00:00:00Z",
updated_at: "2026-08-21T00:00:00Z",
items: 2,
format_version: 1,
overview: await encryptJson(
{ name: "github.com/circlesac", description: "", type: "USER_CREATED" },
key,
`cvlt:v1:vault:${vaultId}:overview`
),
wrapped_vault_key: null,
kms_wrapped_vault_key: {
version: 1,
algorithm: "RSA-OAEP-3072-SHA256",
ciphertext: "wrapped",
},
coordinate: { provider: "github.com", owner: "circlesac", repository: null },
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: This fixture does not model the service-managed plain vault described by the test: it omits content_mode, supplies an encrypted overview, and provides a KMS-wrapped key. The test therefore exercises the E2EE locator path and cannot catch the production failure where vaultKey is called for a real plain vault. Mark the vault row as plain and remove the encryption-only key material so the test covers the intended path. [incomplete implementation]

Severity Level: Major ⚠️
- ⚠️ Regression test misses plain-vault key handling.
- ❌ Intended service-managed coordinate behavior remains untested.
- ⚠️ Future implementation changes may pass incorrectly.

Use CodeAnt Skill

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** node/src/e2ee-client.test.ts
**Line:** 220:240
**Comment:**
	*Incomplete Implementation: This fixture does not model the service-managed plain vault described by the test: it omits `content_mode`, supplies an encrypted overview, and provides a KMS-wrapped key. The test therefore exercises the E2EE locator path and cannot catch the production failure where `vaultKey` is called for a real plain vault. Mark the vault row as plain and remove the encryption-only key material so the test covers the intended path.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment thread node/src/e2ee-client.ts
Comment on lines 824 to 830
for (const row of rows) {
candidates.push({ vault_id: row.id, locator: await itemLocator(await vaultKey(config, row, fetchOidcToken), name) })
const plain = (await itemRows(config, row.id)).find((item) =>
item.content_mode === "plain" && item.title === name
)
if (plain) candidates.push({ vault_id: row.id, item_id: plain.id })
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: Plain service-managed vaults do not have an E2EE vault-key envelope, so this unconditional vaultKey call throws before the newly added plain-item candidate can be discovered. Skip the locator candidate for row.content_mode === "plain" and only query item summaries for that vault. [api mismatch]

Severity Level: Critical 🚨
- ❌ Service-managed coordinate reads fail before item resolution.
- ❌ GitHub Actions secret reads cannot resolve plain items.
- ⚠️ `/v1/coordinates/read` receives no plain-item candidate.

Use CodeAnt Skill

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** node/src/e2ee-client.ts
**Line:** 824:830
**Comment:**
	*Api Mismatch: Plain service-managed vaults do not have an E2EE vault-key envelope, so this unconditional `vaultKey` call throws before the newly added plain-item candidate can be discovered. Skip the locator candidate for `row.content_mode === "plain"` and only query item summaries for that vault.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant