fix(framework-editor-cli): scope task/policy/doc-type links to a framework#3141
Open
jprcompai wants to merge 1 commit into
Open
fix(framework-editor-cli): scope task/policy/doc-type links to a framework#3141jprcompai wants to merge 1 commit into
jprcompai wants to merge 1 commit into
Conversation
…ework
The API now requires a frameworkId for task, policy, and document-type link
endpoints (control-template.service.ts: ensureFramework) and rejects requests
without it ("frameworkId is required for policy, task, and document links").
- Add a required --framework-id option to link-task/unlink-task and
link-policy/unlink-policy, forwarded as the frameworkId query param.
- Rewrite add-document-type/remove-document-type to use the scoped
POST/DELETE :id/document-types/:formType?frameworkId= endpoints instead of
the obsolete GET + PATCH documentTypes flow (control update now also
requires frameworkId when documentTypes is provided).
- Drop the now-unused ControlTemplate type and outputResult imports.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@jprcompai is attempting to deploy a commit to the Comp AI Team on Vercel. A member of the Team first needs to authorize it. |
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The API now requires a
frameworkIdfor task, policy, and document-type link endpoints on a control template (control-template.service.ts: ensureFramework). Without it the request is rejected with400 "frameworkId is required for policy, task, and document links". The framework-editor CLI predates this change, so itslink-task/link-policy/add-document-typecommands no longer work.Changes
--framework-idoption tolink-task/unlink-taskandlink-policy/unlink-policy, forwarded as theframeworkIdquery param.add-document-type/remove-document-typeto use the scopedPOST/DELETE :id/document-types/:formType?frameworkId=endpoints, replacing the obsoleteGET+PATCH documentTypesflow (updatealso now requiresframeworkIdwhendocumentTypesis provided).ControlTemplatetype andoutputResultimports.Why now
Surfaced while building the NIST SP 800-53 Rev 5.2 Moderate baseline (287 requirements) via the CLI: phase-5 task→control linking failed against staging until the CLI was updated to pass
frameworkId. Note that because links are now framework-scoped, callers must also avoid deduping links against the cross-frameworkcontrol list/task listsnapshots (which return links across all frameworks).Testing
bun run build).https://api.staging.trycomp.ai: created 287 requirements, 508 control→requirement links, 256 framework-scoped task→control links, and 22 framework-scoped doc-type tags on the Moderate framework with no errors.🤖 Generated with Claude Code
Summary by cubic
Scopes task, policy, and document-type links in
framework-editor-clito a specific framework to match API changes, fixing 400 errors. Adds a required--framework-idflag to link/unlink commands and moves document-type operations to scoped endpoints.--framework-id <id>to:link-task/unlink-task,link-policy/unlink-policy, andadd-document-type/remove-document-type.Written for commit b3f5c4a. Summary will update on new commits.