feat(cua): define first-class lifecycle contract - #7776
Conversation
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a first-class CUA v1 contract covering topology, lifecycle records, compatibility, evidence, failures, schema validation, semantic invariants, and automated contract tests. ChangesCUA lifecycle contract
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CUARecord
participant JSONSchema
participant SemanticChecks
participant ContractTests
CUARecord->>JSONSchema: Validate lifecycle record shape
JSONSchema->>SemanticChecks: Provide structurally valid record
SemanticChecks->>ContractTests: Report invariant results
ContractTests->>CUARecord: Assert accepted and rejected cases
Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit cc50c57 in the TypeScript / code-coverage/cliThe overall coverage in commit cc50c57 in the Show a code coverage summary of the most impacted files.
Updated |
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
schemas/cua-lifecycle.schema.json (1)
512-519: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAdd
uniqueItems: truetotaskResult.capabilitiesfor parity with the other capability arrays.
runtimeReadiness.requiredCapabilities(line 275) andtarget.capabilities(line 376) both setuniqueItems: true; here a result can carry[browser, browser, computer]and still pass pure-schema validation. The TS semantic layer catches it, but external consumers validating only against the published schema would not.♻️ Proposed change
"capabilities": { "type": "array", "minItems": 3, "maxItems": 3, + "uniqueItems": true, "items": { "$ref": "`#/`$defs/capabilityIdentity" } },🤖 Prompt for 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. In `@schemas/cua-lifecycle.schema.json` around lines 512 - 519, Update the taskResult capabilities array schema to set uniqueItems: true, matching runtimeReadiness.requiredCapabilities and target.capabilities, while preserving its existing type, item count, and capabilityIdentity reference.
🤖 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 `@src/lib/cua/contract.test.ts`:
- Around line 94-97: Remove the attachedTarget helper and its runtime null
check; type the duplicate and unhealthy fixtures so their target properties are
non-null, then update all call sites to access duplicate.target or
unhealthy.target directly.
- Around line 30-31: Update the temporary fixture path near temporaryAgentName
and temporaryAgentDir to use a per-test temporary directory rather than
AGENTS_DIR, ensuring parallel suites remain isolated and cleanup does not leave
artifacts in the shared agents tree.
---
Nitpick comments:
In `@schemas/cua-lifecycle.schema.json`:
- Around line 512-519: Update the taskResult capabilities array schema to set
uniqueItems: true, matching runtimeReadiness.requiredCapabilities and
target.capabilities, while preserving its existing type, item count, and
capabilityIdentity reference.
🪄 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: Enterprise
Run ID: 0bf3c335-5452-4691-8494-0f40268d3ad7
📒 Files selected for processing (4)
schemas/cua-lifecycle.schema.jsonsrc/lib/cua/contract.mdsrc/lib/cua/contract.test.tssrc/lib/cua/contract.ts
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: None This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Summary
Define the checked-in first-class CUA v1 product and architecture contract accepted in #7750. The contract is host-agnostic, keeps qualification scaffolding outside the supported lifecycle, and leaves exact runtime and target artifact identities as completion gates for their implementation and qualification issues.
Related Issue
Fixes #7750
Product scope decision: #7750 (comment)
Changes
Type of Change
Quality Gates
Documentation Writer Review
no-docs-neededsrc/lib/cua/contract.md; no user-facing command or runtime is implemented in this PR.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpm exec -- vitest run --project cli src/lib/cua/contract.test.ts(11 passed) andnpm run typecheck:clinpm run docsbuilds without warnings (doc changes only)Signed-off-by: Julie Yaunches jyaunches@nvidia.com
Summary by CodeRabbit