Skip to content

🧾 feat: Add Skill Upload Reservation Helpers - #17041

Merged
dustinhealy merged 7 commits into
feat/skill-lifecycle-persistencefrom
feat/skill-upload-intents
Oct 16, 2026
Merged

dustinhealy merged 7 commits into
feat/skill-lifecycle-persistencefrom
feat/skill-upload-intents

Conversation

@dustinhealy

Copy link
Copy Markdown
Collaborator

Summary

Add reusable upload-intent and blob-reservation helpers. This is an inert API-layer slice of the durable Skill lifecycle stack: existing upload callers are not switched in this PR. Depends on #17040 and replaces part of #17007.

How it works

A writer reserves the future object location and records an upload intent before writing bytes. The helper advances the intent only after the file row is committed and retains ambiguous outcomes for recovery rather than guessing that an in-flight writer has stopped.

Type of change

  • Feature
  • Tests / tooling / CI

Testing

Tested environments/configuration: Mocked storage strategies and the local API workspace.

Automated tests: API TypeScript typecheck; 12 focused intent/reservation tests. The existing Skill HTTP routes remain unchanged in this slice.

Screenshots / recordings

No user-facing change.

Risk / compatibility

These helpers have no live callers until the final integration PR. The following cleanup-engine and integration PRs complete the upload and deletion lifecycle.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors
  • User-facing or complex behavior is documented where necessary
  • Required dependency changes have been merged/published
  • Required documentation PR: N/A

@dustinhealy
dustinhealy added this pull request to stack #17044 October 13, 2026 02:12
@dustinhealy
dustinhealy removed this pull request from stack #17044 October 13, 2026 02:43
@dustinhealy
dustinhealy added this pull request to stack #17045 October 13, 2026 02:44
Copilot AI balanced review requested due to automatic review settings October 13, 2026 02:56
@dustinhealy
dustinhealy force-pushed the feat/skill-upload-intents branch from a640648 to 31e603c Compare October 13, 2026 02:56

Copilot AI 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.

🟡 Changes recommended

Upload intents discard canonical storage keys, and capability validation can accept non-callable cleanup implementations.

2 open findings
What changed in this PR

Adds reusable Skill upload-intent and blob-reservation helpers for the durable lifecycle stack.

Changes:

  • Adds storage reservation and provider-pinned writing helpers.
  • Adds upload-intent transitions with recovery and compensation behavior.
  • Adds focused lifecycle tests.
File Description
packages/​api/​src/​skills/​reservation.ts Implements storage resolution, reservation, and writing.
packages/​api/​src/​skills/​reservation.spec.ts Tests supported providers and configuration changes.
packages/​api/​src/​skills/​intent.ts Implements durable upload-intent orchestration.
packages/​api/​src/​skills/​intent.spec.ts Tests ordering, recovery, and cleanup paths.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/api/src/skills/intent.ts Outdated
Comment thread packages/api/src/skills/reservation.ts Outdated
@dustinhealy
dustinhealy force-pushed the feat/skill-upload-intents branch from 31e603c to 716c62e Compare October 13, 2026 17:36
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T20:01:43.122726Z fea5593 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 716c62e91c

ℹ️ 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/api/src/skills/intent.ts Outdated
Comment thread packages/api/src/skills/reservation.ts Outdated
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 28a256a88b

ℹ️ 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/api/src/skills/intent.ts Outdated
Comment thread packages/api/src/skills/intent.ts Outdated
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 998a7b4bbd

ℹ️ 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/api/src/skills/reservation.ts Outdated
Comment thread packages/api/src/skills/intent.ts
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 93cca1d02e

ℹ️ 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/api/src/skills/reservation.ts Outdated
@dustinhealy

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 10e0900f39

ℹ️ 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 on lines +14 to +15
export * from './intent';
export * from './reservation';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wire reservation helpers into Skill upload paths

A repo-wide search finds these helpers only in their definitions and tests; the production paths still call saveBuffer directly before upsertSkillFile in packages/api/src/skills/save.ts:85-114 and packages/api/src/skills/upload.ts:105-131, while api/server/services/Endpoints/agents/skillDeps.js:71-87 continues wiring the old resolver. Consequently, a process exit between the blob write and metadata upsert still creates an unjournaled orphan, so exporting the helpers does not deliver the reservation behavior. Wire the TS helpers and lifecycle dependencies into both upload paths through the CJS adapter.

AGENTS.md reference: AGENTS.md:L78-L82

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a real integration requirement. This PR introduces the reservation/intent helpers, but does not claim to wire the production upload paths by itself. The dependent stack PR that converts direct upload/edit, import, and sync to pass one frozen reservation through the writer is #17043. The six PRs are being landed as one stack with no deployment between merges, so the orphan window is not considered closed until that integration PR lands. Leaving this thread open as an explicit stack release gate.

Comment thread packages/api/src/skills/publicExports.spec.ts Outdated

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: fea5593048

ℹ️ 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".

@dustinhealy
dustinhealy force-pushed the feat/skill-upload-intents branch from fea5593 to 9b5b161 Compare October 16, 2026 13:55
@dustinhealy
dustinhealy marked this pull request as ready for review October 16, 2026 13:59
@dustinhealy
dustinhealy force-pushed the feat/skill-upload-intents branch from 9b5b161 to 1601c88 Compare October 16, 2026 14:27
@dustinhealy
dustinhealy merged commit 6279dd3 into dev Oct 16, 2026
41 of 65 checks passed
@dustinhealy
dustinhealy deleted the feat/skill-upload-intents branch October 16, 2026 16:05
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.

2 participants