Skip to content

feat(shortcut): add Relayfile adapter and webhook catalog - #259

Merged
khaliqgant merged 9 commits into
mainfrom
codex/shortcut-relay
Aug 10, 2026
Merged

feat(shortcut): add Relayfile adapter and webhook catalog#259
khaliqgant merged 9 commits into
mainfrom
codex/shortcut-relay

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • add the Shortcut Relayfile adapter for Story and Epic canonical paths
  • emit discovery indexes, schemas, canonical records, and by-id aliases
  • normalize bundled Shortcut webhook actions and verify Payload-Signature
  • classify terminal lifecycle updates in digests
  • register Shortcut webhook events in the generated trigger catalog

Validation

  • npm run build --workspace=packages/shortcut
  • npm test --workspace=packages/shortcut
  • node --import tsx packages/core/src/cli.ts triggers check --repo-root .
  • npm test (repository checks reach the full Turbo catalog build; the unrelated webhook-server build is blocked by missing hono and @hono/node-server in this checkout)

Review in cubic

@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 21 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b1f7f991-000e-4ce8-b927-436b9f7d014f

📥 Commits

Reviewing files that changed from the base of the PR and between 0388570 and 3ddc908.

📒 Files selected for processing (22)
  • packages/core/src/runtime/file-native-router.test.ts
  • packages/core/src/runtime/file-native-router.ts
  • packages/shortcut/discovery/shortcut/.adapter.md
  • packages/shortcut/discovery/shortcut/custom-fields/.schema.json
  • packages/shortcut/discovery/shortcut/groups/.create.example.json
  • packages/shortcut/discovery/shortcut/groups/.schema.json
  • packages/shortcut/discovery/shortcut/iterations/.schema.json
  • packages/shortcut/discovery/shortcut/members/.schema.json
  • packages/shortcut/discovery/shortcut/milestones/.create.example.json
  • packages/shortcut/discovery/shortcut/milestones/.schema.json
  • packages/shortcut/discovery/shortcut/projects/.create.example.json
  • packages/shortcut/discovery/shortcut/projects/.schema.json
  • packages/shortcut/discovery/shortcut/stories/.create.example.json
  • packages/shortcut/discovery/shortcut/stories/.schema.json
  • packages/shortcut/src/digest.ts
  • packages/shortcut/src/emit-auxiliary-files.ts
  • packages/shortcut/src/resources.ts
  • packages/shortcut/src/shortcut.test.ts
  • scripts/generate-writeback-discovery.mjs
  • scripts/verify-writeback-discovery.mjs
  • scripts/writeback-discovery-data.mjs
  • scripts/writeback-discovery-normalizer.mjs
📝 Walkthrough

Walkthrough

Added the @relayfile/adapter-shortcut package. It supports Shortcut resource paths, webhook normalization, canonical and alias files, resource discovery, digest events, tests, and build integration.

Changes

Shortcut adapter

Layer / File(s) Summary
Path, resource, and discovery contracts
packages/shortcut/src/types.ts, packages/shortcut/src/path-mapper.ts, packages/shortcut/src/resources.ts, packages/shortcut/src/sync-bucketing.ts, packages/shortcut/discovery/shortcut/..., scripts/writeback-discovery-*, docs/writeback-spec-coverage.md
Defines Shortcut types, path builders, resource metadata, sync bucketing, schemas, examples, discovery documentation, and ID validation for 11 resource types.
Webhook normalization and digest handling
packages/shortcut/src/webhook-normalizer.ts, packages/shortcut/src/digest.ts, packages/shortcut/shortcut.mapping.yaml, packages/shortcut/src/shortcut.test.ts
Normalizes webhook payloads and headers, maps nested events, and classifies digest actions and terminal states.
Auxiliary files and layout
packages/shortcut/src/emit-auxiliary-files.ts, packages/shortcut/src/layout-prompt.ts, packages/shortcut/src/shortcut.test.ts
Writes indexes, canonical records, and aliases. Handles collisions, stale files, deleted records, and path-specific errors. Publishes the Shortcut layout prompt.
Package and repository integration
packages/shortcut/package.json, packages/shortcut/tsconfig.json, packages/shortcut/src/index.ts, packages/shortcut/src/inbound.ts, turbo.json, scripts/resolve-publish-targets.mjs, packages/core/tests/inbound/catalog-generator.test.ts
Adds package configuration, exports, inbound capability data, publication targeting, build wiring, and catalog expectations.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Shortcut
  participant normalizeShortcutWebhook
  participant ShortcutPathMapper
  participant DigestHandler
  Shortcut->>normalizeShortcutWebhook: webhook payload and headers
  normalizeShortcutWebhook->>normalizeShortcutWebhook: validate and normalize actions
  normalizeShortcutWebhook->>ShortcutPathMapper: normalize entity type
  ShortcutPathMapper-->>normalizeShortcutWebhook: Shortcut object type
  normalizeShortcutWebhook->>DigestHandler: normalized event
  DigestHandler-->>normalizeShortcutWebhook: digest description and terminal state
