@thomasminh1995/depverdict 0.6.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +518 -0
- package/bin/depverdict.js +7 -0
- package/bin/upgradelens.js +7 -0
- package/docs/GR-01-Semantic-Grounding-Failure-Analysis.md +309 -0
- package/docs/GR-02-Versioned-Action-Evaluation-Criteria.md +187 -0
- package/docs/GR-03-Extractive-Contract-Safety-Experiment.md +242 -0
- package/docs/GR-04-Versioned-Production-Extractive-Contract.md +154 -0
- package/docs/IA-01-Repository-Usage-Discovery.md +122 -0
- package/docs/IA-02-Repository-Impact-Analysis.md +118 -0
- package/docs/IA-03-Repository-Impact-Evidence.md +160 -0
- package/docs/IA-04-CLI-Orchestration.md +235 -0
- package/docs/IA-05-Real-Provider-Validation.md +235 -0
- package/docs/IA-05-VinGrade-Validation.md +339 -0
- package/docs/MVP-01.md +48 -0
- package/docs/MVP-02-Architecture.md +536 -0
- package/docs/MVP-02-CLI-HTTP-Runtime.md +50 -0
- package/docs/MVP-02-HTTP-Lifecycle.md +37 -0
- package/docs/MVP-02-Knowledge-Manifest-Generation.md +75 -0
- package/docs/MVP-02-Knowledge-Manifest.md +279 -0
- package/docs/MVP-02-Knowledge-Research-Orchestration.md +62 -0
- package/docs/MVP-02-Knowledge-Store.md +87 -0
- package/docs/MVP-02-PyPI-Registry-Adapter.md +97 -0
- package/docs/MVP-02-Research-Planning.md +196 -0
- package/docs/MVP-02-Source-Provenance.md +81 -0
- package/docs/MVP-02-npm-Registry-Adapter.md +99 -0
- package/docs/RR-01-End-to-End-and-Real-Provider-Validation.md +393 -0
- package/docs/RR-01-RERUN-Extractive-Contract-Validation.md +566 -0
- package/docs/RR-02-Full-Product-Workflow-and-Developer-CLI-UX-Review.md +35 -0
- package/docs/RR02-FIX-01-Persistent-Qualification-Resolution.md +32 -0
- package/docs/RR02-FIX-02-Stage-aware-CLI-Progress-and-Heartbeat.md +28 -0
- package/docs/RR02-FIX-03-npm-Capture-Evidence-Exclusion.md +33 -0
- package/docs/RR02-FIX-03A-Complete-Package-Exclusion-and-Evidence-Commit.md +223 -0
- package/docs/RR02-FIX-04-Event-loop-safe-Heartbeat.md +393 -0
- package/docs/RR02-FIX-05-Materialize-Persisted-Qualification.md +207 -0
- package/docs/RR02-RERUN-CLI-Qualification-Progress-UX-and-Package-Validation.md +342 -0
- package/docs/VinGrade-MVP-02-Validation.md +480 -0
- package/docs/VinGrade-RC02-Live-Validation.md +273 -0
- package/docs/ai-capability-discovery.md +573 -0
- package/docs/ai-engineering-production-readiness.md +390 -0
- package/docs/ai-engineering-review.md +251 -0
- package/docs/ai-runtime-governance-discovery.md +754 -0
- package/docs/architecture-overview.md +78 -0
- package/docs/cli-progress.md +111 -0
- package/docs/decisions/diff-01-brand-distribution-identity.md +450 -0
- package/docs/decisions/diff-02-identity-compatibility-contract.md +274 -0
- package/docs/decisions/diff-03-repository-docs-community-migration.md +165 -0
- package/docs/decisions/diff-04-release-evidence-gap-acceptance.md +110 -0
- package/docs/discovery/mvp-05-ai-migration-planning-discovery.md +350 -0
- package/docs/gateway-runtime-discovery.md +614 -0
- package/docs/live-ai-validation.md +299 -0
- package/docs/migration-planning-qualification-resolution.md +99 -0
- package/docs/migrations/upgradelens-to-depverdict.md +97 -0
- package/docs/mp-r03-deterministic-upgrade-decision-architecture.md +135 -0
- package/docs/mp-r04-evidence-bounded-migration-handoff-architecture.md +116 -0
- package/docs/mp-r05-product-completion-and-decision-first-cli-architecture.md +162 -0
- package/docs/mvp-05-deterministic-context-runtime.md +127 -0
- package/docs/mvp-05-migration-checklist-contract.md +166 -0
- package/docs/mvp-05-migration-checklist-orchestration.md +105 -0
- package/docs/mvp-05-migration-evaluation-and-qualification.md +135 -0
- package/docs/mvp-05-provider-neutral-generator.md +79 -0
- package/docs/ollama-local-smoke-validation.md +156 -0
- package/docs/openai-compatible-runtime-discovery.md +789 -0
- package/docs/openrouter-one-dependency-validation.md +205 -0
- package/docs/oss-02-package-guard-hardening-architecture.md +131 -0
- package/docs/oss-04-public-ci-package-metadata-architecture.md +142 -0
- package/docs/package-content-policy.md +98 -0
- package/docs/releases/v0.5.0-technical-preview.md +114 -0
- package/docs/releases/v0.6.0-alpha.1-depverdict-preview.md +101 -0
- package/docs/reviews/diff-02-identity-contract-compatibility.md +413 -0
- package/docs/reviews/diff-03-repository-docs-community-migration.md +364 -0
- package/docs/reviews/diff-04-depverdict-distribution-identity-readiness-rereview.md +453 -0
- package/docs/reviews/diff-04-fix-post-rename-identity-release-remediation.md +310 -0
- package/docs/reviews/diff-05-final-preview-distribution-qualification.md +561 -0
- package/docs/reviews/mvp-05-final-product-value-workflow-rereview.md +471 -0
- package/docs/reviews/mvp-05-product-workflow-review.md +605 -0
- package/docs/reviews/oss-01-duplicate-artifact-investigation-cleanup.md +411 -0
- package/docs/reviews/oss-02-package-guard-hardening.md +303 -0
- package/docs/reviews/oss-03-community-scaffolding.md +378 -0
- package/docs/reviews/oss-04-public-ci-package-metadata.md +439 -0
- package/docs/reviews/oss-05-technical-preview-qualification.md +482 -0
- package/docs/reviews/upgradelens-vs-upgradedepdetective-source-comparison.md +355 -0
- package/docs/reviews/v0.5.0-pre-release-smoke.md +263 -0
- package/docs/reviews/v0.5.0-version-bump-release-verification.md +306 -0
- package/docs/runtime-contract-discovery.md +521 -0
- package/docs/structured-output-compatibility-report.md +100 -0
- package/docs/ts-fix-01-exact-duplicate-occurrence-target-selection-architecture.md +111 -0
- package/docs/version-analysis-architecture.md +827 -0
- package/eval/README.md +86 -0
- package/eval/datasets/generic/declared-constraint.json +59 -0
- package/eval/datasets/generic/evidence-conflict.json +73 -0
- package/eval/datasets/generic/major-breaking-release.json +66 -0
- package/eval/datasets/generic/missing-evidence.json +46 -0
- package/eval/datasets/generic/patch-release-low.json +59 -0
- package/eval/datasets/node/axios-patch-low.json +59 -0
- package/eval/datasets/node/react-major-breaking.json +66 -0
- package/eval/datasets/node/react-minor-compatibility.json +66 -0
- package/eval/datasets/python/fastapi-deprecation.json +66 -0
- package/eval/datasets/python/pydantic-major-breaking.json +66 -0
- package/eval/migration-planning/golden-dataset-v2.json +306 -0
- package/eval/migration-planning/golden-dataset.json +214 -0
- package/eval/schemas/expected-result.schema.json +88 -0
- package/eval/schemas/golden-case.schema.json +181 -0
- package/package.json +57 -0
- package/schemas/ai-scorecard.schema.json +132 -0
- package/schemas/benchmark-report.schema.json +189 -0
- package/schemas/benchmark.schema.json +55 -0
- package/schemas/capability-profile.schema.json +44 -0
- package/schemas/conformance-report.schema.json +150 -0
- package/schemas/deployment-profile.schema.json +64 -0
- package/schemas/evaluation-report.schema.json +158 -0
- package/schemas/knowledge-evidence-bundle.schema.json +150 -0
- package/schemas/knowledge-manifest.schema.json +548 -0
- package/schemas/metrics.schema.json +178 -0
- package/schemas/migration-checklist-extractive-candidate.schema.json +42 -0
- package/schemas/migration-checklist.schema.json +706 -0
- package/schemas/migration-evaluation-dataset-v2.schema.json +208 -0
- package/schemas/migration-evaluation-dataset.schema.json +204 -0
- package/schemas/migration-planning-qualification-record.schema.json +234 -0
- package/schemas/project-manifest.schema.json +308 -0
- package/schemas/qualification-record.schema.json +56 -0
- package/schemas/repository-impact-evidence.schema.json +232 -0
- package/schemas/repository-impact.schema.json +202 -0
- package/schemas/upgrade-decision.schema.json +273 -0
- package/schemas/usage-index.schema.json +179 -0
- package/schemas/version-analysis.schema.json +449 -0
- package/src/ai-runtime-debug.js +325 -0
- package/src/ai-runtime-error.js +42 -0
- package/src/ai-runtime.js +174 -0
- package/src/ai-scorecard.js +204 -0
- package/src/ai-version-analysis.js +484 -0
- package/src/artifact-root-compatibility.js +91 -0
- package/src/benchmark-report.js +111 -0
- package/src/benchmark-runner.js +191 -0
- package/src/canonical-json.js +69 -0
- package/src/cli.js +1299 -0
- package/src/conformance-report.js +158 -0
- package/src/conformance-runner.js +253 -0
- package/src/constants.js +73 -0
- package/src/cooperative-scheduler.js +79 -0
- package/src/dependencies.js +44 -0
- package/src/dependency-ai-context.js +625 -0
- package/src/detectors.js +253 -0
- package/src/discovery.js +234 -0
- package/src/ecosystem-version-adapter.js +294 -0
- package/src/environment-compatibility.js +77 -0
- package/src/evaluation-comparator.js +158 -0
- package/src/evaluation-report.js +76 -0
- package/src/evaluation-runner.js +248 -0
- package/src/evidence-source-adapter.js +472 -0
- package/src/files.js +89 -0
- package/src/governance-diagnostics.js +64 -0
- package/src/governance-loader.js +63 -0
- package/src/governance-metadata.js +346 -0
- package/src/governance-validator.js +360 -0
- package/src/http/bounded-fetch.js +278 -0
- package/src/http/cli-http-runtime.js +44 -0
- package/src/impact/input-loader.js +157 -0
- package/src/impact/matcher.js +40 -0
- package/src/impact/repository-impact.js +199 -0
- package/src/impact/runtime.js +24 -0
- package/src/impact/status.js +62 -0
- package/src/impact/writer.js +30 -0
- package/src/impact-evidence/input-loader.js +202 -0
- package/src/impact-evidence/repository-impact-evidence.js +234 -0
- package/src/impact-evidence/runtime.js +16 -0
- package/src/impact-evidence/writer.js +30 -0
- package/src/index.js +563 -0
- package/src/installed-version-baseline.js +196 -0
- package/src/knowledge-cache.js +324 -0
- package/src/knowledge-evidence-bundle.js +101 -0
- package/src/knowledge-evidence-producer.js +233 -0
- package/src/knowledge-manifest-builder.js +188 -0
- package/src/knowledge-manifest-writer.js +32 -0
- package/src/knowledge-manifest.js +255 -0
- package/src/knowledge-research.js +615 -0
- package/src/metrics-engine.js +205 -0
- package/src/migration-checklist/ai-candidate.js +320 -0
- package/src/migration-checklist/assembler.js +37 -0
- package/src/migration-checklist/context-runtime.js +828 -0
- package/src/migration-checklist/evaluation/action-criteria.js +244 -0
- package/src/migration-checklist/evaluation/comparator-v2.js +332 -0
- package/src/migration-checklist/evaluation/comparator.js +279 -0
- package/src/migration-checklist/evaluation/dataset-v2.js +227 -0
- package/src/migration-checklist/evaluation/dataset.js +336 -0
- package/src/migration-checklist/evaluation/extractive-fixtures-v2.js +148 -0
- package/src/migration-checklist/evaluation/metrics-v2.js +226 -0
- package/src/migration-checklist/evaluation/metrics.js +158 -0
- package/src/migration-checklist/evaluation/qualification-v2.js +321 -0
- package/src/migration-checklist/evaluation/qualification.js +239 -0
- package/src/migration-checklist/evaluation/runner-v2.js +294 -0
- package/src/migration-checklist/evaluation/runner.js +194 -0
- package/src/migration-checklist/evaluation/scorecard-v2.js +106 -0
- package/src/migration-checklist/evaluation/scorecard.js +86 -0
- package/src/migration-checklist/extractive-candidate.js +166 -0
- package/src/migration-checklist/extractive-prompt.js +62 -0
- package/src/migration-checklist/generator.js +702 -0
- package/src/migration-checklist/grounding-policy.js +117 -0
- package/src/migration-checklist/input-loader.js +613 -0
- package/src/migration-checklist/migration-checklist.js +635 -0
- package/src/migration-checklist/presentation.js +292 -0
- package/src/migration-checklist/progress.js +96 -0
- package/src/migration-checklist/prompt.js +83 -0
- package/src/migration-checklist/qualification-guard.js +462 -0
- package/src/migration-checklist/qualification-resolution.js +122 -0
- package/src/migration-checklist/qualification-store.js +225 -0
- package/src/migration-checklist/runtime.js +205 -0
- package/src/migration-checklist/verification.js +134 -0
- package/src/migration-checklist/writer.js +35 -0
- package/src/openai-compatible-provider.js +451 -0
- package/src/orchestration/failure-log.js +32 -0
- package/src/orchestration/pipeline.js +200 -0
- package/src/orchestration/progress-events.js +337 -0
- package/src/orchestration/progress-reporter.js +131 -0
- package/src/orchestration/text-writer.js +22 -0
- package/src/portable.js +13 -0
- package/src/product-completion.js +249 -0
- package/src/project-manifest-input.js +90 -0
- package/src/project-manifest.js +141 -0
- package/src/python-requirements.js +137 -0
- package/src/registry/npm-packument.js +256 -0
- package/src/registry/npm-registry-adapter.js +262 -0
- package/src/registry/pypi-project.js +300 -0
- package/src/registry/pypi-registry-adapter.js +235 -0
- package/src/registry/sanitize-registry-body.js +51 -0
- package/src/renderers/console.js +160 -0
- package/src/renderers/impact-presentation.js +278 -0
- package/src/renderers/markdown.js +172 -0
- package/src/research-plan.js +455 -0
- package/src/runtime-conformance.js +275 -0
- package/src/source-provenance.js +393 -0
- package/src/source-url.js +62 -0
- package/src/structured-output-schema.js +66 -0
- package/src/target-selector.js +306 -0
- package/src/upgrade-decision/input-loader.js +107 -0
- package/src/upgrade-decision/presentation.js +43 -0
- package/src/upgrade-decision/runtime.js +21 -0
- package/src/upgrade-decision/upgrade-decision.js +626 -0
- package/src/upgrade-decision/writer.js +30 -0
- package/src/usage/analyzer-registry.js +63 -0
- package/src/usage/coverage.js +116 -0
- package/src/usage/input-loader.js +139 -0
- package/src/usage/js/analyzer.js +240 -0
- package/src/usage/js/parser.js +21 -0
- package/src/usage/runtime.js +187 -0
- package/src/usage/scope.js +44 -0
- package/src/usage/source-files.js +50 -0
- package/src/usage/usage-index.js +217 -0
- package/src/usage/writer.js +31 -0
- package/src/version-analysis-loader.js +203 -0
- package/src/version-analysis-manifest.js +314 -0
- package/src/version-analysis-writer.js +30 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# MP-R04 Evidence-Bounded Migration Handoff Architecture
|
|
2
|
+
|
|
3
|
+
## Decision
|
|
4
|
+
|
|
5
|
+
Upgrade the existing `.upgradelens/migration-checklist.json` artifact instead
|
|
6
|
+
of creating a separate Migration Handoff artifact.
|
|
7
|
+
|
|
8
|
+
The checklist already owns the evidence-bounded action projection, exact
|
|
9
|
+
evidence references, deterministic candidate locations, limitations, stable
|
|
10
|
+
item IDs, atomic writer, qualification boundary, and console/Markdown
|
|
11
|
+
presentation. A second artifact would either duplicate those facts or require
|
|
12
|
+
Coding Agents to join two handoff documents. Schema version 2 adds the missing
|
|
13
|
+
deterministic handoff projection to each dependency occurrence while retaining
|
|
14
|
+
the extractive action contract.
|
|
15
|
+
|
|
16
|
+
The artifact remains experimental and human-reviewed. It is not a migration
|
|
17
|
+
execution plan, approval record, patch, command runner, or proof that migration
|
|
18
|
+
work is complete.
|
|
19
|
+
|
|
20
|
+
## Discovery answers
|
|
21
|
+
|
|
22
|
+
1. The v1 checklist already contains the Version Analysis result and dependency
|
|
23
|
+
occurrence identities, installed/current/target version facts, target
|
|
24
|
+
policy, selected evidence refs, breaking findings, exact-excerpt-derived
|
|
25
|
+
review instructions, positive Impact Evidence locations, limitations, stable
|
|
26
|
+
IDs, ordering, lineage, and mandatory item review state.
|
|
27
|
+
2. AI owns only selection of an exact allowlisted evidence excerpt. The legacy
|
|
28
|
+
wire value `AI_AUTHORED` identifies that selected item, but deterministic
|
|
29
|
+
runtime owns the final prefix, item ID, evidence refs, location-free action
|
|
30
|
+
shape, ordering, status, and review requirement.
|
|
31
|
+
3. The existing artifact is the correct product boundary. It needs an
|
|
32
|
+
incompatible schema upgrade because v1 cannot represent authoritative
|
|
33
|
+
decision identity, recommendation driver, handoff outcome, verification
|
|
34
|
+
state, recovery state, or structured coverage alongside every occurrence.
|
|
35
|
+
4. No new artifact is introduced. The missing values are represented in v2
|
|
36
|
+
without copying raw upstream artifacts.
|
|
37
|
+
5. Target origin is the persisted Upgrade Decision
|
|
38
|
+
`versions.targetPolicy`. The current only production recommendation driver
|
|
39
|
+
is `USER_SELECTED_TARGET`, present as the `PLAN_UPGRADE` primary reason and
|
|
40
|
+
reason code under policy 1.1.0.
|
|
41
|
+
6. Action evidence must be official/publisher, available, fresh,
|
|
42
|
+
non-conflicted, one of the existing migration-capable kinds, referenced by
|
|
43
|
+
the finding, and scoped to the exact selected target version.
|
|
44
|
+
7. Affected areas come only from Repository Impact Evidence positive
|
|
45
|
+
`matchedSymbols[].usages[]`, preserving its evidence ID, finding ID, symbol,
|
|
46
|
+
portable file path, and coverage state.
|
|
47
|
+
8. Project Manifest v2 does not contain verification scripts. MP-R04 therefore
|
|
48
|
+
reads only supported package manifests already identified by Project
|
|
49
|
+
Manifest. For Node `package.json`, it projects safe script names into
|
|
50
|
+
package-manager commands and records the source path plus exact-byte digest.
|
|
51
|
+
It does not parse script bodies, README prose, arbitrary CI shell, or execute
|
|
52
|
+
commands. Other ecosystems and missing/unsafe script metadata produce
|
|
53
|
+
`VERIFICATION_COMMAND_UNAVAILABLE`.
|
|
54
|
+
9. The extractive prompt forbids identity, paths, commands, URLs, ordering,
|
|
55
|
+
prerequisites, rollback, effort, approval, code, and reasoning. Candidate
|
|
56
|
+
schema permits only evidence ref plus exact excerpt. Trust validation
|
|
57
|
+
requires exact substring containment and rejects the whole candidate when
|
|
58
|
+
any item has a prohibited capability.
|
|
59
|
+
10. Provider abstention, invalid output, trust rejection, timeout, and runtime
|
|
60
|
+
failure already produce deterministic manual-review records without
|
|
61
|
+
publishing partial candidate actions. V2 maps abstention to
|
|
62
|
+
`NO_GROUNDED_ACTION` and generation/rejection/runtime failures to
|
|
63
|
+
`ACTION_GENERATION_FAILED`.
|
|
64
|
+
|
|
65
|
+
## V2 ownership
|
|
66
|
+
|
|
67
|
+
Deterministic runtime owns:
|
|
68
|
+
|
|
69
|
+
- dependency, project, manifest, Version Analysis, and Upgrade Decision IDs;
|
|
70
|
+
- installed and target versions, target origin, and recommendation driver;
|
|
71
|
+
- decision-to-handoff mapping and human-review state;
|
|
72
|
+
- evidence references and official evidence metadata projection;
|
|
73
|
+
- verified affected areas and coverage state;
|
|
74
|
+
- safe project-derived verification commands and their source digests;
|
|
75
|
+
- precondition codes, recovery availability, stable IDs, and ordering.
|
|
76
|
+
|
|
77
|
+
AI may only select an exact action excerpt from the bounded official evidence
|
|
78
|
+
allowlist. It cannot own or modify any other handoff field.
|
|
79
|
+
|
|
80
|
+
## Decision mapping
|
|
81
|
+
|
|
82
|
+
| Upgrade Decision | Handoff status | Provider eligible |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `KEEP_CURRENT` | `NO_VERSION_CHANGE_REQUIRED` | No |
|
|
85
|
+
| `PLAN_UPGRADE` / `UPGRADE_NOW`, accepted actions | `ACTIONABLE_WITH_REVIEW` | Yes |
|
|
86
|
+
| `PLAN_UPGRADE` / `UPGRADE_NOW`, abstention/no instruction | `NO_GROUNDED_ACTION` | Yes, at most one call per eligible finding |
|
|
87
|
+
| `PLAN_UPGRADE` / `UPGRADE_NOW`, rejected/failed generation | `ACTION_GENERATION_FAILED` | Yes, package-local failure |
|
|
88
|
+
| `INVESTIGATE` | `INVESTIGATION_REQUIRED` | No |
|
|
89
|
+
| `INSUFFICIENT_EVIDENCE` | `INSUFFICIENT_EVIDENCE` | No |
|
|
90
|
+
| `NOT_ANALYZED` | `NOT_ANALYZED` | No |
|
|
91
|
+
|
|
92
|
+
Every persisted Upgrade Decision occurrence must produce exactly one dependency
|
|
93
|
+
handoff record. Missing or legacy Upgrade Decision artifacts are never treated
|
|
94
|
+
as actionable.
|
|
95
|
+
|
|
96
|
+
## Verification and recovery
|
|
97
|
+
|
|
98
|
+
Verification commands are bounded deterministic projections, not executed
|
|
99
|
+
results. Supported Node package scripts are selected by exact generic
|
|
100
|
+
verification roles (`test`, `build`, `lint`, `typecheck`, and `check`) and
|
|
101
|
+
invoked through the declared supported package manager. The record includes
|
|
102
|
+
the portable working directory, source manifest path, script name, and
|
|
103
|
+
source-byte digest. No command is inferred when any required structured fact is
|
|
104
|
+
missing.
|
|
105
|
+
|
|
106
|
+
MP-R04 does not synthesize recovery. Until an exact structured upstream
|
|
107
|
+
recovery instruction exists, records contain `RECOVERY_PLAN_NOT_PROVIDED`.
|
|
108
|
+
|
|
109
|
+
## Compatibility
|
|
110
|
+
|
|
111
|
+
Schema v1 checklists are non-actionable legacy artifacts and must be
|
|
112
|
+
regenerated. The v2 loader requires exact Upgrade Decision lineage and rejects
|
|
113
|
+
tampering or occurrence mismatches before generation. The public
|
|
114
|
+
`analyze-version` CLI still chooses `registryLatest`; positive handoff
|
|
115
|
+
acceptance uses the supported programmatic explicit-target boundary. Default
|
|
116
|
+
Migration Checklist enablement and provider qualification rules are unchanged.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# MP-R05 Product Completion and Decision-First CLI Architecture
|
|
2
|
+
|
|
3
|
+
## Decision
|
|
4
|
+
|
|
5
|
+
Keep `upgradelens analyze` as the primary product workflow and add two small,
|
|
6
|
+
orthogonal public controls:
|
|
7
|
+
|
|
8
|
+
- repeatable `--target <selector>` for structured caller-selected targets; and
|
|
9
|
+
- `--fail-on-incomplete` for CI that requires every trustworthy outcome to be
|
|
10
|
+
free of review or data gaps.
|
|
11
|
+
|
|
12
|
+
Do not add a configuration framework, a new persisted domain artifact, source
|
|
13
|
+
editing, command execution, or provider fallback. Product completion is a
|
|
14
|
+
deterministic presentation/exit projection over persisted Version Analysis,
|
|
15
|
+
Upgrade Decision, and optional Migration Checklist v2 artifacts.
|
|
16
|
+
|
|
17
|
+
## Discovery record
|
|
18
|
+
|
|
19
|
+
1. The public CLI has no explicit-target input. `analyze` always invokes
|
|
20
|
+
Version Analysis with `{ target: { policy: "registryLatest" } }`;
|
|
21
|
+
`analyze-version --package` selects one canonical package but does not select
|
|
22
|
+
a version.
|
|
23
|
+
2. The supported programmatic shape is
|
|
24
|
+
`{ target: { policy: "explicit", version: "<version>" } }`. The ecosystem
|
|
25
|
+
adapter normalizes the value before a context is built.
|
|
26
|
+
3. An occurrence cannot be selected safely by name alone. Resolution needs the
|
|
27
|
+
canonical package ID and, when ambiguous, `projectId`, manifest, and
|
|
28
|
+
dependency type. Declared version remains part of upstream occurrence
|
|
29
|
+
identity but is not required from the user because the validated Project
|
|
30
|
+
Manifest supplies it.
|
|
31
|
+
4. Scoped npm packages are already canonicalized as
|
|
32
|
+
`npm:@scope/package`. The target parser must not split on `@`.
|
|
33
|
+
5. Python packages are normalized by PEP 503-style name normalization and
|
|
34
|
+
represented as `pypi:normalized-name`. Versions are validated by the Python
|
|
35
|
+
ecosystem adapter, not npm SemVer.
|
|
36
|
+
6. The same canonical package in multiple projects/workspaces produces
|
|
37
|
+
multiple occurrences. An unqualified selector must fail with
|
|
38
|
+
`TARGET_SELECTOR_AMBIGUOUS` and list stable candidate selectors; it must
|
|
39
|
+
never choose the first occurrence or fan out implicitly.
|
|
40
|
+
7. The final console summary is built by `renderConsoleSummary` after the
|
|
41
|
+
Markdown Report stage. Upgrade Decision and Migration Checklist renderers
|
|
42
|
+
are appended after impact counts.
|
|
43
|
+
8. Current `COMPLETE`/`INCOMPLETE` values describe impact/checklist coverage,
|
|
44
|
+
not whether the product workflow has a trustworthy terminal result. They
|
|
45
|
+
remain compatible diagnostic fields and are not reused as product
|
|
46
|
+
completion.
|
|
47
|
+
9. Fatal stage failures return 1, controlled cancellation returns 130, and
|
|
48
|
+
`discover --fail-on-warning` returns 2. Package-local provider/output
|
|
49
|
+
failures are persisted as failed Version Analysis results but a successful
|
|
50
|
+
`analyze` pipeline currently returns 0.
|
|
51
|
+
10. Existing tests assert artifact retention and exit 0 for some direct
|
|
52
|
+
`analyze-version` package-local failures. MP-R05 intentionally changes the
|
|
53
|
+
product `analyze` exit contract; the stage command remains an artifact
|
|
54
|
+
producer and reports its failed-result count without pretending that its
|
|
55
|
+
result is a completed product analysis.
|
|
56
|
+
|
|
57
|
+
## Public target selector
|
|
58
|
+
|
|
59
|
+
Use a repeatable, key/value selector:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
--target package=<canonical-package-id>,target=<version>
|
|
63
|
+
--target package=<id>,target=<version>,project=<project-id>,manifest=<path>,type=<dependency-type>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Examples:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
--target 'package=npm:framework-a,target=2.0.0'
|
|
70
|
+
--target 'package=npm:@scope/package,target=3.1.0'
|
|
71
|
+
--target 'package=pypi:library-b,target=3.0.0'
|
|
72
|
+
--target 'package=npm:framework-a,target=2.0.0,project=node:apps/web,manifest=apps/web/package.json,type=dependency'
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The grammar is deliberately not `name@version`, so scoped npm names require no
|
|
76
|
+
special-case split. Required keys are `package` and `target`; optional keys are
|
|
77
|
+
`project`, `manifest`, and `type`. Unknown/duplicate keys, non-portable
|
|
78
|
+
manifests, duplicate occurrence selection, unsupported adapters, and invalid
|
|
79
|
+
versions fail before provider construction.
|
|
80
|
+
|
|
81
|
+
Resolution is performed against validated `resolveDependencyAnalysisInputs`
|
|
82
|
+
facts. Zero matches produce `TARGET_SELECTOR_NOT_FOUND`; multiple matches
|
|
83
|
+
produce `TARGET_SELECTOR_AMBIGUOUS` with stable candidate guidance; invalid or
|
|
84
|
+
unsupported versions produce `TARGET_VERSION_INVALID`. Repeated selectors are
|
|
85
|
+
resolved as a set independently of CLI input order.
|
|
86
|
+
|
|
87
|
+
Selected occurrences receive an explicit target. Every unselected occurrence
|
|
88
|
+
continues to use `registryLatest`, so the default and mixed workflows never
|
|
89
|
+
convert registry facts into user intent.
|
|
90
|
+
|
|
91
|
+
## Product completion projection
|
|
92
|
+
|
|
93
|
+
The projection has closed outcomes:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
COMPLETED
|
|
97
|
+
COMPLETED_WITH_REVIEW
|
|
98
|
+
PARTIAL
|
|
99
|
+
INSUFFICIENT_DATA
|
|
100
|
+
FAILED
|
|
101
|
+
CANCELLED
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Successful pipeline precedence is:
|
|
105
|
+
|
|
106
|
+
1. Any retained Version Analysis provider/output/runtime failure, or
|
|
107
|
+
`ACTION_GENERATION_FAILED` handoff: `PARTIAL`.
|
|
108
|
+
2. Any selected explicit target with `INSUFFICIENT_EVIDENCE`, or more than half
|
|
109
|
+
of occurrences unable to answer because of insufficient/missing analysis:
|
|
110
|
+
`INSUFFICIENT_DATA`.
|
|
111
|
+
3. Any valid `PLAN_UPGRADE`, `UPGRADE_NOW`, `INVESTIGATE`, review-required
|
|
112
|
+
decision, or coverage limitation: `COMPLETED_WITH_REVIEW`.
|
|
113
|
+
4. Otherwise: `COMPLETED`.
|
|
114
|
+
|
|
115
|
+
Fatal stage/config/schema/lineage errors are reported as `FAILED` and
|
|
116
|
+
controlled cancellation as `CANCELLED`; they do not publish a successful
|
|
117
|
+
completion projection.
|
|
118
|
+
|
|
119
|
+
`INVESTIGATE`, zero actions, and `KEEP_CURRENT` are not failures. Provider
|
|
120
|
+
failure precedence cannot be hidden by successful decision counts.
|
|
121
|
+
|
|
122
|
+
## Exit compatibility
|
|
123
|
+
|
|
124
|
+
Default `analyze` exits:
|
|
125
|
+
|
|
126
|
+
- 0 for `COMPLETED`, `COMPLETED_WITH_REVIEW`, and `INSUFFICIENT_DATA`;
|
|
127
|
+
- 2 for retained `PARTIAL`;
|
|
128
|
+
- 1 for fatal `FAILED`; and
|
|
129
|
+
- 130 for `CANCELLED`.
|
|
130
|
+
|
|
131
|
+
With `--fail-on-incomplete`, `COMPLETED_WITH_REVIEW` and
|
|
132
|
+
`INSUFFICIENT_DATA` also exit 2. The flag never fails solely because there are
|
|
133
|
+
zero migration actions or because all decisions are `KEEP_CURRENT`.
|
|
134
|
+
|
|
135
|
+
Exit 2 is reused as the existing non-fatal/strict public convention. This is an
|
|
136
|
+
intentional behavior change for `analyze` workflows that previously exited 0
|
|
137
|
+
despite retained provider/output failures.
|
|
138
|
+
|
|
139
|
+
## Presentation hierarchy
|
|
140
|
+
|
|
141
|
+
Console and Markdown lead with:
|
|
142
|
+
|
|
143
|
+
1. product completion and plain-language next step;
|
|
144
|
+
2. decision counts and occurrence table;
|
|
145
|
+
3. handoff counts/actions and review boundary;
|
|
146
|
+
4. failed occurrences, coverage/evidence/provider limitations, and recovery;
|
|
147
|
+
5. artifact paths; and
|
|
148
|
+
6. legacy impact counts and internal diagnostics.
|
|
149
|
+
|
|
150
|
+
`analyze --stdout` emits only a machine-readable completion summary on stdout;
|
|
151
|
+
progress remains on stderr. Qualification IDs, evidence IDs, lineage digests,
|
|
152
|
+
and raw reason codes remain in artifacts or diagnostic sections rather than
|
|
153
|
+
the default decision table.
|
|
154
|
+
|
|
155
|
+
## Experimental boundary
|
|
156
|
+
|
|
157
|
+
Migration Checklist v2 remains opt-in and experimental. The extractive
|
|
158
|
+
candidate/prompt identity is unchanged by the deterministic v2 envelope, but
|
|
159
|
+
MP-R05 does not claim new real-provider qualification or default enablement.
|
|
160
|
+
Public explicit targets can produce Upgrade Decisions without the experimental
|
|
161
|
+
stage; evidence-bounded migration actions still require the existing
|
|
162
|
+
experimental flag and qualification boundary.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# MVP-05 Deterministic Context Runtime
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
MP-02 prepares trusted, immutable input for the later migration-checklist generator. It performs no AI call, provider/network access, source scan, artifact write, CLI integration, or migration instruction generation.
|
|
6
|
+
|
|
7
|
+
The public orchestration API is `prepareMigrationChecklistContexts(input, options)`. `input` may be a repository root or an explicit `sources` object. The lower-level APIs are `loadMigrationChecklistInputs` and `buildMigrationTaskContexts`. The MP-03 consumer of this output is documented in [`mvp-05-provider-neutral-generator.md`](./mvp-05-provider-neutral-generator.md).
|
|
8
|
+
|
|
9
|
+
## Seven input artifacts and lineage
|
|
10
|
+
|
|
11
|
+
The loader reads the raw bytes of:
|
|
12
|
+
|
|
13
|
+
1. Project Manifest;
|
|
14
|
+
2. Knowledge Manifest;
|
|
15
|
+
3. Knowledge Evidence Bundle;
|
|
16
|
+
4. Version Analysis;
|
|
17
|
+
5. Usage Index;
|
|
18
|
+
6. Repository Impact;
|
|
19
|
+
7. Repository Impact Evidence.
|
|
20
|
+
|
|
21
|
+
Every public artifact is validated with its existing schema and invariant validator. Digests are SHA-256 over the exact bytes that were read; JSON reserialization is never used as lineage proof.
|
|
22
|
+
|
|
23
|
+
The validated graph is:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Project Manifest ──> Knowledge Manifest ──> Knowledge Evidence Bundle
|
|
27
|
+
│ │ │
|
|
28
|
+
└────────────────────┴─────────────────────────┴──> Version Analysis
|
|
29
|
+
│ │
|
|
30
|
+
└───────────────────────────────────────────────────┴──> Usage Index
|
|
31
|
+
│ │
|
|
32
|
+
└────────────────────────────────────────────────────────┴──> Repository Impact
|
|
33
|
+
│ │
|
|
34
|
+
└─────────────────────────────────────────────────────────────┴──> Repository Impact Evidence
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Only lineage fields that exist in the current schemas are compared. A mismatch is fatal and reports the consumer, upstream artifact, field, declared value, and actual exact-byte value with code `LINEAGE_MISMATCH`.
|
|
38
|
+
|
|
39
|
+
## Cross-artifact trust checks
|
|
40
|
+
|
|
41
|
+
Before any context is built, MP-02 verifies:
|
|
42
|
+
|
|
43
|
+
- exact Project and Knowledge dependency occurrence identity;
|
|
44
|
+
- package-level Usage identity (`projectId + packageId`) against one or more exact Version Analysis occurrences;
|
|
45
|
+
- package/ecosystem/registry identity across Project, Knowledge, and Version Analysis;
|
|
46
|
+
- unique finding identity within each analysis result;
|
|
47
|
+
- Version finding evidence refs against Version evidence metadata, bundle content, Knowledge source metadata, and package provenance;
|
|
48
|
+
- Usage dependency identity against Version Analysis;
|
|
49
|
+
- Repository Impact result/finding identity and exact matcher output against Usage symbols/files;
|
|
50
|
+
- Repository Impact Evidence identity, reason, symbol, and file records against Repository Impact and Usage.
|
|
51
|
+
|
|
52
|
+
Unknown, cross-package, cross-project, or ambiguous references are fatal. Corruption is not converted into a package-local fallback.
|
|
53
|
+
|
|
54
|
+
### Duplicate declaration reconciliation
|
|
55
|
+
|
|
56
|
+
Usage coverage is package-level: one Usage Index dependency records the symbols and files observed for a package in a project. Version Analysis is occurrence-level: repeated declarations of that package retain separate results, including separate analyzed, skipped, or failed states.
|
|
57
|
+
|
|
58
|
+
MP-02 therefore permits one package-level Usage identity to map to multiple valid Version Analysis occurrences. It validates every occurrence against its exact Project and Knowledge declaration facts, then processes every Version result independently. It does not merge declarations, choose a preferred result, upgrade a skipped result from a sibling analyzed result, or infer that duplicate declarations represent duplicate source-code usage.
|
|
59
|
+
|
|
60
|
+
Repository Impact and Repository Impact Evidence remain isolated by `analysisResultId`, then by exact finding and evidence identity. Positive locations are copied only from the matching `analysisResultId + findingId` record and retain their `impactEvidenceId + symbol + file` identity. A location or finding from one occurrence is never broadcast to another occurrence merely because both share a package.
|
|
61
|
+
|
|
62
|
+
An exact duplicate occurrence that cannot be distinguished by the existing canonical declaration facts remains fatal. Duplicate result IDs, duplicate findings within one result, unknown or cross-project/package identities, inconsistent downstream identities, and non-exact locations also remain fatal. These states are corruption, not manual-review fallbacks.
|
|
63
|
+
|
|
64
|
+
## Eligibility precedence
|
|
65
|
+
|
|
66
|
+
Action-generation eligibility is separate from location eligibility.
|
|
67
|
+
|
|
68
|
+
Action precedence is:
|
|
69
|
+
|
|
70
|
+
1. non-analyzed Version result → `NOT_ANALYZED`;
|
|
71
|
+
2. stale/conflicted selected evidence → `INVALID_OR_CONFLICTED_EVIDENCE`;
|
|
72
|
+
3. missing target, over-bound summary, or no bounded target-scoped official/publisher evidence → `NO_GROUNDED_ACTION`;
|
|
73
|
+
4. otherwise → `ELIGIBLE`.
|
|
74
|
+
|
|
75
|
+
An `ELIGIBLE` context is permission for MP-03 to inspect bounded evidence. It is not proof that the evidence contains an entailed migration instruction. Evidence kinds are used only as a deterministic allowlist and priority; `migrationGuide` is preferred, but its label is not semantic proof.
|
|
76
|
+
|
|
77
|
+
Location eligibility is:
|
|
78
|
+
|
|
79
|
+
- `POSITIVE_USAGE_MATCH` when an exact validated Impact Evidence symbol/file exists;
|
|
80
|
+
- `NO_POSITIVE_USAGE_MATCH` for a narrowly supported single Node.js-project JS/TS run with no positive match;
|
|
81
|
+
- `UNSUPPORTED_USAGE_COVERAGE` when project-level coverage cannot be proven;
|
|
82
|
+
- `NOT_ANALYZED` when Version Analysis did not complete.
|
|
83
|
+
|
|
84
|
+
Unsupported coverage never blocks a dependency-level action context when action evidence is otherwise eligible. It leaves locations empty and records an explicit limitation. No negative state is converted into “unused” or “safe.”
|
|
85
|
+
|
|
86
|
+
## Context boundary and evidence bounds
|
|
87
|
+
|
|
88
|
+
Each eligible context contains only:
|
|
89
|
+
|
|
90
|
+
- dependency occurrence and declared/current/target version facts;
|
|
91
|
+
- Version Analysis result and breaking-finding identity;
|
|
92
|
+
- bounded finding summary and applies-to versions;
|
|
93
|
+
- selected Knowledge evidence records and an exact evidence allowlist;
|
|
94
|
+
- URLs copied only from validated Knowledge source metadata;
|
|
95
|
+
- optional positive `impactEvidenceId + symbol + file` locations;
|
|
96
|
+
- action and location eligibility;
|
|
97
|
+
- upstream and mandatory human-review reasons;
|
|
98
|
+
- deterministic limitations.
|
|
99
|
+
|
|
100
|
+
It excludes repository source, unrelated dependencies/evidence, provider configuration, arbitrary URLs, commands, code/patches, prerequisites, ordering, rollback, effort, numeric confidence, and safety claims.
|
|
101
|
+
|
|
102
|
+
Default bounds are six evidence records, 24,000 total evidence characters, and a 2,000-character finding summary. Evidence is selected by stable kind priority and ID, deduplicated by content digest, and never truncated. Evidence must be official/publisher-controlled, available, fresh, action-relevant by structured kind, and explicitly scoped to the target release. Bounds are configurable positive integers for deterministic tests and future policy revisions.
|
|
103
|
+
|
|
104
|
+
## Fallback records
|
|
105
|
+
|
|
106
|
+
`fallbackRecords` use the normalized dependency/finding shape accepted by the MP-01 builder:
|
|
107
|
+
|
|
108
|
+
- skipped/failed results preserve upstream reasons and contain no generated finding/action;
|
|
109
|
+
- no grounded action produces only a deterministic `MANUAL_REVIEW_REQUIRED` record;
|
|
110
|
+
- stale/conflicted evidence fails closed to deterministic manual review;
|
|
111
|
+
- unsupported usage is recorded as a location limitation and does not replace otherwise eligible dependency-level action context.
|
|
112
|
+
|
|
113
|
+
Fallbacks retain only useful official evidence refs, use existing stable `analysisResultId` and finding IDs, and are sorted deterministically.
|
|
114
|
+
|
|
115
|
+
## Fatal errors versus expected ineligibility
|
|
116
|
+
|
|
117
|
+
Missing/malformed/schema-invalid artifacts, lineage mismatch, unknown reference, ambiguous identity, and inconsistent impact location are fatal input errors. Expected absence of analysis, action evidence, or supported usage coverage produces a normalized fallback or limitation.
|
|
118
|
+
|
|
119
|
+
Returned loaded artifacts, contexts, fallbacks, lineage, and summary are deep-cloned and deeply frozen. The runtime holds no mutable reference to parsed upstream values.
|
|
120
|
+
|
|
121
|
+
## Deferred work
|
|
122
|
+
|
|
123
|
+
- MP-03 implements prompt construction, structured AI output, exact excerpt and conservative trust checks, and generated migration-instruction drafts.
|
|
124
|
+
- MP-04 implements task-specific evaluation, adversarial cases, and provider qualification; see [`mvp-05-migration-evaluation-and-qualification.md`](./mvp-05-migration-evaluation-and-qualification.md).
|
|
125
|
+
- MP-05 implements final checklist assembly/writer, experimental CLI orchestration, and presentation renderers; see [`mvp-05-migration-checklist-orchestration.md`](./mvp-05-migration-checklist-orchestration.md).
|
|
126
|
+
|
|
127
|
+
The current Usage Index exposes analyzer coverage globally rather than per project. MP-02 therefore treats multi-project, non-JS/TS, warning-bearing, or otherwise unprovable negative coverage conservatively. A future analyzer-coverage schema can improve location eligibility without changing action eligibility.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# MVP-05 Migration Checklist Contract
|
|
2
|
+
|
|
3
|
+
## Purpose and boundary
|
|
4
|
+
|
|
5
|
+
`.upgradelens/migration-checklist.json` is a versioned, provider-neutral, human-review artifact. It records evidence-grounded review actions and deterministic fallback records. It is not an autonomous migration plan, safety certificate, patch, command runner, or migration execution log.
|
|
6
|
+
|
|
7
|
+
The current schema is [`migration-checklist.schema.json`](../schemas/migration-checklist.schema.json), version `2.0.0`. Version 2 adds the MP-R04 deterministic Migration Handoff projection while preserving the extractive action boundary. Version 1 artifacts are legacy, non-actionable, and must be regenerated. MP-01 provides a pure builder, schema validator, invariant validator, stable item IDs, deterministic serialization, and grounding/eligibility policy. MP-02 exact-byte loading and upstream joins are documented in [`mvp-05-deterministic-context-runtime.md`](./mvp-05-deterministic-context-runtime.md).
|
|
8
|
+
|
|
9
|
+
`COMPLETE` never means “migration complete” or “safe to upgrade.” It only means all dependency checklist records in the normalized valid input contain structurally grounded actionable records.
|
|
10
|
+
|
|
11
|
+
## Artifact identity and lineage
|
|
12
|
+
|
|
13
|
+
The artifact contains `schemaVersion`, `generatedAt`, `generator`, repository identity, overall `status`, summary, dependency records, and limitations. `generatedAt` is mandatory input to `buildMigrationChecklist`; the builder does not read the clock.
|
|
14
|
+
|
|
15
|
+
`input` records the schema version, portable artifact path, and exact-byte digest for all eight required artifacts:
|
|
16
|
+
|
|
17
|
+
- Project Manifest, including repository identity;
|
|
18
|
+
- Knowledge Manifest, including `researchId`;
|
|
19
|
+
- Knowledge Evidence Bundle;
|
|
20
|
+
- Version Analysis;
|
|
21
|
+
- Usage Index;
|
|
22
|
+
- Repository Impact;
|
|
23
|
+
- Repository Impact Evidence.
|
|
24
|
+
- Upgrade Decision.
|
|
25
|
+
|
|
26
|
+
Every dependency occurrence also contains a deterministic handoff projection:
|
|
27
|
+
|
|
28
|
+
- authoritative decision ID, decision status, target origin, reason codes, and
|
|
29
|
+
recommendation driver;
|
|
30
|
+
- one of `NO_VERSION_CHANGE_REQUIRED`, `ACTIONABLE_WITH_REVIEW`,
|
|
31
|
+
`INVESTIGATION_REQUIRED`, `INSUFFICIENT_EVIDENCE`, `NOT_ANALYZED`,
|
|
32
|
+
`ACTION_GENERATION_FAILED`, or `NO_GROUNDED_ACTION`;
|
|
33
|
+
- verified affected areas and coverage state;
|
|
34
|
+
- bounded official-evidence metadata (stable evidence/source identity, kind,
|
|
35
|
+
authority, trust, content digest, locator, and release scope; never raw
|
|
36
|
+
evidence text or provider-owned provenance);
|
|
37
|
+
- project-derived verification commands or
|
|
38
|
+
`VERIFICATION_COMMAND_UNAVAILABLE`;
|
|
39
|
+
- structured preconditions, explicit recovery unavailability, human-review
|
|
40
|
+
state, investigation questions, evidence gaps, and next step.
|
|
41
|
+
|
|
42
|
+
Only `PLAN_UPGRADE` and `UPGRADE_NOW` may contain AI-selected migration
|
|
43
|
+
instructions. Registry-discovered targets, keep decisions, evidence gaps, and
|
|
44
|
+
not-analyzed occurrences never enter action generation.
|
|
45
|
+
|
|
46
|
+
MP-01 validates the lineage object shape and repository identity consistency. MP-02 calculates these digests from exact input bytes and verifies cross-artifact lineage before calling the builder. MP-03 generation and trust validation are documented in [`mvp-05-provider-neutral-generator.md`](./mvp-05-provider-neutral-generator.md). MP-04 task-specific gates are documented in [`mvp-05-migration-evaluation-and-qualification.md`](./mvp-05-migration-evaluation-and-qualification.md).
|
|
47
|
+
|
|
48
|
+
## Status taxonomy
|
|
49
|
+
|
|
50
|
+
| Status | Meaning |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `COMPLETE` | Every normalized dependency record is `COMPLETE` and contains grounded actionable items. This is checklist completeness only. |
|
|
53
|
+
| `INCOMPLETE` | At least one record needs manual review, has unsupported usage coverage, conflicted/invalid evidence, or is mixed with a non-complete record. |
|
|
54
|
+
| `NO_GROUNDED_ACTION` | Analyzed input contains no structurally grounded action. It does not imply no migration work is required. |
|
|
55
|
+
| `NOT_ANALYZED` | All represented dependency results were skipped or failed. No migration action is present. |
|
|
56
|
+
|
|
57
|
+
Dependency and overall statuses are derived by the builder, not supplied as trusted input. A mixed artifact is fail-closed as `INCOMPLETE`.
|
|
58
|
+
|
|
59
|
+
## Eligibility taxonomy
|
|
60
|
+
|
|
61
|
+
Eligibility is not boolean. Each normalized context has a constrained `status` and `reasonCode`:
|
|
62
|
+
|
|
63
|
+
| Reason code | Eligibility status | Checklist status | Policy |
|
|
64
|
+
| --- | --- | --- | --- |
|
|
65
|
+
| `ELIGIBLE` | `ELIGIBLE` | `COMPLETE` | May contain deterministic items or AI-selected, deterministic-rendered migration guidance. |
|
|
66
|
+
| `NOT_ANALYZED` | `INELIGIBLE` | `NOT_ANALYZED` | Skipped/failed Version Analysis; no generated finding/action. |
|
|
67
|
+
| `NO_GROUNDED_ACTION` | `INELIGIBLE` | `NO_GROUNDED_ACTION` | Only deterministic `MANUAL_REVIEW_REQUIRED` fallback is permitted for a represented finding. |
|
|
68
|
+
| `UNSUPPORTED_USAGE_COVERAGE` | `INELIGIBLE` | `INCOMPLETE` | Absence from the Usage Index is not interpreted as dependency non-use or safety. |
|
|
69
|
+
| `INVALID_OR_CONFLICTED_EVIDENCE` | `INELIGIBLE` | `INCOMPLETE` | No AI-authored action; deterministic manual review only. |
|
|
70
|
+
| `MANUAL_REVIEW_REQUIRED` | `REVIEW_REQUIRED` | `INCOMPLETE` | No AI-authored action; deterministic manual review only. |
|
|
71
|
+
|
|
72
|
+
An analyzed dependency with multiple finding states is aggregated conservatively. Any mixed complete/no-action state is `INCOMPLETE`; invalid/conflicted evidence takes precedence, followed by unsupported usage coverage, then manual review.
|
|
73
|
+
|
|
74
|
+
## Checklist item taxonomy and basis
|
|
75
|
+
|
|
76
|
+
Item `kind` is limited to:
|
|
77
|
+
|
|
78
|
+
- `REVIEW_MIGRATION_INSTRUCTION` — review an instruction grounded in selected evidence;
|
|
79
|
+
- `REVIEW_CANDIDATE_USAGE` — review a deterministic positive symbol/file candidate;
|
|
80
|
+
- `VERIFY_OFFICIAL_REQUIREMENT` — verify an evidence-linked official requirement;
|
|
81
|
+
- `MANUAL_REVIEW_REQUIRED` — non-actionable deterministic fallback.
|
|
82
|
+
|
|
83
|
+
Item `basis` is either:
|
|
84
|
+
|
|
85
|
+
- `DETERMINISTIC`; or
|
|
86
|
+
- `AI_AUTHORED`.
|
|
87
|
+
|
|
88
|
+
All items have `requiresHumanReview: true`. The artifact has no approved/completed state. The legacy `AI_AUTHORED` wire value means AI-selected, deterministic-rendered guidance in extractive v2. Such an item is valid only when it:
|
|
89
|
+
|
|
90
|
+
- belongs to an `ELIGIBLE` finding;
|
|
91
|
+
- has kind `REVIEW_MIGRATION_INSTRUCTION`;
|
|
92
|
+
- references the enclosing `findingId`;
|
|
93
|
+
- carries at least one evidence ref declared by that finding and its dependency selected-evidence allowlist;
|
|
94
|
+
- has no repository location;
|
|
95
|
+
- requires human review.
|
|
96
|
+
|
|
97
|
+
All actionable item kinds require evidence. Ineligible contexts may contain deterministic manual-review fallbacks only.
|
|
98
|
+
|
|
99
|
+
## Grounding and cross-reference rules
|
|
100
|
+
|
|
101
|
+
Each dependency record preserves the upstream Version Analysis `analysisResultId`, dependency occurrence identity, analysis status, selected evidence allowlist, and version facts. Each finding preserves its upstream ID, summary, evidence refs, and declared positive impact locations.
|
|
102
|
+
|
|
103
|
+
MP-01 enforces:
|
|
104
|
+
|
|
105
|
+
- unique Version Analysis result IDs, finding IDs per result, and checklist item IDs across the artifact;
|
|
106
|
+
- stable item IDs derived from result, finding, item basis/kind/text, sorted evidence refs, sorted locations, and review state;
|
|
107
|
+
- stable ordering of dependencies, findings, evidence refs, items, locations, and limitations;
|
|
108
|
+
- finding evidence refs are in the dependency selected-evidence allowlist;
|
|
109
|
+
- item evidence refs are in both the finding and selected-evidence allowlists;
|
|
110
|
+
- item `findingId` equals the enclosing finding;
|
|
111
|
+
- each candidate location exactly matches a declared positive triple of `impactEvidenceId`, `symbol`, and `file`;
|
|
112
|
+
- repository locations are allowed only on deterministic `REVIEW_CANDIDATE_USAGE` items;
|
|
113
|
+
- AI-authored and manual fallback invariants;
|
|
114
|
+
- status, eligibility, version semantics, repository identity, and summary counts;
|
|
115
|
+
- schema rejection of additional properties.
|
|
116
|
+
|
|
117
|
+
Citation existence is structural grounding, not semantic entailment. MP-01 cannot prove that an instruction is actually supported by the cited text.
|
|
118
|
+
|
|
119
|
+
## Candidate location semantics
|
|
120
|
+
|
|
121
|
+
A location contains only:
|
|
122
|
+
|
|
123
|
+
- `impactEvidenceId`;
|
|
124
|
+
- `symbol`;
|
|
125
|
+
- `file`.
|
|
126
|
+
|
|
127
|
+
It is a candidate review location copied from positive Repository Impact Evidence. It is not a proven call site or semantic impact. The contract intentionally has no line, column, snippet, call count, or semantic-impact field. AI-authored items cannot own locations.
|
|
128
|
+
|
|
129
|
+
## Version uncertainty
|
|
130
|
+
|
|
131
|
+
The contract preserves Version Analysis version facts without recommendation semantics:
|
|
132
|
+
|
|
133
|
+
- `currentVersion` and `currentVersionSource` may be null;
|
|
134
|
+
- `exactBaseline` requires both values;
|
|
135
|
+
- `declaredConstraint` and `unsupportedBaseline` require both values to remain null;
|
|
136
|
+
- unknown baselines keep an unknown delta;
|
|
137
|
+
- `targetPolicy: registryLatest` identifies a registry fact, not a recommended target;
|
|
138
|
+
- no field can mark a target as recommended.
|
|
139
|
+
|
|
140
|
+
The contract does not infer a migration path from a version range or unknown installed version.
|
|
141
|
+
|
|
142
|
+
## Explicit exclusions
|
|
143
|
+
|
|
144
|
+
The schema has no fields for dependency ordering, inferred prerequisites, generated code, patches, auto-fix, shell/package-manager commands, rollback, effort, numeric confidence, migration execution status, safety certification, or transitive dependency completeness. Additional properties are rejected.
|
|
145
|
+
|
|
146
|
+
`instruction` is bounded text. MP-01 applies a small deterministic guard against obvious URLs, code/patch blocks, shell/package-manager commands, and safety claims. This is intentionally not NLP moderation and is not semantic proof. Later trust validation must still reject prohibited capabilities expressed indirectly.
|
|
147
|
+
|
|
148
|
+
## Deferred checks
|
|
149
|
+
|
|
150
|
+
### MP-02 — deterministic loader and context
|
|
151
|
+
|
|
152
|
+
Implemented as a separate read-only runtime. It validates the seven legacy exact-byte artifacts plus persisted authoritative Upgrade Decision, the full lineage/reference graph, bounded official evidence, independent action/location eligibility, immutable MP-03 contexts, and MP-01-compatible deterministic fallbacks.
|
|
153
|
+
|
|
154
|
+
### MP-03 — generator and trust validation
|
|
155
|
+
|
|
156
|
+
Implemented as a provider-neutral, package-local runtime. New application runs use the versioned extractive v2 schema: the model selects an exact allowlisted evidence span and deterministic code renders the human-review text. Conservative prohibited-capability guards, whole-candidate fail-closed rejection, and safe abstention/failure fallbacks remain. Exact excerpts establish provenance, not repository applicability. Historical free-form v1 remains for evaluation reproducibility. See [`GR-04-Versioned-Production-Extractive-Contract.md`](./GR-04-Versioned-Production-Extractive-Contract.md).
|
|
157
|
+
|
|
158
|
+
### MP-04 — evaluation and qualification
|
|
159
|
+
|
|
160
|
+
Implemented as a separate offline-first evaluation runtime. It measures raw candidate, trust containment, and published behavior with a strict multi-ecosystem dataset, versioned metrics and critical gates, transparent scorecard, and provider/model/task-specific qualification. The fake result is `QUALIFIED_WITH_LIMITATIONS`; no real provider has been qualified.
|
|
161
|
+
|
|
162
|
+
### MP-05 — presentation and orchestration
|
|
163
|
+
|
|
164
|
+
Implemented as an experimental opt-in application stage. It assembles MP-02/MP-03 output strictly through this MP-01 builder, enforces the MP-04 qualification identity, atomically writes the artifact, and renders a shared presentation-only view model. See [`mvp-05-migration-checklist-orchestration.md`](./mvp-05-migration-checklist-orchestration.md). Real-provider generation is not enabled by default.
|
|
165
|
+
|
|
166
|
+
No MP-01 module calls AI, network, filesystem loaders, source scanners, writers, CLI commands, or orchestration stages.
|