Conversation
There was a problem hiding this comment.
Sorry @benym, your pull request is larger than the review limit of 150000 diff characters
|
👋 Thanks for opening your first PR to Comet, @benym. Before review, please make sure the PR title follows Conventional Commits, for example 🧪 The most useful local checks are: pnpm build
pnpm lint
pnpm format:check
pnpm test🧰 If your change touches ✨ We appreciate the contribution and will take a look as soon as we can. |
Reviewer's GuideThis PR simplifies the Native verification and review model, upgrades verification receipts to v3, removes independent-review/waiver machinery and trust-policy plumbing, and streamlines the Classic root move flow and CLI while keeping YAML parsing and runtime integration compatible. Sequence diagram for issuing automated verification receipts without waivers/independent reviewsequenceDiagram
participant NativeRuntime
participant ReceiptRuntime as NativeVerificationReceiptRuntime
participant Child as CommandProcess
participant EvidenceStorage
NativeRuntime->>ReceiptRuntime: issueNativeAutomatedCheckReceipt(paths, name, acceptanceIds, command, args)
ReceiptRuntime->>ReceiptRuntime: loadNativeVerificationReceiptContext(paths, state)
ReceiptRuntime->>Child: spawnNativeVerificationCommand(command, args, env)
Child-->>ReceiptRuntime: exitCode, signal, output
ReceiptRuntime->>ReceiptRuntime: redactNativeCredentialText(outputSummary)
ReceiptRuntime->>ReceiptRuntime: buildNativeVerificationReceipt(kind="automated-check")
ReceiptRuntime->>EvidenceStorage: writeNativeVerificationReceipt(paths, name, receipt)
EvidenceStorage-->>ReceiptRuntime: ref
ReceiptRuntime-->>NativeRuntime: { receipt, ref }
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis release updates Classic root migration and Dashboard project discovery, restructures Native verification and repair handling, removes cryptographic review workflows, tightens Comet routing and phase guidance, refreshes generated assets and tests, and bumps the version to ChangesComet beta.12 workflow changes
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Greptile SummarySimplifies Classic root migration and replaces Native cryptographic review with evidence-bound verification.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| domains/comet-classic/classic-root-move.ts | Reworks migration to move the complete Classic tree directly while retaining protected preflight, journal recovery, manifest verification, and configuration switching. |
| domains/comet-classic/classic-root-command.ts | Removes public plan IDs, adds localized status and completion reports, and treats an existing docs layout as a successful no-op. |
| domains/comet-entry/hook-router.ts | Resolves missing stale selections through the same zero, one, or multiple active-change routing used when no selection exists. |
| domains/comet-native/native-verification-runtime.ts | Simplifies verification around current acceptance receipts, implementation scope, report bindings, and the built-in required check. |
| domains/comet-native/native-verification-receipt-runtime.ts | Adds Runtime-issued automated and manual evidence receipts with command execution, workspace fences, Windows shim handling, and output redaction. |
| domains/comet-native/native-verification-evidence.ts | Removes independent-review and waiver fields while retaining content-addressed evidence and freshness bindings. |
| domains/comet-native/native-repair-integration.ts | Derives repair failure signatures from failed verification receipts instead of caller-supplied categories and check identifiers. |
| app/commands/dashboard.ts | Discovers the Classic project root before collecting a snapshot or starting the dashboard server. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Classic legacy root] --> B[Protected preflight]
B --> C[Copy and verify complete tree]
C --> D[Switch artifact layout to docs]
D --> E[Quarantine and remove legacy root]
F[Native implementation] --> G[Acceptance evidence]
G --> H[Built-in required check]
H --> I{Verification result}
I -->|Pass| J[Archive]
I -->|Fail| K[Repair loop]
K --> G
Reviews (3): Last reviewed commit: "test(native): cover automated receipt ru..." | Re-trigger Greptile
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (57.28%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #255 +/- ##
==========================================
+ Coverage 74.06% 74.34% +0.28%
==========================================
Files 204 198 -6
Lines 22614 21396 -1218
Branches 7204 6834 -370
==========================================
- Hits 16748 15906 -842
+ Misses 3035 2853 -182
+ Partials 2831 2637 -194
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 10
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
domains/comet-native/native-cli.ts (1)
646-692: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
--reportis now accepted without--result.With the cross-flag checks removed,
comet native next <change> --summary … --report x.mdpassesverificationReportwith noverificationResult, so the CLI reports a phase-guard failure instead of a usage error. If the guard is expected to own that rejection, this is fine; otherwise a pairing check here would give a clearer exit 64.#!/bin/bash # Does anything reject verificationReport without verificationResult? rg -nP --type=ts -C4 'verificationReport' domains/comet-native # Check test coverage for the flag pairing on `next`. rg -nP -C4 "'--report'" test/domains/comet-native🤖 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 `@domains/comet-native/native-cli.ts` around lines 646 - 692, Update the argument validation around verificationResult and verificationReport in the native next command to require --report and --result together, rejecting either flag when the other is absent with a NativeUsageError and exit-64 usage failure. Preserve the existing --result value validation and include both fields in NativeAdvanceEvidence only after the pairing check passes.domains/comet-native/native-repair-stagnation.ts (1)
121-139: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winSignature collision risk when both
failedAcceptanceIdsandfailedCheckIdsare empty.The prior validation requiring at least one of
failedAcceptanceIds/failedCheckIdsto be non-empty was removed.buildNativeRepairSignature's content is only{schema, contractHash, failedAcceptanceIds, failedCheckIds}, so two distinct Verify failures on the same contract that don't map to any specific acceptance/check evidence (e.g. an overall-fail result with noacceptanceTraceentries marked failed/missing and no receipts with non-passed status) will collapse to the identical signature. This inflatesconsecutiveFailuresindecideNativeRepairStagnation/decideNativeRepairOverride, risking a spuriousmanual-stop/hard-stopfor what are actually unrelated failures.🐛 Proposed guard to avoid signature collapse
export function buildNativeRepairSignature(facts: NativeRepairFailureFacts): NativeRepairSignature { const failedCheckIds = normalizeNativeRepairFailedCheckIds(facts.failedCheckIds); const failedAcceptanceIds = normalizedTokens( facts.failedAcceptanceIds, 'Native repair failed acceptance IDs', NATIVE_REPAIR_STAGNATION_LIMITS.maxFailedAcceptanceIds, true, ); + if (failedAcceptanceIds.length === 0 && failedCheckIds.length === 0) { + throw new Error( + 'Native repair signature requires at least one failed acceptance ID or check ID', + ); + } const content = { schema: NATIVE_REPAIR_SIGNATURE_SCHEMA, contractHash: hash(facts.contractHash, 'Native repair contract hash'), failedAcceptanceIds, failedCheckIds, };🤖 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 `@domains/comet-native/native-repair-stagnation.ts` around lines 121 - 139, Update buildNativeRepairSignature to reject or otherwise uniquely represent failures where both failedAcceptanceIds and failedCheckIds are empty, restoring the guard that prevents evidence-free failures from producing the same signature for a contract. Preserve the existing normalization and hashing behavior when either evidence collection is non-empty, and ensure decideNativeRepairStagnation and decideNativeRepairOverride cannot count unrelated evidence-free failures as consecutive repetitions.domains/comet-native/native-verification-evidence.ts (1)
601-640: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift移除 v1 解析后,遗留协议的诊断码会退化为
verification-evidence-invalid。
parseNativeVerificationEvidenceEnvelope现在对非comet.native.verification-evidence.v2的 schema 直接抛错。inspectNativeVerificationFreshness中针对envelope.schema !== 'comet.native.verification-evidence.v2'返回verification-protocol-legacy的分支因此不可达——读取阶段就会抛错并落入外层 catch,返回freshness: 'invalid'+verification-evidence-invalid。遗留项目会丢失“协议过旧、需重新验证”的精确指引。建议在读取遗留 envelope 时保留 schema 判别(例如在 parse 前先读取 raw schema 并映射为
verification-protocol-legacy)。🔍 定位不可达分支与调用链
#!/bin/bash rg -n -C6 'verification-protocol-legacy' domains/comet-native rg -n -C4 'readNativeVerificationEvidence' domains/comet-native/native-evidence-storage.ts🤖 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 `@domains/comet-native/native-verification-evidence.ts` around lines 601 - 640, Preserve legacy-schema detection in the native verification evidence read flow before parseNativeVerificationEvidenceEnvelope rejects non-v2 envelopes. Ensure inspectNativeVerificationFreshness can return verification-protocol-legacy for legacy schemas instead of converting the failure to verification-evidence-invalid, while retaining normal v2 parsing and validation.domains/comet-native/native-evidence-storage.ts (1)
37-43: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftNative evidence 的向后兼容缺口:既有项目中已落盘的 evidence 在 beta.12 后无法被读取或清理。 共同根因是本次同时移除了受管 evidence 种类并跃迁了 receipt schema,但没有配套的升级/迁移或降级读取路径。
domains/comet-native/native-evidence-storage.ts#L37-L43:为遗留runtime/evidence/waivers/文档提供明确处置(升级时删除,或在 retention/doctor 中作为非受管文件安全忽略并报告)。domains/comet-native/native-verification-receipt.ts#L6-L6:为comet.native.verification-receipt.v2收据定义处置策略——要么在解析层给出可识别的“协议过旧、需重新验证”错误,要么在升级路径中清理,避免 retention/freshness 直接抛出通用解析失败。🤖 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 `@domains/comet-native/native-evidence-storage.ts` around lines 37 - 43, 为 NativeEvidenceKind 及相关升级、retention、doctor 流程补充遗留 runtime/evidence/waivers/ 文档的处置:升级时删除,或将其作为非受管文件安全忽略并报告,确保既有 evidence 可清理。同步在 domains/comet-native/native-verification-receipt.ts 的 comet.native.verification-receipt.v2 解析路径定义兼容策略:返回可识别的“协议过旧、需重新验证”错误,或在升级流程中清理,避免 retention/freshness 产生通用解析失败。
🧹 Nitpick comments (8)
test/domains/comet-native/native-verification-runtime.test.ts (1)
546-564: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win建议改用
serializeNativeVerificationMachineBlock手工拼接 marker 块。同一文件上方(Line 500)已用
serializeNativeVerificationMachineBlock生成证据块,这里改成手写 marker +JSON.stringify(entries, null, 2),绕过了canonicalEvidencePayload的规范化。一旦规范化格式(缩进、键序)调整,这个用例会因解析失败而不是因为“裸路径被拒绝”通过,断言就失去针对性。♻️ 建议改动
- await fs.writeFile( - path.join(changeDir, 'verification.md'), - `# Acceptance evidence -<!-- comet-native:acceptance-evidence:start --> -${JSON.stringify(entries, null, 2)} -<!-- comet-native:acceptance-evidence:end --> -`, - ); + await fs.writeFile( + path.join(changeDir, 'verification.md'), + `# Acceptance evidence +${serializeNativeVerificationMachineBlock(entries)} +`, + );🤖 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 `@test/domains/comet-native/native-verification-runtime.test.ts` around lines 546 - 564, Update the test’s verification evidence setup to use serializeNativeVerificationMachineBlock, matching the nearby test, instead of manually concatenating markers with JSON.stringify(entries, null, 2). Preserve the entries and the assertion’s focus on rejecting bare project paths while ensuring the payload passes canonical formatting and parsing.domains/comet-native/native-continuation.ts (1)
69-82: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winThe new branch replaces the aggregate
requiredInputswith a single value.Unlike the
decisionbranch below (which returns the fullrequiredInputsset), this branch hardcodes['repair-continuation-decision']. When arepair-iteration-limitfinding coexists with anotherrequiresUserDecisionfinding, the second finding'srequiredActiondisappears from the continuation, so the agent can miss a still-required input. Consider unioning the specific input with the aggregate set.♻️ Proposed union of the required inputs
requiresUserDecision: true, - requiredInputs: ['repair-continuation-decision'], + requiredInputs: [...new Set(['repair-continuation-decision', ...requiredInputs])].sort(), };#!/bin/bash # Confirm the new contract strings are mirrored in Skill guidance and tests. rg -nP -C3 'repair-continuation-decision|new-repair-hypothesis' assets docs test🤖 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 `@domains/comet-native/native-continuation.ts` around lines 69 - 82, Update the repairDecision branch in the continuation builder to preserve the aggregate requiredInputs and union it with 'repair-continuation-decision', matching the decision branch’s handling of other required inputs. Ensure coexisting requiresUserDecision findings retain each finding’s requiredAction while always including the repair-specific input.domains/comet-classic/classic-root-command.ts (1)
195-202: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUsage text on the early-return path is still hard-coded English.
Line 195 returns
usage()without a language, while the same command surface below returnsusage(language). In azh-CNproject,comet classic root move legacyprints English usage butcomet classic root move docs --oopsprints Chinese. Resolving the language before this branch would make the surface consistent (at the cost of one config read on the usage path).🤖 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 `@domains/comet-classic/classic-root-command.ts` around lines 195 - 202, Resolve the project language before the `action !== 'move' || target !== 'docs'` early-return in the command handler, then pass that language to `usage(language)` for the invalid-action path. Reuse the same resolved language for the existing mode/extra validation and avoid reading the workflow configuration twice.domains/comet-classic/classic-root-move.ts (1)
1281-1288: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueNit: the
localeComparefallback ordering is environment-dependent.Accepting
localeCompare-sorted legacy journals makes this validation non-reproducible across ICU/locale configurations. Ordering is already pinned bymanifestHash, so consider narrowing the fallback (e.g.localeCompare(right, 'en')) to keep the check deterministic.🤖 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 `@domains/comet-classic/classic-root-move.ts` around lines 1281 - 1288, Make the legacy ordering fallback in the pathsUseSupportedOrder validation deterministic by passing an explicit locale to both localeCompare calls for directories and filePaths, while preserving the manifestHash ordering check and duplicate-path validation.domains/comet-native/native-verification-receipt-runtime.ts (1)
65-79: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value使用
path.win32.delimiter拆分PATH。
path.delimiter依赖运行平台,在 Linux/macOS 上为:。该函数目前只在process.platform === 'win32'分支调用,因此生产路径正确,但在非 Windows 上直接做单元测试时会错误拆分 Windows 风格PATH。函数内其余部分已一致使用path.win32。♻️ 建议调整
- .split(path.delimiter) + .split(path.win32.delimiter)🤖 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 `@domains/comet-native/native-verification-receipt-runtime.ts` around lines 65 - 79, Update windowsCommandCandidates to split env.PATH using path.win32.delimiter instead of the host-dependent path.delimiter, while preserving the existing trimming, quote removal, filtering, and candidate generation behavior.domains/comet-native/native-acceptance.ts (1)
51-56: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win确认
NativeAcceptanceEvidenceEntry是单一定义而非多处重复。代码图上下文显示
native-verification-evidence.ts:51-56与native-verification-runtime.ts:51-56存在结构完全相同的同名接口。若确为各自独立声明,则本次收窄status需要三处同步维护,容易漂移;建议统一由本模块导出、其余文件 re-export。#!/bin/bash ast-grep run --pattern 'export interface NativeAcceptanceEvidenceEntry { $$$ }' --lang typescript domains/comet-native rg -n 'NativeAcceptanceEvidenceEntry' domains/comet-native🤖 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 `@domains/comet-native/native-acceptance.ts` around lines 51 - 56, 统一 NativeAcceptanceEvidenceEntry 的定义,保留 domains/comet-native/native-acceptance.ts 作为唯一导出来源;移除 native-verification-evidence.ts 和 native-verification-runtime.ts 中的重复接口声明,并改为从该模块 re-export 或复用,确保 status 类型收窄只需维护一处。domains/comet-native/native-verification-evidence.ts (1)
74-74: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
NativeReadableVerificationEvidenceEnvelope已退化为纯别名。不再有 legacy 联合类型后,该别名与
NativeVerificationEvidenceEnvelope完全等价,"Readable" 语义已消失。可以考虑逐步收敛到单一类型名(保留一轮@deprecated别名以便下游迁移)。🤖 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 `@domains/comet-native/native-verification-evidence.ts` at line 74, 收敛 NativeReadableVerificationEvidenceEnvelope 与 NativeVerificationEvidenceEnvelope 的重复类型定义:将 NativeVerificationEvidenceEnvelope 作为唯一规范类型名,并将现有 NativeReadableVerificationEvidenceEnvelope 标记为 `@deprecated` 别名以支持下游迁移;同步更新本模块内的引用,避免继续引入 “Readable” 语义。domains/comet-native/native-verification-runtime.ts (1)
331-341: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
...options会把trace/requiredReceiptRefs等无关键透传给validateTypedReceipt。虽然类型系统不会报错(变量展开不触发超额属性检查),但让被调方接收未声明的字段会掩盖参数契约。建议显式列出所需字段。
♻️ 建议显式传参
- const receipt = await validateTypedReceipt({ - ...options, - ref, - expectedBindings, - role: 'required-check', - }); + const receipt = await validateTypedReceipt({ + paths: options.paths, + state: options.state, + result: options.result, + contractHash: options.contractHash, + implementationScope: options.implementationScope, + ref, + expectedBindings, + role: 'required-check', + });🤖 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 `@domains/comet-native/native-verification-runtime.ts` around lines 331 - 341, Replace the `...options` spread in the `validateTypedReceipt` call within the required-receipt loop with an explicit object containing only the fields declared and required by `validateTypedReceipt`, while preserving `ref`, `expectedBindings`, and `role: 'required-check'`. Do not forward `trace` or `requiredReceiptRefs`.
🤖 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 `@assets/skills/comet-native/scripts/comet-native-runtime.mjs`:
- Around line 17193-17199: 为 NATIVE_VERIFICATION_RECEIPT_SCHEMA 升级补充 v2 收据迁移路径:让
parseNativeVerificationReceipt 及 readNativeVerificationReceipt、parseDocument3 的
receipts 分支能够处理已存在的 v2 收据。优先复用现有 doctor/迁移机制转换为
v3;若不支持迁移,则明确执行作废并重新签发的约定,避免旧收据仅被归类为 verification-receipt-invalid。
In `@assets/skills/comet/SKILL.md`:
- Around line 26-30: Restore the required English Skill trigger wording in the
selection entries: use “Immediately execute: Use the Skill tool to load the
<skill-name> skill. Skipping this step is prohibited.” for both comet-native and
comet-classic, and begin the subsequent original-request instruction with “After
the skill loads”.
In `@domains/comet-classic/classic-root-command.ts`:
- Around line 33-43: Update formatClassicRootMoveError so the zh-CN fallback
retains the original error message alongside the translated generic text, while
preserving the existing dedicated translations for the duplicate/sorted manifest
and invalid journal messages. Ensure actionable messages such as plan changes or
non-empty targets remain visible in stderr.
In `@domains/comet-classic/classic-root-move.ts`:
- Around line 1126-1131: Ensure the root-move apply path rewrites active-change
pointers for design_doc, plan, verification_report, and handoff_context from
openspec/... to docs/openspec/... before readyToApply becomes true. Update the
active-change migration logic rather than relying only on archived-handoff
fallback, and preserve the conflict-based readiness behavior once pointer
rewriting succeeds.
In `@domains/comet-native/native-verification-receipt-runtime.ts`:
- Around line 466-469: Update the spawnNativeVerificationCommand invocation to
avoid passing the complete process.env to automated verification commands.
Restore or reuse sanitizedAutomatedCommandEnvironment(), extending its allowlist
only with required runtime variables such as PATH or HOME, and keep cwd set to
options.paths.projectRoot.
- Around line 583-586: Update the outputSummary construction around
redactNativeCredentialText and boundedText so the redacted summary is
byte-truncated after redaction, preserving the existing exit-code fallback and
label. Ensure the final value passed to boundedText cannot exceed its byte
limit, preventing oversized replacement text from causing receipt issuance to
fail.
In `@eval/local/tasks/comet-native-workflow/validation/test_native_workflow.py`:
- Around line 306-323: Update _read_typed_receipt and its receipt validation
callers to use the runtime’s v3 schema identifier,
comet.native.verification-receipt.v3, for both schema validation and the
content-hash tag. Ensure the acceptance receipt and requiredReceiptRefs checks
consistently validate v3 receipts without changing their existing kind, role,
status, or reference-matching rules.
In `@test/domains/comet-classic/classic-root-move.test.ts`:
- Around line 371-377: Update the test “accepts journals written with the
previous locale-aware manifest ordering” to construct the localeOrdered and
codePointOrdered manifest name arrays using explicit fixed orders rather than
localeCompare. Remove the runtime-dependent inequality assertion while
preserving coverage of journals produced with the previous ordering.
In `@test/domains/comet-native/native-transition-evidence.test.ts`:
- Around line 21-31: Update the test “binds a repair override independently from
verification evidence” to cover the two repair override fields independently:
keep repairOverrideSummary unchanged while changing repairOverrideSignature, and
keep repairOverrideSignature unchanged while changing repairOverrideSummary.
Assert that each individual change produces a different
nativeAdvanceEvidenceHash.
In `@test/repository/native-self-contained.test.ts`:
- Around line 43-47: Restore the sanitized environment whitelist used by the
native automated-check subprocess instead of spreading process.env in the
receipt runtime. Update the environment construction near resolveWindowsCommand
to retain required Windows variables such as SystemRoot, PATHEXT, and ComSpec,
while preserving the command-resolution behavior and avoiding exposure of CI or
cloud credentials.
---
Outside diff comments:
In `@domains/comet-native/native-cli.ts`:
- Around line 646-692: Update the argument validation around verificationResult
and verificationReport in the native next command to require --report and
--result together, rejecting either flag when the other is absent with a
NativeUsageError and exit-64 usage failure. Preserve the existing --result value
validation and include both fields in NativeAdvanceEvidence only after the
pairing check passes.
In `@domains/comet-native/native-evidence-storage.ts`:
- Around line 37-43: 为 NativeEvidenceKind 及相关升级、retention、doctor 流程补充遗留
runtime/evidence/waivers/ 文档的处置:升级时删除,或将其作为非受管文件安全忽略并报告,确保既有 evidence 可清理。同步在
domains/comet-native/native-verification-receipt.ts 的
comet.native.verification-receipt.v2
解析路径定义兼容策略:返回可识别的“协议过旧、需重新验证”错误,或在升级流程中清理,避免 retention/freshness 产生通用解析失败。
In `@domains/comet-native/native-repair-stagnation.ts`:
- Around line 121-139: Update buildNativeRepairSignature to reject or otherwise
uniquely represent failures where both failedAcceptanceIds and failedCheckIds
are empty, restoring the guard that prevents evidence-free failures from
producing the same signature for a contract. Preserve the existing normalization
and hashing behavior when either evidence collection is non-empty, and ensure
decideNativeRepairStagnation and decideNativeRepairOverride cannot count
unrelated evidence-free failures as consecutive repetitions.
In `@domains/comet-native/native-verification-evidence.ts`:
- Around line 601-640: Preserve legacy-schema detection in the native
verification evidence read flow before parseNativeVerificationEvidenceEnvelope
rejects non-v2 envelopes. Ensure inspectNativeVerificationFreshness can return
verification-protocol-legacy for legacy schemas instead of converting the
failure to verification-evidence-invalid, while retaining normal v2 parsing and
validation.
---
Nitpick comments:
In `@domains/comet-classic/classic-root-command.ts`:
- Around line 195-202: Resolve the project language before the `action !==
'move' || target !== 'docs'` early-return in the command handler, then pass that
language to `usage(language)` for the invalid-action path. Reuse the same
resolved language for the existing mode/extra validation and avoid reading the
workflow configuration twice.
In `@domains/comet-classic/classic-root-move.ts`:
- Around line 1281-1288: Make the legacy ordering fallback in the
pathsUseSupportedOrder validation deterministic by passing an explicit locale to
both localeCompare calls for directories and filePaths, while preserving the
manifestHash ordering check and duplicate-path validation.
In `@domains/comet-native/native-acceptance.ts`:
- Around line 51-56: 统一 NativeAcceptanceEvidenceEntry 的定义,保留
domains/comet-native/native-acceptance.ts 作为唯一导出来源;移除
native-verification-evidence.ts 和 native-verification-runtime.ts
中的重复接口声明,并改为从该模块 re-export 或复用,确保 status 类型收窄只需维护一处。
In `@domains/comet-native/native-continuation.ts`:
- Around line 69-82: Update the repairDecision branch in the continuation
builder to preserve the aggregate requiredInputs and union it with
'repair-continuation-decision', matching the decision branch’s handling of other
required inputs. Ensure coexisting requiresUserDecision findings retain each
finding’s requiredAction while always including the repair-specific input.
In `@domains/comet-native/native-verification-evidence.ts`:
- Line 74: 收敛 NativeReadableVerificationEvidenceEnvelope 与
NativeVerificationEvidenceEnvelope 的重复类型定义:将 NativeVerificationEvidenceEnvelope
作为唯一规范类型名,并将现有 NativeReadableVerificationEvidenceEnvelope 标记为 `@deprecated`
别名以支持下游迁移;同步更新本模块内的引用,避免继续引入 “Readable” 语义。
In `@domains/comet-native/native-verification-receipt-runtime.ts`:
- Around line 65-79: Update windowsCommandCandidates to split env.PATH using
path.win32.delimiter instead of the host-dependent path.delimiter, while
preserving the existing trimming, quote removal, filtering, and candidate
generation behavior.
In `@domains/comet-native/native-verification-runtime.ts`:
- Around line 331-341: Replace the `...options` spread in the
`validateTypedReceipt` call within the required-receipt loop with an explicit
object containing only the fields declared and required by
`validateTypedReceipt`, while preserving `ref`, `expectedBindings`, and `role:
'required-check'`. Do not forward `trace` or `requiredReceiptRefs`.
In `@test/domains/comet-native/native-verification-runtime.test.ts`:
- Around line 546-564: Update the test’s verification evidence setup to use
serializeNativeVerificationMachineBlock, matching the nearby test, instead of
manually concatenating markers with JSON.stringify(entries, null, 2). Preserve
the entries and the assertion’s focus on rejecting bare project paths while
ensuring the payload passes canonical formatting and parsing.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3eae3241-40eb-48cb-85c3-a1060511d819
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (110)
AGENTS.mdCHANGELOG.mdCLAUDE.mdapp/commands/classic.tsapp/commands/dashboard.tsapp/commands/doctor.tsassets/manifest.jsonassets/skills-zh/comet-native/SKILL.mdassets/skills-zh/comet-native/reference/artifacts.mdassets/skills-zh/comet-native/reference/clarification.mdassets/skills-zh/comet-native/reference/commands.mdassets/skills-zh/comet-native/reference/recovery.mdassets/skills-zh/comet/SKILL.mdassets/skills-zh/comet/reference/classic-layout.mdassets/skills/comet-native/SKILL.mdassets/skills/comet-native/reference/artifacts.mdassets/skills/comet-native/reference/clarification.mdassets/skills/comet-native/reference/commands.mdassets/skills/comet-native/reference/recovery.mdassets/skills/comet-native/scripts/comet-native-runtime.mjsassets/skills/comet/SKILL.mdassets/skills/comet/reference/classic-layout.mdassets/skills/comet/rules/comet-workflow-guard.en.mdassets/skills/comet/rules/comet-workflow-guard.mdassets/skills/comet/scripts/comet-entry-runtime.mjsassets/skills/comet/scripts/comet-hook-router.mjsassets/skills/comet/scripts/comet-runtime.mjsconfig/repository-layout.jsondocs/comet/specs/native-verification-evidence/spec.mddocs/comet/specs/unified-product-catalogue/spec.mddocs/superpowers/specs/2026-07-30-classic-root-move-dashboard-fix-design.mddocs/superpowers/specs/2026-07-30-remove-native-cryptographic-review-design.mddomains/comet-classic/classic-root-command.tsdomains/comet-classic/classic-root-move.tsdomains/comet-entry/current-selection-repair.tsdomains/comet-entry/hook-router.tsdomains/comet-native/native-acceptance.tsdomains/comet-native/native-cli.tsdomains/comet-native/native-continuation.tsdomains/comet-native/native-controller-trust.tsdomains/comet-native/native-evidence-retention.tsdomains/comet-native/native-evidence-storage.tsdomains/comet-native/native-findings.tsdomains/comet-native/native-independent-review.tsdomains/comet-native/native-repair-integration.tsdomains/comet-native/native-repair-runtime.tsdomains/comet-native/native-repair-stagnation.tsdomains/comet-native/native-review-contract.tsdomains/comet-native/native-review-identity.tsdomains/comet-native/native-review-signer.tsdomains/comet-native/native-review-trust.tsdomains/comet-native/native-snapshot.tsdomains/comet-native/native-transition-evidence.tsdomains/comet-native/native-transitions.tsdomains/comet-native/native-types.tsdomains/comet-native/native-verification-evidence.tsdomains/comet-native/native-verification-receipt-runtime.tsdomains/comet-native/native-verification-receipt.tsdomains/comet-native/native-verification-runtime.tsdomains/dashboard/web/src/main.jsxeval/local/tasks/comet-native-workflow/environment/.include-trusted-native-review-fixtureeval/local/tasks/comet-native-workflow/instruction.mdeval/local/tasks/comet-native-workflow/validation/test_native_workflow.pyeval/local/tests/conftest.pyeval/local/tests/scaffold/test_native_wave_evaluations.pyeval/local/tests/scaffold/test_tasks.pyeval/local/tests/scaffold/test_utils.pyeval/scaffold/shell/docker.sheval/scaffold/shell/native-review-signer-daemon.mjseval/scaffold/shell/native-review-verifier-daemon.mjspackage.jsontest/app/cli-help.test.tstest/app/cli-smoke.test.tstest/domains/comet-classic/classic-root-command.test.tstest/domains/comet-classic/classic-root-move.test.tstest/domains/comet-entry/comet-entry-skill.test.tstest/domains/comet-entry/current-selection-repair.test.tstest/domains/comet-entry/hook-router.test.tstest/domains/comet-entry/resume-probe.test.tstest/domains/comet-native/native-acceptance.test.tstest/domains/comet-native/native-archive-inspection.test.tstest/domains/comet-native/native-check.test.tstest/domains/comet-native/native-cli.test.tstest/domains/comet-native/native-evidence-retention.test.tstest/domains/comet-native/native-evidence-storage.test.tstest/domains/comet-native/native-evidence-transitions.test.tstest/domains/comet-native/native-findings.test.tstest/domains/comet-native/native-independent-review.test.tstest/domains/comet-native/native-legacy-archive-read.test.tstest/domains/comet-native/native-phase1-matrix.test.tstest/domains/comet-native/native-repair-runtime.test.tstest/domains/comet-native/native-repair-transitions.test.tstest/domains/comet-native/native-review-identity.test.tstest/domains/comet-native/native-review-trust.test.tstest/domains/comet-native/native-skill.test.tstest/domains/comet-native/native-transition-evidence.test.tstest/domains/comet-native/native-verification-evidence.test.tstest/domains/comet-native/native-verification-receipt.test.tstest/domains/comet-native/native-verification-runtime.test.tstest/domains/dashboard/web-source.test.tstest/domains/skill/skills.test.tstest/domains/skill/workflow-optimization-contract.test.tstest/helpers/native-archive.tstest/helpers/native-controller-trust.tstest/helpers/native-verification.tstest/repository/native-boundaries.test.tstest/repository/native-runtime-assets.test.tstest/repository/native-self-contained.test.tstest/repository/release-metadata.test.tswebsite
💤 Files with no reviewable changes (25)
- domains/comet-native/native-review-contract.ts
- domains/comet-native/native-independent-review.ts
- test/domains/comet-native/native-review-identity.test.ts
- eval/scaffold/shell/native-review-signer-daemon.mjs
- test/helpers/native-controller-trust.ts
- eval/scaffold/shell/native-review-verifier-daemon.mjs
- assets/skills-zh/comet-native/reference/artifacts.md
- test/helpers/native-archive.ts
- eval/local/tasks/comet-native-workflow/environment/.include-trusted-native-review-fixture
- assets/skills/comet-native/reference/artifacts.md
- test/domains/comet-native/native-review-trust.test.ts
- domains/comet-native/native-review-identity.ts
- domains/comet-native/native-review-trust.ts
- test/domains/comet-native/native-archive-inspection.test.ts
- domains/comet-native/native-controller-trust.ts
- test/domains/comet-native/native-evidence-retention.test.ts
- domains/comet-native/native-review-signer.ts
- domains/comet-native/native-types.ts
- test/domains/comet-native/native-evidence-storage.test.ts
- test/domains/comet-native/native-independent-review.test.ts
- domains/comet-native/native-snapshot.ts
- eval/local/tests/conftest.py
- domains/comet-native/native-transition-evidence.ts
- eval/local/tests/scaffold/test_native_wave_evaluations.py
- test/domains/comet-native/native-repair-runtime.test.ts
✨ Summary
🎯 Scope
init,status,doctor,update)assets/skills/,assets/skills-zh/)assets/skills/comet/scripts/)🧪 Testing
pnpm buildpnpm lintpnpm run lint:architecturepnpm format:checkpnpm testpnpm test -- test/domains/comet-classic/comet-scripts.test.ts✅ Checklist
fix: handle project-scope initREADME.md,README-zh.md, orCONTRIBUTING.mdCHANGELOG.mdis updated when behavior changesassets/manifest.jsonand relevant tests👀 Notes for Reviewers
Summary by Sourcery
Simplify Native workflow verification and repair semantics while streamlining Classic root migration UX.
Bug Fixes:
Enhancements:
Tests:
Summary by CodeRabbit
New Features
comet classic root move docs --apply(no user plan IDs) and migrates the full legacyopenspec/tree.Bug Fixes
Documentation
Chores