Loading

Possibly related PRs

Suggested labels: size:XL

Poem

A rabbit maps each Shortcut trail,
Stories and epics leave a file.
Webhooks hop through paths at night,
Indexes keep each record right.
Tests guard every burrowed row.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.04% 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.
Title check ✅ Passed The title clearly identifies the Shortcut adapter and webhook catalog, which are central to the changeset.
Description check ✅ Passed The description directly summarizes the adapter, resource coverage, webhook handling, digest behavior, catalog registration, and validation.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/shortcut-relay

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 7

🤖 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 `@packages/shortcut/package.json`:
- Line 33: Update the Node compatibility contract for the test script in
packages/shortcut/package.json: either raise the declared engine minimum to Node
18.18 or later so --import tsx is supported, or revise the test command to work
on Node 18.0–18.17 without globally using --import. Keep npm test functional
across every version declared as supported.

In `@packages/shortcut/src/emit-auxiliary-files.ts`:
- Around line 48-58: The Shortcut emitter in emitAuxiliaryFiles must generate
deterministic, collision-safe Story aliases for by-id, by-state, by-assignee,
by-creator, by-priority, and other natural lookup keys, while preserving
materialized canonical record bodies. Update
packages/shortcut/src/emit-auxiliary-files.ts lines 48-58 accordingly; document
every emitted alias subtree and that aliases mirror canonical records in
packages/shortcut/src/layout-prompt.ts lines 7-9.
- Around line 74-75: Update deleteJson so a missing client.deleteFile is
reported as a failure rather than returning successfully. Record an error in the
provided EmitAuxiliaryFilesResult for the specific path, ensuring both canonical
and alias delete paths remain visible as failures instead of being silently
ignored.

In `@packages/shortcut/src/path-mapper.ts`:
- Around line 61-63: The shortcutByIdAliasPath function must generate aliases
using the shared slugifyAlias and aliasCollisionSuffix utilities in the required
slug__id format, including collision-safe suffixes for IDs that normalize to the
same slug. In packages/shortcut/src/path-mapper.ts lines 61-63, update alias
construction accordingly; in packages/shortcut/src/shortcut.test.ts lines 39-50,
add a collision test verifying both generated aliases resolve to their
respective canonical records.
- Around line 52-58: Reserve the generated “_index” filename from canonical
record IDs: update computeShortcutPath and the ID/writeback handling in
packages/shortcut/src/path-mapper.ts (lines 52-58) and
packages/shortcut/src/resources.ts (lines 10-17) to reject or exclude that
reserved value before creating or accepting canonical paths. Add coverage in
packages/shortcut/src/shortcut.test.ts (lines 39-50) confirming reserved IDs
cannot resolve to canonical record paths.

In `@packages/shortcut/src/shortcut.test.ts`:
- Around line 23-50: Add typed parsers for canonical and by-ID Shortcut paths,
then extend the “Shortcut adapter” tests with Story and Epic compose→parse
equality cases using encoded IDs. Verify each parser recovers the correct object
type and ID from paths produced by the corresponding compose helpers, covering
both canonical and alias paths as applicable.

In `@packages/shortcut/src/webhook-normalizer.ts`:
- Around line 41-57: Update normalizeShortcutWebhook in
packages/shortcut/src/webhook-normalizer.ts:41-57 to use an explicit supported
event table, reject unsupported entity_type/action pairs, and keep terminal
actions classified as non-delete actions. Update
packages/shortcut/shortcut.mapping.yaml:1-7 to declare every event emitted by
that table via supportedEvents(). Extend
packages/shortcut/src/shortcut.test.ts:24-37 to cover each supported event and
verify unsupported pairs fail normalization.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b9c6575-17f2-4538-a99f-4945d44037db

📥 Commits

Reviewing files that changed from the base of the PR and between 07327ba and 3ea9803.

