Advance v18 release-candidate evidence - #106
Conversation
|
@codex Review follow-up landed in
Verification run locally before push:
Pre-push IRONCLAD M9 also passed and pushed |
Release Preflight
If you tag this commit as |
|
@codex Self-review follow-up findings after
Local evidence: pre-review worktree was clean, |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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
`@scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts`:
- Around line 171-176: The decodeLegacyEdgePropNode call can throw a foreign
error; wrap the decodeLegacyEdgePropNode(property.ownerId) invocation in a
try/catch and, on any failure, throw/raise the standardized replayer error
E_RUNTIME_REPLAY_INVALID_OPERATION_TARGET (preserving/including the original
error message as context) so failures are classified consistently; keep the
existing behavior for non-legacy nodes (isLegacyEdgePropNode) and then call
patch.setEdgeProperty(edge.from, edge.to, edge.label, property.propertyKey,
value) when decode succeeds.
In
`@src/infrastructure/adapters/GraphModelMigrationFinalizationRequestJsonAdapter.ts`:
- Around line 59-64: The JSON parse error for confirmations uses the wrong
context text; update the parsing block inside parseDomainValue for
GraphModelMigrationFinalizationConfirmation so that when calling parseJson(raw)
(and any parse failure) it reports a context-specific message like
"finalizationConfirmation" or "finalization confirmation" instead of the generic
"finalization request JSON". Locate the parseDomainValue call that constructs a
GraphModelMigrationFinalizationConfirmation (which uses parseJson,
requireJsonObject, rejectUnknownKeys, CONFIRMATION_KEYS and readRequiredString
for 'finalizationConfirmation.confirmationToken') and change the error/context
string passed to parseJson or the surrounding parseDomainValue wrapper to
reflect confirmation parsing. Ensure rejectUnknownKeys and error messages
consistently reference 'finalizationConfirmation'.
🪄 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
Run ID: 2466f1cf-5a7f-4561-8829-ffb12c210272
📒 Files selected for processing (21)
CHANGELOG.mddocs/BEARING.mddocs/design/0214-v18-production-runtime-scratch-replay-conformance/v18-production-runtime-scratch-replay-conformance.mddocs/design/0228-v18-fixture-lifecycle-and-writer-coverage/v18-fixture-lifecycle-and-writer-coverage.mddocs/design/0230-v18-finalization-replan-after-zero-mismatch/v18-finalization-replan-after-zero-mismatch.mdfixtures/v17/graph-model-golden/README.mdfixtures/v17/graph-model-golden/manifest.jsonscripts/v18.0.0/migrations/graph-model/GraphModelMigrationCommand.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationCommandCli.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchPublicReadBuilder.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.tsscripts/v18.0.0/migrations/graph-model/V17GoldenGraphFixtureWetRunHarness.tssrc/domain/migrations/GraphModelMigrationRuntimeReplayResult.tssrc/infrastructure/adapters/GraphModelMigrationFinalizationRequestJsonAdapter.tstest/unit/domain/migrations/V17GoldenGraphFixtureGenesisReading.test.tstest/unit/infrastructure/adapters/GraphModelMigrationFinalizationRequestJsonAdapter.test.tstest/unit/scripts/v18-graph-model-migration-command-cli.test.tstest/unit/scripts/v18-production-runtime-scratch-replay-provider.test.tstest/unit/scripts/v18-scratch-public-read-builder.test.tstest/unit/scripts/v18-v17-fixture-wet-run-harness.test.tstest/unit/scripts/v18-v17-public-read-legacy-reading-builder.test.ts
✅ Files skipped from review due to trivial changes (6)
- fixtures/v17/graph-model-golden/README.md
- fixtures/v17/graph-model-golden/manifest.json
- docs/design/0228-v18-fixture-lifecycle-and-writer-coverage/v18-fixture-lifecycle-and-writer-coverage.md
- docs/design/0230-v18-finalization-replan-after-zero-mismatch/v18-finalization-replan-after-zero-mismatch.md
- docs/design/0214-v18-production-runtime-scratch-replay-conformance/v18-production-runtime-scratch-replay-conformance.md
- CHANGELOG.md
|
Resolution summary for the self-review findings posted in #106 (comment).
Verification completed locally and in pre-push:
✅ Addressed in commits |
Release Preflight
If you tag this commit as |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts (1)
94-104:⚠️ Potential issue | 🟠 Major | ⚡ Quick winValidate
runtimeRepositoryPathbefore using it as the runtime repo cwd.If a caller passes
'', this branch skips temp-dir creation and initializes the replay repo in the current working directory instead of an isolated location. That turns a verification path into a write against an unintended repo.Suggested fix
export async function replayGraphModelMigrationScratchIntoRuntime( options: GraphModelMigrationScratchRuntimeReplayOptions, ): Promise<GraphModelMigrationScratchRuntimeReplayOutput> { const sourceRepositoryPath = requireGraphModelMigrationRuntimeReplayString( options.sourceRepositoryPath, 'sourceRepositoryPath', ); const request = requireGraphModelMigrationRuntimeReplayRequest(options.request); - let runtimeRepositoryPath = options.runtimeRepositoryPath ?? null; + let runtimeRepositoryPath = options.runtimeRepositoryPath === null + || options.runtimeRepositoryPath === undefined + ? null + : requireGraphModelMigrationRuntimeReplayString( + options.runtimeRepositoryPath, + 'runtimeRepositoryPath', + ); let shouldCleanup = false; if (runtimeRepositoryPath === null) { runtimeRepositoryPath = await mkdtemp(join(tmpdir(), 'git-warp-v18-runtime-replay-')); shouldCleanup = true; }As per coding guidelines, "Validate at boundaries and constructors; constructors establish invariants and must not perform I/O".
🤖 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 `@scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts` around lines 94 - 104, The code fails to validate runtimeRepositoryPath and treats an empty string as a valid path, causing repo initialization to run in CWD; update the initialization so runtimeRepositoryPath is normalized/validated (e.g., call the same validator used for sourceRepositoryPath or explicitly treat '' as null) before deciding to create a temp dir: change the runtimeRepositoryPath assignment (currently using options.runtimeRepositoryPath ?? null) to validate/normalize options.runtimeRepositoryPath (reject empty string) and only skip mkdtemp when a non-empty, validated path is provided; refer to the runtimeRepositoryPath and shouldCleanup variables and the mkdtemp(join(tmpdir(), 'git-warp-v18-runtime-replay-')) call when making the fix.
🤖 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
`@scripts/v18.0.0/migrations/graph-model/V17GoldenFixtureScratchReadingProvider.ts`:
- Around line 87-99: The code uses repeated magic strings for scratch operation
kinds and fact keys (e.g., 'node-record', 'edge-record', 'property',
'content-attachment', 'visibility', 'value', 'payload.oid', 'coverage',
'removed'); replace these literals with named constants (or import existing
domain constants) and update the control flow and factKey calls accordingly —
locate the switch/if block around factKey(...) calls and the thrown
V17GoldenFixtureScratchReadingProviderError in
V17GoldenFixtureScratchReadingProvider.ts and define constants (e.g.,
SCRATCH_KIND_NODE_RECORD, FACT_KEY_VISIBILITY, FACT_KEY_VALUE,
FACT_KEY_PAYLOAD_OID, etc.) then use those constants in the if conditions and in
calls to factKey, publicPropertyFactKey, publicContentFactKey, and anywhere the
other literals (coverage, removed) appear (also apply the same change for the
similar block at lines ~142-157).
---
Outside diff comments:
In
`@scripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.ts`:
- Around line 94-104: The code fails to validate runtimeRepositoryPath and
treats an empty string as a valid path, causing repo initialization to run in
CWD; update the initialization so runtimeRepositoryPath is normalized/validated
(e.g., call the same validator used for sourceRepositoryPath or explicitly treat
'' as null) before deciding to create a temp dir: change the
runtimeRepositoryPath assignment (currently using options.runtimeRepositoryPath
?? null) to validate/normalize options.runtimeRepositoryPath (reject empty
string) and only skip mkdtemp when a non-empty, validated path is provided;
refer to the runtimeRepositoryPath and shouldCleanup variables and the
mkdtemp(join(tmpdir(), 'git-warp-v18-runtime-replay-')) call when making the
fix.
🪄 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
Run ID: fedb3144-a25d-4dd6-b40b-2c0abf8a8995
📒 Files selected for processing (14)
CHANGELOG.mdscripts/v18.0.0/migrations/graph-model/GraphModelMigrationCommand.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationCommandCli.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationCommandCliArgs.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationFinalizationReview.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayErrors.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayValidation.tsscripts/v18.0.0/migrations/graph-model/GraphModelMigrationScratchRuntimeReplayer.tsscripts/v18.0.0/migrations/graph-model/V17GoldenFixtureScratchFactKeyCodec.tsscripts/v18.0.0/migrations/graph-model/V17GoldenFixtureScratchReadingProvider.tsscripts/v18.0.0/migrations/graph-model/V17GoldenGraphFixturePropertyMappings.tsscripts/v18.0.0/migrations/graph-model/V17GoldenGraphFixtureWetRunHarness.tstest/unit/scripts/v18-production-runtime-scratch-replay-provider.test.tstest/unit/scripts/v18-v17-fixture-wet-run-harness.test.ts
✅ Files skipped from review due to trivial changes (1)
- CHANGELOG.md
|
@codex Self-audit findings discovered during the final verification pass before pushing the CodeRabbit fixes.
|
Code Lawyer Activity SummaryResolved all currently known actionable feedback and the self-audit findings from this pass.
Verification before push:
All review threads are resolved as of this comment. |
Release Preflight
If you tag this commit as |
|
Follow-up cleanup landed in
Verification:
All currently verified review-discovered cleanup items are addressed in this branch update. |
Release Preflight
If you tag this commit as |
Summary
Release posture
This PR puts v18 in release-candidate evidence posture, not public-release posture. Public release still requires final release-prep gates, package/version/tag work, operator release notes, residual raw content/property risk review, and an explicit guard against claiming end-to-end graph streaming in v18.
Verification
Pre-push IRONCLAD M9 passed:
Summary by CodeRabbit
New Features
Documentation
Tests