@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,390 @@
|
|
|
1
|
+
# AE-05 — AI Engineering Production Readiness Review
|
|
2
|
+
|
|
3
|
+
## Executive Summary
|
|
4
|
+
|
|
5
|
+
UpgradeLens has a strong AI Engineering foundation for an open-source project: the core pipeline is contract-driven, deterministic where it should be deterministic, and bounded by explicit trust and evaluation layers. MVP-03 produces a schema-validated `version-analysis.json`; AE-01 through AE-04 add a golden dataset, evaluation runner, metrics, scorecard, and benchmark framework without coupling the core to a specific provider or model.
|
|
6
|
+
|
|
7
|
+
Production readiness is **PARTIAL**.
|
|
8
|
+
|
|
9
|
+
The project is ready to begin **MVP-04 — AI Impact Analysis** against the existing Version Analysis artifact contract and schema-valid fixtures. It is not ready to claim real end-to-end production readiness because the real `discover → research → analyze-version` path is blocked by the missing Knowledge Evidence Bundle producer. The consumer side exists, but the producer artifact is not yet created by MVP-02 tooling.
|
|
10
|
+
|
|
11
|
+
Recommended decision:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
MVP-04 implementation: GO
|
|
15
|
+
Production-like real repository validation: NO GO until Evidence Bundle producer exists
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Architecture Review
|
|
19
|
+
|
|
20
|
+
### Dependency direction
|
|
21
|
+
|
|
22
|
+
The dependency direction is mostly clean and one-way:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
Discovery
|
|
26
|
+
↓
|
|
27
|
+
Knowledge Research
|
|
28
|
+
↓
|
|
29
|
+
Dependency AI Context
|
|
30
|
+
↓
|
|
31
|
+
AI Version Analysis
|
|
32
|
+
↓
|
|
33
|
+
Version Analysis Manifest
|
|
34
|
+
↓
|
|
35
|
+
Evaluation
|
|
36
|
+
↓
|
|
37
|
+
Metrics
|
|
38
|
+
↓
|
|
39
|
+
Scorecard
|
|
40
|
+
↓
|
|
41
|
+
Benchmark
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The newer AI Engineering layers reuse lower layers instead of duplicating them:
|
|
45
|
+
|
|
46
|
+
- `evaluation-runner` consumes golden cases and calls the same AI analysis path.
|
|
47
|
+
- `metrics-engine` consumes only `evaluation-report.json`.
|
|
48
|
+
- `ai-scorecard` consumes only metrics.
|
|
49
|
+
- `benchmark-runner` orchestrates Evaluation Runner, Metrics Engine, and Scorecard.
|
|
50
|
+
|
|
51
|
+
This direction is healthy. Benchmark does not call the AI core directly; metrics do not call evaluation; scorecard does not know about models.
|
|
52
|
+
|
|
53
|
+
### Architecture boundaries
|
|
54
|
+
|
|
55
|
+
| Boundary | Assessment |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| Project Discovery | Clear. Owns repository/project/dependency facts only. |
|
|
58
|
+
| Knowledge Research | Clear for package facts/provenance/cache. Incomplete for portable evidence content. |
|
|
59
|
+
| Knowledge Evidence Bundle | Correctly modeled as MVP-02.x output, but producer is missing. This is the main readiness blocker. |
|
|
60
|
+
| Dependency AI Context | Strong deterministic layer: one dependency occurrence, stable ordering, digest, ecosystem adapter boundary. |
|
|
61
|
+
| AI Runtime | Provider-neutral abstraction exists. Real runtime hardening is still limited. |
|
|
62
|
+
| Prompt Builder | Generic and scoped; currently source-code prompt template rather than external prompt asset. |
|
|
63
|
+
| Structured Output | Schema validation exists and rejects invalid free-form output. |
|
|
64
|
+
| Trust Layer | Strong for invented refs/URLs, deterministic facts, missing evidence, declared constraints, and source conflicts. Semantic entailment is not checked. |
|
|
65
|
+
| Manifest | Good machine contract for MVP-04; schema and invariants protect deterministic fields and evidence refs. |
|
|
66
|
+
| Evaluation | Golden dataset and runner are provider-neutral and CI-safe. |
|
|
67
|
+
| Metrics | Deterministic metrics cover key quality gates without model judgment. |
|
|
68
|
+
| Benchmark | Reuses evaluation/metrics/scorecard; ranking is deterministic and provider-neutral. |
|
|
69
|
+
|
|
70
|
+
### Modularity and extensibility
|
|
71
|
+
|
|
72
|
+
The design is extensible without requiring an AI core rewrite for future ecosystems or providers:
|
|
73
|
+
|
|
74
|
+
- Version adapters isolate ecosystem-specific version rules.
|
|
75
|
+
- `AiRuntime` isolates provider behavior from analysis/trust logic.
|
|
76
|
+
- Evaluation data is provider-neutral.
|
|
77
|
+
- Benchmark config can compare prompt versions, providers, models, and local runtimes.
|
|
78
|
+
|
|
79
|
+
Known extensibility gaps:
|
|
80
|
+
|
|
81
|
+
- Java, .NET, Go, Rust, Ruby, and other ecosystems can be represented in datasets/benchmark metadata, but production discovery/research inventory is still strongest for Node and Python.
|
|
82
|
+
- Runtime config documentation is thin.
|
|
83
|
+
- Provider timeout/retry/error taxonomy is not mature yet.
|
|
84
|
+
|
|
85
|
+
## End-to-End Validation
|
|
86
|
+
|
|
87
|
+
Validation used a temporary copy of the real UpgradeLens repository:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
<TEMPORARY_UPGRADELENS_CHECKOUT>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Commands run
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
node bin/upgradelens.js discover <TEMPORARY_UPGRADELENS_CHECKOUT>
|
|
97
|
+
node bin/upgradelens.js research <TEMPORARY_UPGRADELENS_CHECKOUT> --offline
|
|
98
|
+
node bin/upgradelens.js analyze-version <TEMPORARY_UPGRADELENS_CHECKOUT> --stdout
|
|
99
|
+
node bin/upgradelens.js eval --dataset eval/datasets --output evaluation-report.json
|
|
100
|
+
node bin/upgradelens.js scorecard --report evaluation-report.json --metrics-output metrics.json --output ai-scorecard.json
|
|
101
|
+
node bin/upgradelens.js benchmark --config benchmark.json --output benchmark-report.json
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Results
|
|
105
|
+
|
|
106
|
+
| Step | Result | Evidence |
|
|
107
|
+
| --- | --- | --- |
|
|
108
|
+
| `discover` | PASS | Found 1 Node project. |
|
|
109
|
+
| `research --offline` | PASS with unavailable packages | Planned 3 packages and wrote Knowledge Manifest. |
|
|
110
|
+
| `analyze-version` | FAIL before AI | Missing `.upgradelens/knowledge-evidence-bundle.json`. |
|
|
111
|
+
| `eval` | PASS | 10 passed / 0 failed. |
|
|
112
|
+
| `scorecard` | PASS | Overall score 100/100. |
|
|
113
|
+
| `benchmark` | PASS | 2 golden-fake runs, deterministic ranking. |
|
|
114
|
+
|
|
115
|
+
Project dependencies discovered in the real repo copy:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
[
|
|
119
|
+
{ "name": "ajv", "version": "^8.18.0", "type": "dependency" },
|
|
120
|
+
{ "name": "ajv-formats", "version": "^3.0.1", "type": "dependency" },
|
|
121
|
+
{ "name": "undici", "version": "^6.27.0", "type": "dependency" }
|
|
122
|
+
]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Knowledge Research offline result:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"packageCount": 3,
|
|
130
|
+
"resolvedPackageCount": 0,
|
|
131
|
+
"unavailablePackageCount": 3,
|
|
132
|
+
"warningCount": 3,
|
|
133
|
+
"cacheMissCount": 3
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The analysis blocker was:
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
ENOENT: no such file or directory, open '<TEMPORARY_UPGRADELENS_CHECKOUT>/.upgradelens/knowledge-evidence-bundle.json'
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This is not an AI Runtime, prompt, or benchmark failure. It is a missing upstream artifact producer.
|
|
144
|
+
|
|
145
|
+
## Real Repository Validation
|
|
146
|
+
|
|
147
|
+
VinGrade was not found under the local Desktop workspace during this review, so the real repository validation used UpgradeLens itself.
|
|
148
|
+
|
|
149
|
+
### Real repository assessment
|
|
150
|
+
|
|
151
|
+
| Area | Assessment |
|
|
152
|
+
| --- | --- |
|
|
153
|
+
| Repository discovery | Useful and correct for the real repo. Detected Node and the three runtime dependencies. |
|
|
154
|
+
| Knowledge research | Operational in offline mode; correctly represented unavailable packages without fabricating facts. |
|
|
155
|
+
| Evidence | Not available because Knowledge Evidence Bundle producer is missing. |
|
|
156
|
+
| AI output | Not assessable on real repo; AI analysis did not start. |
|
|
157
|
+
| Risk | Not assessable on real repo. |
|
|
158
|
+
| Trust layer | Not exercised on real repo due missing Evidence Bundle. Unit/golden tests cover trust behavior. |
|
|
159
|
+
| Human review | Not assessable on real repo. Golden tests cover declared constraint, missing evidence, conflict, high risk, and unknown risk. |
|
|
160
|
+
| Usefulness | Current real repo pipeline is useful for discovering the handoff blocker; not yet useful as a real user-facing version analysis workflow. |
|
|
161
|
+
|
|
162
|
+
The validation result is important: UpgradeLens can run the early deterministic stages on a real repository, but cannot yet produce a real `version-analysis.json` from real research output without the MVP-02.x Evidence Bundle.
|
|
163
|
+
|
|
164
|
+
## AI Engineering Scorecard
|
|
165
|
+
|
|
166
|
+
| Category | Score (/10) | Nhận xét |
|
|
167
|
+
| --- | ---: | --- |
|
|
168
|
+
| Context Engineering | 8 | Deterministic, per-dependency, bounded, digestable, and source-conflict aware. Missing token-aware budgeting and real evidence producer coverage. |
|
|
169
|
+
| Prompt Engineering | 7 | Prompt is clear, generic, and restrictive. Prompt is still embedded in source and lacks injection regression fixtures. |
|
|
170
|
+
| Grounding | 7 | Evidence refs are allowlisted, invented refs/URLs are handled, and conflicts downgrade risk. Semantic entailment is not validated. |
|
|
171
|
+
| Structured Output | 9 | Strict schema validation, no regex parsing, invalid output does not publish claims. |
|
|
172
|
+
| Trust Layer | 8 | Deterministic review policy covers unknown/high risk, missing evidence, declared constraints, dropped claims, invented URLs, and source conflicts. Missing deeper applicability/entailment rules. |
|
|
173
|
+
| Evaluation | 9 | Golden dataset and runner are provider-neutral, deterministic, and CI-safe. Dataset is still small. |
|
|
174
|
+
| Metrics | 8 | Deterministic metrics and scorecard are useful. No semantic, latency/cost real-provider metrics yet. |
|
|
175
|
+
| Benchmark | 8 | Config/report/ranking are clean and reuse existing layers. Real model benchmarking is not yet exercised. |
|
|
176
|
+
| Extensibility | 8 | Provider/model/prompt boundaries are good. More ecosystem adapters and public runtime docs are needed. |
|
|
177
|
+
| Developer Experience | 7 | CLI covers core flows and tests are strong. Missing docs for runtime config, benchmark config, and Evidence Bundle generation. |
|
|
178
|
+
|
|
179
|
+
Overall AI Engineering Score:
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
7.9 / 10
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
This score reflects strong architecture and testability, with production readiness limited mainly by the missing Evidence Bundle producer and real-provider operational hardening.
|
|
186
|
+
|
|
187
|
+
## Production Readiness Checklist
|
|
188
|
+
|
|
189
|
+
| Area | Status | Explanation |
|
|
190
|
+
| --- | --- | --- |
|
|
191
|
+
| Discovery | READY | Real repo validation succeeded; schema and invariants are mature. |
|
|
192
|
+
| Knowledge | PARTIAL | Knowledge Manifest is mature, but portable Evidence Bundle production is missing. |
|
|
193
|
+
| AI Runtime | PARTIAL | Provider abstraction exists; timeout/retry/error taxonomy and real-provider docs are thin. |
|
|
194
|
+
| Prompt | PARTIAL | Prompt is generic and guarded; no external prompt asset or injection fixture yet. |
|
|
195
|
+
| Trust | READY | Core deterministic trust behavior is implemented and tested, including source conflict propagation. |
|
|
196
|
+
| Version Analysis | PARTIAL | Consumer pipeline and manifest work with evidence; real repo path blocked by missing Evidence Bundle. |
|
|
197
|
+
| Golden Dataset | READY | 10 cases cover high/medium/low/unknown/missing evidence/declared constraint/conflict. |
|
|
198
|
+
| Evaluation | READY | Evaluation runner works without real model calls and validates expected outcomes. |
|
|
199
|
+
| Metrics | READY | Deterministic metrics and scorecard exist and validate. |
|
|
200
|
+
| Benchmark | READY | Benchmark config/report/ranking exist and reuse evaluation/metrics/scorecard. |
|
|
201
|
+
| CLI | PARTIAL | Commands exist; `analyze-version` cannot complete on real repo without Evidence Bundle. Runtime/config docs need improvement. |
|
|
202
|
+
| Documentation | PARTIAL | Architecture docs exist; user-facing docs for Evidence Bundle, provider runtime, metrics, and benchmark configs are incomplete. |
|
|
203
|
+
| Test Coverage | READY | Current full suite passes with one sandbox-related skip. |
|
|
204
|
+
| Provider Abstraction | READY | Runtime/provider boundary is generic and not OpenAI-specific. |
|
|
205
|
+
|
|
206
|
+
Overall Production Readiness:
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
PARTIAL
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Technical Debt
|
|
213
|
+
|
|
214
|
+
### Critical
|
|
215
|
+
|
|
216
|
+
1. **Knowledge Evidence Bundle producer is missing.**
|
|
217
|
+
- Real `analyze-version` fails before AI analysis because `.upgradelens/knowledge-evidence-bundle.json` is absent.
|
|
218
|
+
- This blocks production-like end-to-end validation and real user workflows.
|
|
219
|
+
|
|
220
|
+
### High
|
|
221
|
+
|
|
222
|
+
1. **No semantic entailment validation.**
|
|
223
|
+
- A model can cite a valid evidence ID while making a claim stronger than the evidence supports.
|
|
224
|
+
|
|
225
|
+
2. **Real-provider runtime hardening is incomplete.**
|
|
226
|
+
- Timeout, cancellation, retry, provider-specific error taxonomy, and rate-limit handling are not mature.
|
|
227
|
+
|
|
228
|
+
3. **Prompt injection regression tests are missing.**
|
|
229
|
+
- Prompt guardrails exist, but there is no adversarial evidence fixture.
|
|
230
|
+
|
|
231
|
+
4. **Provider/runtime configuration documentation is insufficient.**
|
|
232
|
+
- Generic HTTP runtime exists, but contributor/operator guidance is thin.
|
|
233
|
+
|
|
234
|
+
### Medium
|
|
235
|
+
|
|
236
|
+
1. **Golden dataset is small.**
|
|
237
|
+
- It is good for foundation regression but too small for serious model selection.
|
|
238
|
+
|
|
239
|
+
2. **Context budget is character-based.**
|
|
240
|
+
- Token-aware budgeting should be added before large real evidence bundles.
|
|
241
|
+
|
|
242
|
+
3. **Applicability validation is shallow.**
|
|
243
|
+
- Findings are structurally valid but not deeply checked against target/relevant releases.
|
|
244
|
+
|
|
245
|
+
4. **Real benchmark metadata is sparse.**
|
|
246
|
+
- Latency, token usage, and cost remain null unless runtime provides them.
|
|
247
|
+
|
|
248
|
+
5. **Prompt versioning is functional but not asset-based.**
|
|
249
|
+
- Prompt versions are supported in benchmark/evaluation, but prompt text remains source-embedded.
|
|
250
|
+
|
|
251
|
+
### Low
|
|
252
|
+
|
|
253
|
+
1. **No self-reported digest in several generated artifacts.**
|
|
254
|
+
- Digests can be computed externally, but embedded digest fields would improve auditability.
|
|
255
|
+
|
|
256
|
+
2. **CLI option surface is minimal.**
|
|
257
|
+
- This is acceptable for foundation scope, but later users will need clearer target/runtime/config options.
|
|
258
|
+
|
|
259
|
+
3. **Documentation does not yet present an end-to-end contributor workflow.**
|
|
260
|
+
- Add examples for eval, scorecard, benchmark, and future Evidence Bundle generation.
|
|
261
|
+
|
|
262
|
+
## Gap Analysis
|
|
263
|
+
|
|
264
|
+
UpgradeLens already has the core shape of an AI Engineering project:
|
|
265
|
+
|
|
266
|
+
- deterministic context construction;
|
|
267
|
+
- provider-neutral runtime boundary;
|
|
268
|
+
- prompt constraints;
|
|
269
|
+
- structured output validation;
|
|
270
|
+
- trust validation;
|
|
271
|
+
- artifact schemas;
|
|
272
|
+
- golden evaluation;
|
|
273
|
+
- deterministic metrics;
|
|
274
|
+
- scorecard;
|
|
275
|
+
- benchmark orchestration.
|
|
276
|
+
|
|
277
|
+
To be considered mature, it still needs:
|
|
278
|
+
|
|
279
|
+
1. **Portable Evidence Bundle production.**
|
|
280
|
+
- Without this, real version analysis cannot run from normal research output.
|
|
281
|
+
|
|
282
|
+
2. **Semantic evaluation or entailment checks.**
|
|
283
|
+
- Deterministic evidence ID validation is necessary but not sufficient for claim truth.
|
|
284
|
+
|
|
285
|
+
3. **Real-provider replay and traceability.**
|
|
286
|
+
- Need reproducible run IDs, provider metadata, non-secret request/response traces, and replay strategy.
|
|
287
|
+
|
|
288
|
+
4. **Operational observability.**
|
|
289
|
+
- Latency, token usage, cost, timeout, retry, and provider error metrics should be collected outside portable artifacts.
|
|
290
|
+
|
|
291
|
+
5. **Prompt lifecycle.**
|
|
292
|
+
- External prompt assets, changelog, version comparison, and injection tests.
|
|
293
|
+
|
|
294
|
+
6. **Larger and more diverse golden dataset.**
|
|
295
|
+
- More ecosystems, more dependency families, more conflict/missing/stale evidence cases, and real-world annotations.
|
|
296
|
+
|
|
297
|
+
7. **Real repository validation corpus.**
|
|
298
|
+
- At least a few open-source repos with known upgrades and expected impact outcomes.
|
|
299
|
+
|
|
300
|
+
## MVP-04 Readiness
|
|
301
|
+
|
|
302
|
+
Decision:
|
|
303
|
+
|
|
304
|
+
```text
|
|
305
|
+
GO for MVP-04 implementation
|
|
306
|
+
NO GO for production-like real repository validation
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
MVP-04 can start because:
|
|
310
|
+
|
|
311
|
+
- `version-analysis.json` has a stable schema and deterministic validation.
|
|
312
|
+
- MVP-04 can consume dependency identity, versions, selected evidence refs, findings, risk, limitations, validation state, and human-review flags.
|
|
313
|
+
- Evaluation, metrics, and benchmark layers can test future MVP-04-facing changes without live model calls.
|
|
314
|
+
- The current architecture keeps release-level analysis separate from project-specific impact, which is exactly the boundary MVP-04 needs.
|
|
315
|
+
|
|
316
|
+
MVP-04 must not assume real end-to-end production readiness yet because:
|
|
317
|
+
|
|
318
|
+
- the real pipeline cannot produce `version-analysis.json` without a Knowledge Evidence Bundle;
|
|
319
|
+
- real AI output quality has not been validated on a real repository;
|
|
320
|
+
- semantic grounding is not mature enough for automated migration or impact decisions without human review.
|
|
321
|
+
|
|
322
|
+
Recommended MVP-04 approach:
|
|
323
|
+
|
|
324
|
+
1. Start MVP-04 using schema-valid `version-analysis.json` fixtures.
|
|
325
|
+
2. Treat `unknown`, `declaredConstraint`, `SOURCE_CONFLICT`, missing evidence, and high-risk results as first-class MVP-04 input cases.
|
|
326
|
+
3. Keep source-code impact analysis separate from release-level risk.
|
|
327
|
+
4. Do not claim full real-repo workflow readiness until Evidence Bundle production is implemented.
|
|
328
|
+
|
|
329
|
+
## Recommended Backlog
|
|
330
|
+
|
|
331
|
+
### Before claiming end-to-end readiness
|
|
332
|
+
|
|
333
|
+
1. Implement MVP-02.x Knowledge Evidence Bundle producer.
|
|
334
|
+
2. Add CLI/docs for producing and validating the Evidence Bundle.
|
|
335
|
+
3. Add a real repo validation fixture that reaches `version-analysis.json`.
|
|
336
|
+
4. Add runtime timeout/cancellation and provider error taxonomy.
|
|
337
|
+
|
|
338
|
+
### Before serious model/prompt selection
|
|
339
|
+
|
|
340
|
+
1. Expand golden dataset from 10 cases to a larger multi-ecosystem set.
|
|
341
|
+
2. Add adversarial prompt-injection evidence cases.
|
|
342
|
+
3. Add real provider benchmark runs with latency/token/cost metadata.
|
|
343
|
+
4. Add benchmark documentation and sample configs.
|
|
344
|
+
|
|
345
|
+
### Before automated or low-review impact workflows
|
|
346
|
+
|
|
347
|
+
1. Add semantic entailment or human-annotated claim-quality evaluation.
|
|
348
|
+
2. Add finding applicability validation against target/relevant releases.
|
|
349
|
+
3. Add replayable non-secret traces for real provider runs.
|
|
350
|
+
4. Add observability outside portable artifacts.
|
|
351
|
+
|
|
352
|
+
## Validation Evidence
|
|
353
|
+
|
|
354
|
+
Foundation validation from the current workspace:
|
|
355
|
+
|
|
356
|
+
```text
|
|
357
|
+
npm test: 192 pass, 1 skip, 0 fail
|
|
358
|
+
git diff --check: pass
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Golden AI Engineering artifacts from AE-05 validation:
|
|
362
|
+
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"evaluation": { "totalCases": 10, "passed": 10, "failed": 0 },
|
|
366
|
+
"metrics": {
|
|
367
|
+
"risk": 1,
|
|
368
|
+
"humanReview": 1,
|
|
369
|
+
"evidenceReferenceCoverage": 1,
|
|
370
|
+
"unsupportedClaimRate": 0,
|
|
371
|
+
"deterministic": 1
|
|
372
|
+
},
|
|
373
|
+
"scorecard": {
|
|
374
|
+
"overall": 100,
|
|
375
|
+
"categories": {
|
|
376
|
+
"riskAnalysis": 100,
|
|
377
|
+
"humanReview": 100,
|
|
378
|
+
"evidenceQuality": 100,
|
|
379
|
+
"trustLayer": 100,
|
|
380
|
+
"deterministicQuality": 100
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"benchmark": {
|
|
384
|
+
"runs": 2,
|
|
385
|
+
"topRun": "prompt-v1-golden"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
These results support a `GO` decision for MVP-04 implementation, while the real repository blocker supports a `PARTIAL` production readiness rating.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# VA-05 — AI Engineering Review & Validation
|
|
2
|
+
|
|
3
|
+
This document reviews MVP-03 — AI Version Analysis from an AI Engineering perspective. It is a review artifact only: no runtime behavior, prompt, schema, manifest, CLI, or tests were changed as part of VA-05.
|
|
4
|
+
|
|
5
|
+
## Executive Summary
|
|
6
|
+
|
|
7
|
+
MVP-03 has a strong deterministic foundation. The implementation separates deterministic context construction from model reasoning, constrains model output with JSON Schema, validates evidence references after the model call, derives human-review requirements deterministically, and publishes a portable `version-analysis.json` artifact for downstream stages.
|
|
8
|
+
|
|
9
|
+
The main architectural shape is sound enough for MVP-04 to begin against the manifest contract. The biggest readiness gap is operational rather than conceptual: the real CLI pipeline currently requires `.upgradelens/knowledge-evidence-bundle.json`, but the current Knowledge Research CLI does not produce that artifact yet. In validation, `discover` and `research` completed on a real repository copy, while `analyze-version` failed before AI analysis because the Evidence Bundle was missing.
|
|
10
|
+
|
|
11
|
+
The second major gap is grounding depth. MVP-03 prevents invented evidence IDs and invented URLs, but it does not semantically verify that a cited evidence snippet actually entails the AI claim. That is acceptable for MVP-03, but MVP-04 should treat MVP-03 risk and findings as evidence-grounded release-level inputs, not as project-impact truth.
|
|
12
|
+
|
|
13
|
+
Overall assessment: **MVP-03 is conditionally ready for MVP-04 implementation**, provided MVP-04 starts by consuming schema-valid `version-analysis.json` fixtures and the backlog item for producing Evidence Bundles is treated as a release blocker for real end-to-end usage.
|
|
14
|
+
|
|
15
|
+
## AI Engineering Scorecard
|
|
16
|
+
|
|
17
|
+
| Category | Score (/10) | Review |
|
|
18
|
+
| --- | ---: | --- |
|
|
19
|
+
| Context Engineering | 8 | Context is deterministic, bounded, per occurrence, and reproducible. It includes selected evidence content only. Missing: token estimates, conflict propagation, and richer package status limitations. |
|
|
20
|
+
| Prompt Engineering | 7 | Role and guardrails are clear and ecosystem-generic. Prompt is versioned in code. Injection handling is mostly instruction-based; evidence should be more explicitly framed as untrusted quoted data. |
|
|
21
|
+
| Structured Output | 9 | Candidate schema is strict, small, and has `additionalProperties: false`. Manifest schema is versioned and machine-readable. Some max-size constraints are still absent. |
|
|
22
|
+
| Grounding | 7 | Evidence IDs are allowlisted and invented refs are removed. Invented URLs are detected. Semantic entailment of claims vs evidence is not verified. Source conflict handling is incomplete. |
|
|
23
|
+
| Trust Layer | 8 | Human review is deterministic. Unknown/high risk, missing/partial evidence, declared constraints, and dropped claims are handled. More review rules are needed for conflict and stale applicability. |
|
|
24
|
+
| Runtime Architecture | 7 | Provider-neutral runtime exists and is not ecosystem-specific. Real provider path is generic HTTP. Missing timeout, retry, cancellation, and provider error taxonomy. |
|
|
25
|
+
| Extensibility | 8 | AI core is mostly ecosystem-neutral. New ecosystems need Project Discovery, Knowledge Research, and version adapter support, not prompt/core rewrites. |
|
|
26
|
+
| Developer Experience | 7 | CLI exists and tests use fake runtime cleanly. Real runtime configuration is minimal and under-documented. Missing Evidence Bundle producer makes E2E surprising. |
|
|
27
|
+
| Testability | 9 | Unit tests cover valid/invalid AI output, trust validation, manifest invariants, writer, stdout, and CLI happy/failure paths without live model calls. |
|
|
28
|
+
| Maintainability | 8 | Code is modular and follows repo conventions. Some logic is still embedded in JS objects instead of external prompt/schema assets, but this is acceptable for MVP. |
|
|
29
|
+
|
|
30
|
+
**Total score: 7.8 / 10**
|
|
31
|
+
|
|
32
|
+
## Strengths
|
|
33
|
+
|
|
34
|
+
### Context Engineering
|
|
35
|
+
|
|
36
|
+
- `DependencyAiContext` is one dependency occurrence and one target, which keeps prompts scoped and traceable.
|
|
37
|
+
- Context IDs are based on canonical JSON and stable digests.
|
|
38
|
+
- Context includes lineage for Project Manifest, Knowledge Manifest, research ID, and Evidence Bundle digest.
|
|
39
|
+
- Selected evidence is bounded by item count and character count.
|
|
40
|
+
- The builder does not read source code, lockfiles, cache internals, or network resources.
|
|
41
|
+
- `declaredConstraint` mode correctly keeps `currentVersion: null` and `delta: unknown`.
|
|
42
|
+
|
|
43
|
+
### Prompt Engineering
|
|
44
|
+
|
|
45
|
+
- Prompt has a clear role: release-level dependency version analysis.
|
|
46
|
+
- Guardrails explicitly prohibit source-code impact, migration planning, invented URLs, invented evidence, and current-version guessing.
|
|
47
|
+
- Prompt is generic across ecosystems because it speaks in terms of context fields, evidence, versions, and findings rather than npm/Python-specific language.
|
|
48
|
+
- Prompt version is present and propagated into the manifest.
|
|
49
|
+
|
|
50
|
+
### Runtime Architecture
|
|
51
|
+
|
|
52
|
+
- `AiRuntime` is provider-neutral.
|
|
53
|
+
- `createProviderAiRuntime` separates prompt construction from provider call shape.
|
|
54
|
+
- `createHttpJsonAiProvider` can wrap multiple provider APIs through custom request/response mappers.
|
|
55
|
+
- Unit tests use fake runtime, so CI does not call a model.
|
|
56
|
+
|
|
57
|
+
### Structured Output
|
|
58
|
+
|
|
59
|
+
- Candidate output is JSON Schema validated.
|
|
60
|
+
- The candidate schema is small and excludes deterministic facts, preventing the model from rewriting dependency/version identity.
|
|
61
|
+
- `additionalProperties: false` is used for both AI candidate and manifest schema.
|
|
62
|
+
- Invalid JSON/schema results produce failed internal results rather than partially trusted claims.
|
|
63
|
+
|
|
64
|
+
### Grounding and Trust
|
|
65
|
+
|
|
66
|
+
- Evidence references are allowlisted against selected context evidence.
|
|
67
|
+
- Invalid refs cause claim removal or risk downgrade.
|
|
68
|
+
- Invented URLs outside selected evidence are detected.
|
|
69
|
+
- Risk can be downgraded to `unknown`.
|
|
70
|
+
- Human review is deterministic, not model-controlled.
|
|
71
|
+
|
|
72
|
+
### Artifact
|
|
73
|
+
|
|
74
|
+
- `version-analysis.json` is versioned, portable, schema-validated, and sorted deterministically.
|
|
75
|
+
- Manifest preserves dependency/version facts, AI summary/risk/findings, evidence references, selected evidence metadata, validation, limitations, and review flags.
|
|
76
|
+
- Evidence content is not copied into the final manifest, which keeps the artifact smaller and safer for MVP-04 consumption.
|
|
77
|
+
|
|
78
|
+
## Weaknesses
|
|
79
|
+
|
|
80
|
+
### Context Engineering
|
|
81
|
+
|
|
82
|
+
- Context size is character-bounded, not token-bounded. This is good enough for MVP, but model providers behave by tokens.
|
|
83
|
+
- Evidence selection currently drops duplicate content by digest, which is efficient but may lose corroboration unless provenance is preserved elsewhere.
|
|
84
|
+
- Source conflicts are not actively surfaced by the selector even though the human review policy knows about `SOURCE_CONFLICT`.
|
|
85
|
+
- Package status and source availability limitations are not always carried into context metadata unless they become selected-evidence warnings.
|
|
86
|
+
- `registryLatest` is the only CLI target policy. This keeps CLI minimal but limits real review scenarios where teams need explicit target versions.
|
|
87
|
+
|
|
88
|
+
### Prompt Engineering
|
|
89
|
+
|
|
90
|
+
- Evidence content is inserted as JSON inside the context, but the prompt does not explicitly label evidence text as untrusted quoted data.
|
|
91
|
+
- Prompt instructions are clear, but there is no prompt injection regression fixture where evidence text says “ignore previous instructions.”
|
|
92
|
+
- Prompt templates live in code. That is acceptable for MVP, but prompt review/change management will get harder as prompts grow.
|
|
93
|
+
|
|
94
|
+
### Runtime
|
|
95
|
+
|
|
96
|
+
- No timeout or cancellation is enforced by the generic HTTP provider.
|
|
97
|
+
- No retry strategy exists. This is acceptable for deterministic unit tests but thin for real provider usage.
|
|
98
|
+
- Provider errors are caught later as output schema failures in some paths, which may blur provider failure vs bad model output.
|
|
99
|
+
- No local model adapter exists yet. The abstraction can support one, but there is no conformance test for a non-HTTP provider.
|
|
100
|
+
|
|
101
|
+
### Structured Output
|
|
102
|
+
|
|
103
|
+
- Candidate schema lacks max lengths for summary/finding text.
|
|
104
|
+
- Manifest schema is strict, but schema evolution policy is only implicit.
|
|
105
|
+
- The schema captures deterministic confidence components but not calibrated model confidence, by design. This is correct, but documentation should keep clarifying it.
|
|
106
|
+
|
|
107
|
+
### Grounding
|
|
108
|
+
|
|
109
|
+
- Trust validation checks references and invented URLs, but not semantic entailment.
|
|
110
|
+
- A model can cite a valid evidence ID while making a stronger claim than the evidence supports.
|
|
111
|
+
- Finding applicability versions are validated structurally, but not checked against context target/relevant releases.
|
|
112
|
+
- Risk `low` is allowed if evidence refs are valid and coverage is sufficient; there is no deeper required-category policy yet.
|
|
113
|
+
|
|
114
|
+
### Artifact
|
|
115
|
+
|
|
116
|
+
- The manifest is suitable for MVP-04, but MVP-04 may also want direct lookup from result to selected evidence content. Today it has evidence metadata and refs, but must go back to the Evidence Bundle for content.
|
|
117
|
+
- There is no top-level manifest digest field. Digest can be computed externally, but the artifact does not self-report it.
|
|
118
|
+
- Execution/provider metadata is intentionally absent. That is good for portability, but debugging live provider behavior will need a separate non-portable trace later.
|
|
119
|
+
|
|
120
|
+
## Technical Debt
|
|
121
|
+
|
|
122
|
+
### Critical
|
|
123
|
+
|
|
124
|
+
1. **Evidence Bundle producer is not implemented in the real research CLI.**
|
|
125
|
+
- Validation showed `analyze-version` fails because `.upgradelens/knowledge-evidence-bundle.json` is missing.
|
|
126
|
+
- This blocks real end-to-end user workflow even though the MVP-03 consumer path is implemented.
|
|
127
|
+
|
|
128
|
+
### High
|
|
129
|
+
|
|
130
|
+
1. **No semantic entailment validation.**
|
|
131
|
+
- Evidence refs can be valid while claims are too broad.
|
|
132
|
+
- This is the largest grounding risk before relying on AI output for impact analysis.
|
|
133
|
+
|
|
134
|
+
2. **No runtime timeout/cancellation/retry policy.**
|
|
135
|
+
- Real provider calls can hang, fail transiently, or return provider-specific errors.
|
|
136
|
+
- The current abstraction can support this, but no policy is implemented.
|
|
137
|
+
|
|
138
|
+
3. **Source conflict propagation is incomplete.**
|
|
139
|
+
- Human review policy supports `SOURCE_CONFLICT`, but context selection does not currently emit it from Knowledge Manifest source conflicts.
|
|
140
|
+
|
|
141
|
+
4. **Prompt injection tests are missing.**
|
|
142
|
+
- Guardrails exist, but there is no fixture where evidence content attempts to override instructions.
|
|
143
|
+
|
|
144
|
+
### Medium
|
|
145
|
+
|
|
146
|
+
1. **Context budget is character-based only.**
|
|
147
|
+
- Add token-aware estimation later when provider/runtime exposes tokenizer behavior or a conservative estimator.
|
|
148
|
+
|
|
149
|
+
2. **No max text lengths in AI candidate schema.**
|
|
150
|
+
- Model output can be structurally valid but excessively verbose.
|
|
151
|
+
|
|
152
|
+
3. **Target selection in CLI is minimal.**
|
|
153
|
+
- `registryLatest` is enough for MVP, but explicit target analysis is important for real migrations.
|
|
154
|
+
|
|
155
|
+
4. **Provider error taxonomy is under-specified.**
|
|
156
|
+
- Runtime/provider/network/model-output failures should be separated more clearly before production usage.
|
|
157
|
+
|
|
158
|
+
5. **Applicability validation is shallow.**
|
|
159
|
+
- `appliesToVersions` should be checked against target/relevant releases in a future trust hardening pass.
|
|
160
|
+
|
|
161
|
+
### Low
|
|
162
|
+
|
|
163
|
+
1. **Prompt template lives in source code.**
|
|
164
|
+
- Fine for MVP, but a separate prompt asset can improve review and versioning later.
|
|
165
|
+
|
|
166
|
+
2. **No self-reported manifest digest.**
|
|
167
|
+
- Digest helper exists, but the artifact does not include its own digest.
|
|
168
|
+
|
|
169
|
+
3. **No provider configuration documentation.**
|
|
170
|
+
- CLI supports generic env-driven HTTP provider, but usage is not yet documented.
|
|
171
|
+
|
|
172
|
+
## Validation Result
|
|
173
|
+
|
|
174
|
+
Validation used a temporary copy of the real UpgradeLens repository at:
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
<TEMPORARY_UPGRADELENS_CHECKOUT>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Commands run:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
node bin/upgradelens.js discover <TEMPORARY_UPGRADELENS_CHECKOUT>
|
|
184
|
+
node bin/upgradelens.js research <TEMPORARY_UPGRADELENS_CHECKOUT> --offline
|
|
185
|
+
node bin/upgradelens.js analyze-version <TEMPORARY_UPGRADELENS_CHECKOUT> --stdout
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Observed result:
|
|
189
|
+
|
|
190
|
+
- `discover` succeeded and found one Node project.
|
|
191
|
+
- Project dependencies detected: `ajv`, `ajv-formats`, `undici`.
|
|
192
|
+
- `research --offline` succeeded and produced a Knowledge Manifest.
|
|
193
|
+
- Knowledge Manifest had three packages, all `unavailable` because the temporary copy had no fresh cache and offline mode does not call registries.
|
|
194
|
+
- `analyze-version` failed before AI runtime invocation:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
ENOENT: no such file or directory, open '<TEMPORARY_UPGRADELENS_CHECKOUT>/.upgradelens/knowledge-evidence-bundle.json'
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Assessment:
|
|
201
|
+
|
|
202
|
+
- The current real pipeline is not yet operational end-to-end because the Evidence Bundle artifact is not produced by MVP-02 tooling.
|
|
203
|
+
- This result is consistent with the architecture decision that Knowledge Evidence Bundle belongs to MVP-02.x.
|
|
204
|
+
- No model correctness judgement could be made from this run because AI analysis did not start.
|
|
205
|
+
- The output was useful as an engineering validation because it identified the highest-priority handoff blocker before MVP-04.
|
|
206
|
+
|
|
207
|
+
## Recommended Improvements
|
|
208
|
+
|
|
209
|
+
### Before production-like MVP-04 validation
|
|
210
|
+
|
|
211
|
+
1. Implement or otherwise provide the MVP-02.x Knowledge Evidence Bundle producer.
|
|
212
|
+
2. Add one prompt-injection regression fixture where evidence content contains adversarial instructions.
|
|
213
|
+
3. Add source-conflict propagation into context metadata and human-review reasons.
|
|
214
|
+
4. Add runtime timeout and single bounded retry policy at the provider/runtime boundary.
|
|
215
|
+
5. Add documentation for `analyze-version` runtime configuration.
|
|
216
|
+
|
|
217
|
+
### During MVP-04 implementation
|
|
218
|
+
|
|
219
|
+
1. Treat MVP-03 risk/findings as release-level inputs, not project impact truth.
|
|
220
|
+
2. Require MVP-04 to dereference evidence through the artifact lineage and Evidence Bundle when it needs content.
|
|
221
|
+
3. Keep MVP-04 source-code impact analysis separate from MVP-03 release analysis.
|
|
222
|
+
4. Add fixtures where `version-analysis.json` has `unknown`, `high`, `declaredConstraint`, missing evidence, and dropped-claims cases.
|
|
223
|
+
|
|
224
|
+
### Later hardening
|
|
225
|
+
|
|
226
|
+
1. Add semantic entailment checks or human-annotated eval cases for unsupported claim rate.
|
|
227
|
+
2. Add token-aware context budget estimates.
|
|
228
|
+
3. Add explicit target request support to CLI/API.
|
|
229
|
+
4. Add provider error categories and non-portable debug traces.
|
|
230
|
+
|
|
231
|
+
## MVP-04 Readiness
|
|
232
|
+
|
|
233
|
+
MVP-03 is **ready to start MVP-04 implementation against the artifact contract**:
|
|
234
|
+
|
|
235
|
+
- `version-analysis.json` is stable, schema-validated, and deterministic.
|
|
236
|
+
- Results include dependency identity, version facts, release-level risk/findings, evidence refs, validation state, limitations, and human-review flags.
|
|
237
|
+
- The artifact is ecosystem-neutral enough for MVP-04 to consume without knowing npm or Python-specific internals.
|
|
238
|
+
- Tests cover the important trust and manifest invariants without live model calls.
|
|
239
|
+
|
|
240
|
+
MVP-03 is **not yet ready for production-like end-to-end validation**:
|
|
241
|
+
|
|
242
|
+
- Real `discover → research → analyze-version` cannot complete without a Knowledge Evidence Bundle producer.
|
|
243
|
+
- Runtime provider behavior has no timeout/retry policy yet.
|
|
244
|
+
- Grounding prevents invented refs but does not prove semantic entailment.
|
|
245
|
+
|
|
246
|
+
Recommended readiness decision:
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
Proceed with MVP-04 implementation using schema-valid fixtures and generated artifacts.
|
|
250
|
+
Do not claim real end-to-end user readiness until the Evidence Bundle producer and runtime hardening backlog are addressed.
|
|
251
|
+
```
|