⛔ Files ignored due to path filters (3)
  • package-lock.json is excluded by !**/package-lock.json
  • packages/core/src/triggers/catalog.generated.json is excluded by !**/*.generated.*
  • packages/core/src/triggers/catalog.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (14)
  • packages/shortcut/package.json
  • packages/shortcut/shortcut.mapping.yaml
  • packages/shortcut/src/digest.ts
  • packages/shortcut/src/emit-auxiliary-files.ts
  • packages/shortcut/src/index.ts
  • packages/shortcut/src/layout-prompt.ts
  • packages/shortcut/src/path-mapper.ts
  • packages/shortcut/src/resources.ts
  • packages/shortcut/src/shortcut.test.ts
  • packages/shortcut/src/sync-bucketing.ts
  • packages/shortcut/src/types.ts
  • packages/shortcut/src/webhook-normalizer.ts
  • packages/shortcut/tsconfig.json
  • turbo.json

Comment thread packages/shortcut/package.json
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/path-mapper.ts Outdated
Comment thread packages/shortcut/src/path-mapper.ts Outdated
Comment thread packages/shortcut/src/shortcut.test.ts
Comment thread packages/shortcut/src/webhook-normalizer.ts

@devin-ai-integration devin-ai-integration 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.

Devin Review found 8 potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/resources.ts Outdated
Comment thread packages/shortcut/src/resources.ts Outdated
Comment thread packages/shortcut/src/layout-prompt.ts
Comment thread packages/shortcut/src/path-mapper.ts
Comment thread packages/shortcut/src/digest.ts Outdated
Comment thread packages/shortcut/package.json
Comment thread packages/shortcut/src/shortcut.test.ts

@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: 3ea9803c48

ℹ️ 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/shortcut/src/resources.ts Outdated
Comment thread packages/shortcut/src/resources.ts Outdated
Comment thread packages/shortcut/src/resources.ts
Comment thread packages/shortcut/shortcut.mapping.yaml
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/path-mapper.ts Outdated
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/webhook-normalizer.ts
Comment thread packages/shortcut/src/layout-prompt.ts Outdated
Comment thread packages/shortcut/package.json

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/digest.ts
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/package.json
Comment thread packages/shortcut/src/digest.ts Outdated
Comment thread packages/shortcut/src/layout-prompt.ts Outdated
Comment thread packages/shortcut/package.json
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/webhook-normalizer.ts Outdated
@khaliqgant

Copy link
Copy Markdown
Member Author

Expanded Shortcut coverage is now pushed in commit 3ea5049.

  • Added all 11 writable REST resources from the Nango template to resources, canonical paths, indexes, aliases, sync bucketing, and layout/discovery contracts.
  • Added parent Story/Epic refresh semantics for nested webhook actions and terminal-state-preserving digest coverage.
  • Kept Hookdeck as the webhook trust boundary; no separate Shortcut webhook secret is required.
  • Validation: npm run build && npm test in packages/shortcut passes (3/3). Trigger catalog check passes; Shortcut is present with its six upstream event names.

Cloud install remains dependent on publishing/installing @relayfile/adapter-shortcut@0.1.0.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 7 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/shortcut/src/emit-auxiliary-files.ts
Comment thread packages/shortcut/src/path-mapper.ts Outdated
@khaliqgant

Copy link
Copy Markdown
Member Author

Addressed the review feedback and refreshed the generated artifacts.

Changes pushed:

  • 9c80898f: Shortcut review fixes — Node >=18.18, reserved _index protection, shared slug/collision-safe aliases (by-id, by-title, by-state, by-assignee, by-creator, by-priority), canonical/alias compose→parse coverage, per-path delete failures, incremental index reconciliation, explicit stories pluralization, webhook supported-event validation plus nested parent refresh handling, digest terminal-state classification, layout/discovery coverage, inbound declaration, and Shortcut catalog registration.
  • 9ae7eb02: clean-build writeback catalog refresh, including Cloudflare resources revealed by the fresh build.
  • 03885702: regenerated relay-helpers clients (cloudflareClient and existing Shortcut client) to match the catalog.

Validation:

  • Shortcut build, typecheck, and 16 focused tests pass locally.
  • npm test’s generated discovery/digest/catalog gates pass locally.
  • GitHub Actions run 31425630366 is green: Build, Typecheck, and Test all passed.

@khaliqgant

Copy link
Copy Markdown
Member Author

Note on the older Cubic custom-field finding: it is stale against the current branch. sync-bucketing.ts emits the custom-fields bucket, the emitter consumes custom-fields, and the Shortcut test covers all 11 resource buckets including custom fields. No additional change is required for that finding.

@coderabbitai coderabbitai 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.

Actionable comments posted: 14

🤖 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 `@packages/shortcut/discovery/shortcut/.adapter.md`:
- Around line 5-16: Rename the “Read-only mounts” section to describe canonical
resource mounts, then document each listed resource’s actual write capability
based on the edit, create, and delete operations defined in the adapter
documentation. Ensure read-only status is retained only for resources without
write operations.

In `@packages/shortcut/discovery/shortcut/custom-fields/.create.example.json`:
- Around line 1-8: Remove the custom-fields create example and create-only
documentation, and update the custom-fields resource metadata and discovery
generator so it is classified as update/delete-only without a createExample or
non-canonical create filename handling. In
packages/shortcut/discovery/shortcut/custom-fields/.schema.json, make field_type
readOnly and define values.items as update enum objects with id, value,
color_key, and enabled fields, while leaving values itself optional. Apply the
schema change at packages/shortcut/discovery/shortcut/custom-fields/.schema.json
lines 78-89; the create example at
packages/shortcut/discovery/shortcut/custom-fields/.create.example.json lines
1-8 must be removed.

In `@packages/shortcut/discovery/shortcut/groups/.schema.json`:
- Around line 5-7: Add mention_name as a writable string property in
packages/shortcut/discovery/shortcut/groups/.schema.json, include it alongside
name in required, and add a representative value to the create example in
packages/shortcut/discovery/shortcut/groups/.create.example.json; update the
Group creation schema and example consistently across the affected sites.

In `@packages/shortcut/discovery/shortcut/iterations/.schema.json`:
- Around line 5-7: Update the schema’s required field list to include both
start_date and end_date alongside name, ensuring iteration creation requires all
three fields.

In `@packages/shortcut/discovery/shortcut/members/.create.example.json`:
- Around line 1-4: Remove the unsupported Member create contract from
packages/shortcut/discovery/shortcut/members/.create.example.json (lines 1-4)
and packages/shortcut/discovery/shortcut/members/.schema.json (lines 74-82).
Update the Shortcut Group schema, create example, and adapter documentation to
require mention_name, and replace Milestone deadline with supported override
fields or remove Milestone creation if its endpoint is deprecated.

In `@packages/shortcut/discovery/shortcut/milestones/.create.example.json`:
- Around line 2-4: Remove the unsupported deadline field from the Milestone
create contract: delete it from
packages/shortcut/discovery/shortcut/milestones/.create.example.json lines 2-4
and remove its schema definition from
packages/shortcut/discovery/shortcut/milestones/.schema.json lines 82-86. Only
retain it if the adapter explicitly maps deadline to a supported Shortcut
provider field.

In `@packages/shortcut/discovery/shortcut/projects/.schema.json`:
- Around line 5-7: Add team_id to the Project write schema’s properties as an
integer and include it in the required fields alongside name. Update
.create.example.json to provide a valid integer team_id while preserving the
existing example structure.

In `@packages/shortcut/src/digest.ts`:
- Around line 19-23: Add cancellation rules to the terminal-state verb
configuration used by terminalStateVerb(), matching both “canceled” and
“cancelled” states and producing the appropriate cancellation past-tense text.
Add a digest test covering an update payload with a canceled state, ensuring it
is classified as terminal rather than falling back to the generic update action.

In `@packages/shortcut/src/emit-auxiliary-files.ts`:
- Around line 101-102: Update the collision handling around findCollidingAliases
and the alias-generation logic at lines 195-213 to derive collision membership
from persisted resource state rather than only the current records batch,
keeping suffix decisions deterministic across partial emissions and sync runs.
Add coverage that emits two records with the same alias and then re-emits one
unchanged record, verifying its suffix-qualified alias path remains stable.
- Around line 189-191: Update the collisionState branch in the auxiliary-file
cleanup logic to return both the unsuffixed alias path and the single
collision-suffixed path directly, rather than applying collisionVariant to the
already suffixed result. Ensure each cleanup alias resolves to the same record
as its canonical path, and add regression coverage for update and delete
transitions from unique to colliding values.

In `@packages/shortcut/src/shortcut.test.ts`:
- Around line 144-164: Extend the collision-safety test in “keeps index rows and
aliases collision-safe across webhook-sized updates” to assert deterministic
collision-suffixed paths for both records in the by-title and by-state alias
subtrees, using the existing story alias path helpers. Keep the current
by-assignee assertions and verify the expected paths before and after the
update.
- Around line 61-69: Add round-trip assertions in the existing test around the
canonical, by-id, and by-title checks, using shortcutByStateAliasPath() and
shortcutByAssigneeAliasPath() to compose paths and parseShortcutPath() to verify
the expected state and assignee alias results for each object type and ID.

In `@scripts/writeback-discovery-data.mjs`:
- Around line 527-537: Replace the `new.json` create paths in the Shortcut
resource declarations with the corresponding resource-directory paths, and
update the discovery helper’s path handling if needed so directory-based
creation remains valid without treating `new.json` as reserved. Regenerate the
discovery files after updating the declarations.
- Line 536: Update the Shortcut story create endpoint definition at
scripts/writeback-discovery-data.mjs:536 so name remains required and the
request schema adds typed integer workflow_state_id and project_id properties
with an object-level oneOf requiring exactly one; include one placement field in
the example. Regenerate the corresponding documentation at
packages/shortcut/discovery/shortcut/.adapter.md:179-191, example at
packages/shortcut/discovery/shortcut/stories/.create.example.json:1-5, and
schema entries at packages/shortcut/discovery/shortcut/stories/.schema.json:5-7
and 74-85, then run npm run test:writeback-discovery.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 802b1779-b7e9-46ff-a74a-26371917b44b

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea5049 and 0388570.

⛔ Files ignored due to path filters (7)
  • packages/core/src/inbound/catalog.generated.json is excluded by !**/*.generated.*
  • packages/core/src/inbound/catalog.generated.ts is excluded by !**/*.generated.*
  • packages/core/src/scope-keys/adapters-without-known-scope-keys.generated.json is excluded by !**/*.generated.*
  • packages/core/src/scope-keys/catalog.generated.ts is excluded by !**/*.generated.*
  • packages/core/src/writeback-paths/catalog.generated.json is excluded by !**/*.generated.*
  • packages/core/src/writeback-paths/catalog.generated.ts is excluded by !**/*.generated.*
  • packages/relay-helpers/src/generated/clients.ts is excluded by !**/generated/**
📒 Files selected for processing (38)
  • docs/writeback-spec-coverage.md
  • packages/core/tests/inbound/catalog-generator.test.ts
  • packages/shortcut/discovery/shortcut/.adapter.md
  • packages/shortcut/discovery/shortcut/categories/.create.example.json
  • packages/shortcut/discovery/shortcut/categories/.schema.json
  • packages/shortcut/discovery/shortcut/custom-fields/.create.example.json
  • packages/shortcut/discovery/shortcut/custom-fields/.schema.json
  • packages/shortcut/discovery/shortcut/epics/.create.example.json
  • packages/shortcut/discovery/shortcut/epics/.schema.json
  • packages/shortcut/discovery/shortcut/groups/.create.example.json
  • packages/shortcut/discovery/shortcut/groups/.schema.json
  • packages/shortcut/discovery/shortcut/iterations/.create.example.json
  • packages/shortcut/discovery/shortcut/iterations/.schema.json
  • packages/shortcut/discovery/shortcut/labels/.create.example.json
  • packages/shortcut/discovery/shortcut/labels/.schema.json
  • packages/shortcut/discovery/shortcut/members/.create.example.json
  • packages/shortcut/discovery/shortcut/members/.schema.json
  • packages/shortcut/discovery/shortcut/milestones/.create.example.json
  • packages/shortcut/discovery/shortcut/milestones/.schema.json
  • packages/shortcut/discovery/shortcut/projects/.create.example.json
  • packages/shortcut/discovery/shortcut/projects/.schema.json
  • packages/shortcut/discovery/shortcut/stories/.create.example.json
  • packages/shortcut/discovery/shortcut/stories/.schema.json
  • packages/shortcut/discovery/shortcut/workflows/.create.example.json
  • packages/shortcut/discovery/shortcut/workflows/.schema.json
  • packages/shortcut/package.json
  • packages/shortcut/src/digest.ts
  • packages/shortcut/src/emit-auxiliary-files.ts
  • packages/shortcut/src/inbound.ts
  • packages/shortcut/src/index.ts
  • packages/shortcut/src/layout-prompt.ts
  • packages/shortcut/src/path-mapper.ts
  • packages/shortcut/src/resources.ts
  • packages/shortcut/src/shortcut.test.ts
  • packages/shortcut/src/webhook-normalizer.ts
  • scripts/resolve-publish-targets.mjs
  • scripts/writeback-discovery-data.mjs
  • scripts/writeback-discovery-normalizer.mjs
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/shortcut/src/index.ts
  • packages/shortcut/src/resources.ts
  • packages/shortcut/src/layout-prompt.ts
  • packages/shortcut/package.json

Comment thread packages/shortcut/discovery/shortcut/.adapter.md Outdated
Comment thread packages/shortcut/discovery/shortcut/custom-fields/.create.example.json Outdated
Comment thread packages/shortcut/discovery/shortcut/groups/.schema.json
Comment thread packages/shortcut/discovery/shortcut/iterations/.schema.json
Comment thread packages/shortcut/discovery/shortcut/members/.create.example.json Outdated
Comment thread packages/shortcut/src/emit-auxiliary-files.ts Outdated
Comment thread packages/shortcut/src/shortcut.test.ts
Comment thread packages/shortcut/src/shortcut.test.ts
Comment thread scripts/writeback-discovery-data.mjs Outdated
Comment thread scripts/writeback-discovery-data.mjs Outdated

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 45 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/shortcut/src/resources.ts Outdated
Comment thread packages/shortcut/src/emit-auxiliary-files.ts
Comment thread packages/shortcut/discovery/shortcut/custom-fields/.schema.json
Comment thread packages/shortcut/package.json
Comment thread scripts/writeback-discovery-data.mjs Outdated
@khaliqgant

Copy link
Copy Markdown
Member Author

Follow-up pushed in 2040927e (fix(shortcut): address API contract and alias review).

Addressed the remaining review findings:

  • modeled Shortcut resource operations explicitly; custom-fields are update/delete-only and members are read-only; removed their create examples
  • removed Shortcut new.json magic create paths and made directory-based create drafts the contract
  • corrected custom-field, group, iteration, milestone, project, and story write schemas against Shortcut REST v3; story creation now enforces exactly one of workflow_state_id / project_id
  • added core runtime support/tests for resource operation capabilities and object-level oneOf validation
  • persisted alias keys in Shortcut indexes so partial webhook emissions keep collision suffixes stable
  • fixed cleanup to remove both natural alias variants, added path/collision/update/delete regression coverage, and classified canceled records in digests

Validation: full npm test passed (103 Turbo tasks), plus Shortcut build/test (8/8), core build/test (184/184), discovery verification (112 endpoints), publish-target and dependency checks, catalog checks, and git diff --check.

API contract reference: https://developer.shortcut.com/api/rest/v3

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 24 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread scripts/generate-writeback-discovery.mjs
Comment thread packages/shortcut/src/emit-auxiliary-files.ts
Comment thread packages/shortcut/discovery/shortcut/stories/.schema.json
Comment thread scripts/verify-writeback-discovery.mjs Outdated
@khaliqgant

Copy link
Copy Markdown
Member Author

Final review follow-up pushed in 3ddc9088 (fix(shortcut): reconcile alias survivors).

  • Discovery generation now removes obsolete .create.example.json files when a resource no longer has a create example.
  • Discovery verification captures the assertFile result once instead of checking the same file twice.
  • Shortcut collision reconciliation now re-emits persisted survivors when a collision disappears, restoring unsuffixed by-title, by-state, and by-assignee aliases; regression coverage added.
  • The Cubic suggestion to replace the Story oneOf with anyOf was checked against Shortcut REST v3 and intentionally not applied: the API requires either workflow_state_id or project_id and rejects both or neither: https://developer.shortcut.com/api/rest/v3

Validation: full local npm test passed (103/103 Turbo tasks), and GitHub Actions run 31428768050 is green (Build, Typecheck, Test). PR remains clean; only the GitHub Actions Node 20 deprecation annotation remains.

@khaliqgant

Copy link
Copy Markdown
Member Author

Two review points are intentionally retained as-is after verification:

  • packages/shortcut/package.json keeps Node >=18.18 because the package test command uses node --import tsx; the lower Node 18.0–18.17 range does not support that execution path reliably.
  • Story discovery keeps oneOf, not anyOf, because Shortcut REST v3 documents that exactly one of workflow_state_id or project_id must be provided and rejects both or neither. This is a create-request contract, not a claim that synced stories never contain both fields.

@khaliqgant
khaliqgant merged commit ba439d0 into main Aug 10, 2026
3 checks passed
@khaliqgant
khaliqgant deleted the codex/shortcut-relay branch August 10, 2026 21:03
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