kibi-cli 2.31.1 → 2.35.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/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +19 -7
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -1
- package/dist/commands/check-generated.d.ts +5 -1
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +24 -35
- package/dist/commands/check.d.ts +1 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +14 -5
- package/dist/commands/discovery-table.d.ts.map +1 -1
- package/dist/commands/discovery-table.js +51 -4
- package/dist/commands/doctor.js +19 -4
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +8 -5
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +109 -5
- package/dist/commands/prove.d.ts +48 -1
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +293 -8
- package/dist/commands/report.d.ts +1 -0
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +70 -5
- package/dist/commands/signoff.d.ts.map +1 -1
- package/dist/commands/signoff.js +20 -1
- package/dist/commands/sync/manifest.d.ts +10 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +106 -17
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +16 -5
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +19 -0
- package/dist/diagnostics.js +1 -1
- package/dist/engine.js +1 -1
- package/dist/extractors/markdown.d.ts +4 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +17 -0
- package/dist/extractors/symbol-coordinates.js +2 -2
- package/dist/extractors/symbols-coordinator.d.ts +2 -4
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +1 -2
- package/dist/operations/bootstrap/candidate-helpers.d.ts +3 -0
- package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidate-helpers.js +4 -0
- package/dist/operations/migration/evidence-floor.d.ts +41 -0
- package/dist/operations/migration/evidence-floor.d.ts.map +1 -0
- package/dist/operations/migration/evidence-floor.js +230 -0
- package/dist/operations/migration/proof-contract-claims.d.ts +72 -0
- package/dist/operations/migration/proof-contract-claims.d.ts.map +1 -0
- package/dist/operations/migration/proof-contract-claims.js +215 -0
- package/dist/operations/migration/schema6.d.ts +6 -0
- package/dist/operations/migration/schema6.d.ts.map +1 -1
- package/dist/operations/migration/schema6.js +92 -0
- package/dist/operations/migration/symbol-coordinates-refresh.d.ts +3 -2
- package/dist/operations/migration/symbol-coordinates-refresh.d.ts.map +1 -1
- package/dist/operations/migration/symbol-coordinates-refresh.js +4 -3
- package/dist/operations/migration/untrack-symbol-coordinates.d.ts +23 -0
- package/dist/operations/migration/untrack-symbol-coordinates.d.ts.map +1 -0
- package/dist/operations/migration/untrack-symbol-coordinates.js +67 -0
- package/dist/operations/modeling/requirement-modeler.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-modeler.js +48 -1
- package/dist/operations/modeling/requirement-types.d.ts +2 -1
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-utils.d.ts +1 -1
- package/dist/operations/modeling/requirement-utils.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-utils.js +8 -1
- package/dist/operations/mutation/omitted-properties.d.ts +11 -0
- package/dist/operations/mutation/omitted-properties.d.ts.map +1 -0
- package/dist/operations/mutation/omitted-properties.js +76 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +1 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +39 -20
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +6 -2
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +5 -3
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +7 -1
- package/dist/operations/mutation/validation.d.ts +2 -0
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +4 -0
- package/dist/operations/proof/claim-bindings.d.ts +41 -0
- package/dist/operations/proof/claim-bindings.d.ts.map +1 -0
- package/dist/operations/proof/claim-bindings.js +364 -0
- package/dist/operations/proof/code-certificates.d.ts +155 -0
- package/dist/operations/proof/code-certificates.d.ts.map +1 -0
- package/dist/operations/proof/code-certificates.js +894 -0
- package/dist/operations/proof/code-models.d.ts +96 -0
- package/dist/operations/proof/code-models.d.ts.map +1 -0
- package/dist/operations/proof/code-models.js +601 -0
- package/dist/operations/proof/code-runner.d.ts +40 -0
- package/dist/operations/proof/code-runner.d.ts.map +1 -0
- package/dist/operations/proof/code-runner.js +164 -0
- package/dist/operations/proof/code-scope.d.ts +14 -1
- package/dist/operations/proof/code-scope.d.ts.map +1 -1
- package/dist/operations/proof/code-scope.js +44 -2
- package/dist/operations/proof/compact-receipts.d.ts.map +1 -1
- package/dist/operations/proof/compact-receipts.js +4 -3
- package/dist/operations/proof/explain.d.ts +32 -0
- package/dist/operations/proof/explain.d.ts.map +1 -1
- package/dist/operations/proof/explain.js +91 -0
- package/dist/operations/proof/ingest-proof.d.ts +9 -1
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +42 -2
- package/dist/operations/proof/receipt-compaction.d.ts +2 -0
- package/dist/operations/proof/receipt-compaction.d.ts.map +1 -1
- package/dist/operations/proof/receipt-compaction.js +6 -2
- package/dist/operations/proof/regular-language.d.ts +89 -0
- package/dist/operations/proof/regular-language.d.ts.map +1 -0
- package/dist/operations/proof/regular-language.js +943 -0
- package/dist/operations/proof/source-code-readers.d.ts +12 -0
- package/dist/operations/proof/source-code-readers.d.ts.map +1 -0
- package/dist/operations/proof/source-code-readers.js +699 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +2 -1
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/shared.js +4 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-count-rules.js +8 -2
- package/dist/operations/semantic-advisor/strict-rules.d.ts +8 -0
- package/dist/operations/semantic-advisor/strict-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-rules.js +234 -4
- package/dist/operations/semantic-advisor/types.d.ts +3 -2
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.d.ts +6 -6
- package/dist/plugins/approved-source-analyzers.generated.js +6 -6
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +13 -3
- package/dist/proof/command-test-report.d.ts +4 -3
- package/dist/proof/command-test-report.d.ts.map +1 -1
- package/dist/proof/command-test-report.js +4 -10
- package/dist/proof/evaluate.d.ts.map +1 -1
- package/dist/proof/evaluate.js +18 -2
- package/dist/proof/inspect.d.ts.map +1 -1
- package/dist/proof/inspect.js +58 -0
- package/dist/proof/producers/playwright-reporter.d.ts +3 -0
- package/dist/proof/producers/playwright-reporter.d.ts.map +1 -1
- package/dist/proof/producers/playwright-reporter.js +25 -2
- package/dist/proof/step-runner.d.ts +36 -0
- package/dist/proof/step-runner.d.ts.map +1 -0
- package/dist/proof/step-runner.js +234 -0
- package/dist/public/evidence-levels.d.ts +12 -0
- package/dist/public/evidence-levels.d.ts.map +1 -0
- package/dist/public/evidence-levels.js +19 -0
- package/dist/public/impact/coverage-depth-quality.d.ts +7 -0
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +59 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +3 -1
- package/dist/public/operations/catalog.d.ts +315 -11
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts +2 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +6 -0
- package/dist/public/operations/evidence-floor.d.ts +48 -0
- package/dist/public/operations/evidence-floor.d.ts.map +1 -0
- package/dist/public/operations/evidence-floor.js +143 -0
- package/dist/public/operations/migration-plan.d.ts +19 -5
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +22 -5
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +4 -1
- package/dist/public/operations/proof-contract-claims.d.ts +26 -0
- package/dist/public/operations/proof-contract-claims.d.ts.map +1 -0
- package/dist/public/operations/proof-contract-claims.js +71 -0
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +3 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/composite.d.ts +16 -3
- package/dist/public/operations/specs/composite.d.ts.map +1 -1
- package/dist/public/operations/specs/modeling.d.ts +16 -3
- package/dist/public/operations/specs/modeling.d.ts.map +1 -1
- package/dist/public/operations/specs/modeling.js +22 -3
- package/dist/public/operations/specs/mutation-schemas.d.ts +289 -7
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +28 -4
- package/dist/public/operations/specs/proof.d.ts +9 -0
- package/dist/public/operations/specs/proof.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +19 -10
- package/dist/public/operations/specs/upsert.d.ts +289 -7
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/proof-certificates.d.ts +163 -0
- package/dist/public/proof-certificates.d.ts.map +1 -0
- package/dist/public/proof-certificates.js +419 -0
- package/dist/public/proof-protocol.d.ts +259 -3
- package/dist/public/proof-protocol.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +524 -3
- package/dist/public/proof-receipt.d.ts +90 -6
- package/dist/public/proof-receipt.d.ts.map +1 -1
- package/dist/public/proof-receipt.js +88 -7
- package/dist/public/proof-sources.d.ts +102 -0
- package/dist/public/proof-sources.d.ts.map +1 -0
- package/dist/public/proof-sources.js +1292 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +39 -2
- package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/dist/public/skills/kibi-commit-review/SKILL.md +8 -8
- package/dist/public/skills/kibi-commit-review/resources/staged-gate.md +12 -7
- package/dist/public/skills/kibi-decisions/SKILL.md +13 -2
- package/dist/public/skills/kibi-decisions/resources/decision-records.md +9 -1
- package/dist/public/skills/kibi-freshness/SKILL.md +5 -1
- package/dist/public/skills/kibi-traceability/SKILL.md +12 -1
- package/dist/public/skills/kibi-usage/SKILL.md +8 -4
- package/dist/public/skills/kibi-usage/resources/proof.md +221 -20
- package/dist/public/skills/kibi-usage/resources/workflows.md +4 -4
- package/dist/report/html-report.css +83 -11
- package/dist/report/html-report.d.ts +8 -0
- package/dist/report/html-report.d.ts.map +1 -1
- package/dist/report/html-report.js +214 -22
- package/dist/report/report-view.d.ts +2 -2
- package/dist/report/report-view.d.ts.map +1 -1
- package/dist/report/report-view.js +8 -0
- package/dist/schemas/entity.schema.json +404 -5
- package/dist/search-answer.d.ts.map +1 -1
- package/dist/search-answer.js +1 -0
- package/dist/signoff/html.d.ts.map +1 -1
- package/dist/signoff/html.js +3 -0
- package/dist/signoff/markdown.d.ts.map +1 -1
- package/dist/signoff/markdown.js +3 -0
- package/dist/signoff/model.d.ts +20 -0
- package/dist/signoff/model.d.ts.map +1 -1
- package/dist/signoff/model.js +20 -1
- package/dist/traceability/evidence-model.d.ts +13 -12
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +1 -1
- package/dist/traceability/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +1 -0
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +24 -20
- package/dist/traceability/staged-impact-contract.d.ts +4 -4
- package/dist/traceability/staged-impact-contract.js +9 -9
- package/dist/traceability/staged-symbols-manifest.d.ts +11 -3
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +47 -140
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +1 -0
- package/dist/types/entities.d.ts +5 -2
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/merge-driver-setup.d.ts +8 -1
- package/dist/utils/merge-driver-setup.d.ts.map +1 -1
- package/dist/utils/merge-driver-setup.js +23 -2
- package/dist/utils/rule-registry.generated.d.ts +10 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +12 -0
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +7 -1
- package/dist/utils/strict-modeling.d.ts +3 -2
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +37 -4
- package/dist/workspace-cwd.d.ts +15 -0
- package/dist/workspace-cwd.d.ts.map +1 -0
- package/dist/workspace-cwd.js +86 -0
- package/package.json +6 -2
- package/schema/entities.pl +6 -0
- package/schema/validation.pl +7 -2
- package/src/public/evidence-levels.ts +23 -0
- package/src/public/impact/coverage-depth-quality.ts +73 -0
- package/src/public/impact/full-kb-quality.ts +6 -1
- package/src/public/operations/check-executor.ts +13 -0
- package/src/public/operations/evidence-floor.ts +203 -0
- package/src/public/operations/migration-plan.ts +39 -6
- package/src/public/operations/node-ports.ts +3 -1
- package/src/public/operations/proof-contract-claims.ts +103 -0
- package/src/public/operations/specs/check-rules.generated.ts +3 -1
- package/src/public/operations/specs/modeling.ts +24 -5
- package/src/public/operations/specs/mutation-schemas.ts +30 -4
- package/src/public/operations/specs/reporting.ts +20 -10
- package/src/public/proof-certificates.ts +566 -0
- package/src/public/proof-protocol-types.d.ts +69 -1
- package/src/public/proof-protocol.ts +694 -3
- package/src/public/proof-receipt.ts +133 -7
- package/src/public/proof-sources.ts +1656 -0
- package/src/public/schemas/entity.ts +51 -3
- package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/src/public/skills/kibi-commit-review/SKILL.md +8 -8
- package/src/public/skills/kibi-commit-review/resources/staged-gate.md +12 -7
- package/src/public/skills/kibi-decisions/SKILL.md +13 -2
- package/src/public/skills/kibi-decisions/resources/decision-records.md +9 -1
- package/src/public/skills/kibi-freshness/SKILL.md +5 -1
- package/src/public/skills/kibi-traceability/SKILL.md +12 -1
- package/src/public/skills/kibi-usage/SKILL.md +8 -4
- package/src/public/skills/kibi-usage/resources/proof.md +221 -20
- package/src/public/skills/kibi-usage/resources/workflows.md +4 -4
- package/src/schemas/entity.schema.json +404 -5
- package/dist/commands/proof-impact.d.ts +0 -7
- package/dist/commands/proof-impact.d.ts.map +0 -1
- package/dist/commands/proof-impact.js +0 -39
- package/dist/operations/proof/baseline-diff.d.ts +0 -41
- package/dist/operations/proof/baseline-diff.d.ts.map +0 -1
- package/dist/operations/proof/baseline-diff.js +0 -153
- package/dist/operations/proof/impact.d.ts +0 -51
- package/dist/operations/proof/impact.d.ts.map +0 -1
- package/dist/operations/proof/impact.js +0 -138
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +0 -10
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +0 -1
- package/dist/traceability/reviewed-coordinate-refresh.js +0 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/proof/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC1B,gBAAgB,EAAE,SAAS,WAAW,EAAE,CAAC;CAC1C,CAAC,CAAC;AAEH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,GAC1C,mBAAmB,CAgBrB;AA6CD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,aAAa,GACtB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/proof/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC1B,gBAAgB,EAAE,SAAS,WAAW,EAAE,CAAC;CAC1C,CAAC,CAAC;AAEH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,GAC1C,mBAAmB,CAgBrB;AA6CD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,aAAa,GACtB,kBAAkB,CA6HpB"}
|
package/dist/proof/evaluate.js
CHANGED
|
@@ -64,6 +64,14 @@ function failingMemberSummary(artifact, observed) {
|
|
|
64
64
|
*/
|
|
65
65
|
export function evaluateContractAgainstRun(artifact, contract) {
|
|
66
66
|
const runPassed = artifact.run.outcome === "passed";
|
|
67
|
+
// Under own_results_first_attempt a run that only failed other cases is
|
|
68
|
+
// judged per obligation; setup, collection, infrastructure or teardown
|
|
69
|
+
// failures, errors, interruptions and empty runs still refuse every one.
|
|
70
|
+
const judgeOwnResults = !runPassed &&
|
|
71
|
+
contract.success_policy === "own_results_first_attempt" &&
|
|
72
|
+
artifact.run.outcome === "failed" &&
|
|
73
|
+
(artifact.run.failure_phase === undefined ||
|
|
74
|
+
artifact.run.failure_phase === "execution");
|
|
67
75
|
const gaps = [];
|
|
68
76
|
const projectedResults = [];
|
|
69
77
|
for (const obligation of contract.required_proofs) {
|
|
@@ -71,7 +79,15 @@ export function evaluateContractAgainstRun(artifact, contract) {
|
|
|
71
79
|
result.target === obligation.target);
|
|
72
80
|
if (observed)
|
|
73
81
|
projectedResults.push(observed);
|
|
74
|
-
if (
|
|
82
|
+
if (judgeOwnResults && observed?.binding === "aggregate_run") {
|
|
83
|
+
gaps.push({
|
|
84
|
+
symbol_id: obligation.symbol_id,
|
|
85
|
+
target: obligation.target,
|
|
86
|
+
reason: `run did not pass (outcome: ${artifact.run.outcome}); an aggregate-run result has no result of its own to judge`,
|
|
87
|
+
});
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (!runPassed && !judgeOwnResults) {
|
|
75
91
|
const attribution = failingMemberSummary(artifact, observed);
|
|
76
92
|
gaps.push({
|
|
77
93
|
symbol_id: obligation.symbol_id,
|
|
@@ -127,7 +143,7 @@ export function evaluateContractAgainstRun(artifact, contract) {
|
|
|
127
143
|
});
|
|
128
144
|
}
|
|
129
145
|
}
|
|
130
|
-
if (!runPassed) {
|
|
146
|
+
if (!runPassed && !judgeOwnResults) {
|
|
131
147
|
return {
|
|
132
148
|
satisfied: false,
|
|
133
149
|
outcome: mapRunOutcome(artifact.run.outcome),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/proof/inspect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAM/B,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,gFAAgF;IAChF,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,yEAAyE;IACzE,mBAAmB,EAAE,SAAS,QAAQ,CAAC;QACrC,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;KAC5B,CAAC,EAAE,CAAC;IACL,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,qEAAqE;IACrE,mBAAmB,EAAE,mBAAmB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAC/D,6EAA6E;IAC7E,gBAAgB,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;IACjE;;;OAGG;IACH,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,sDAAsD;IACtD,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/proof/inspect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAM/B,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,gFAAgF;IAChF,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,yEAAyE;IACzE,mBAAmB,EAAE,SAAS,QAAQ,CAAC;QACrC,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;KAC5B,CAAC,EAAE,CAAC;IACL,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,qEAAqE;IACrE,mBAAmB,EAAE,mBAAmB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAC/D,6EAA6E;IAC7E,gBAAgB,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;IACjE;;;OAGG;IACH,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,sDAAsD;IACtD,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAC;AA0LH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAMT;AA2BD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,sBAA2B,GACnC,eAAe,CA0HjB"}
|
package/dist/proof/inspect.js
CHANGED
|
@@ -108,6 +108,56 @@ const PACKAGE_RUNNERS = [
|
|
|
108
108
|
producer: "command",
|
|
109
109
|
},
|
|
110
110
|
];
|
|
111
|
+
/**
|
|
112
|
+
* Runners recognised inside package.json scripts. Projects that run the
|
|
113
|
+
* built-in Node or Bun test runners have no config file to detect.
|
|
114
|
+
*/
|
|
115
|
+
const SCRIPT_RUNNERS = [
|
|
116
|
+
{ runner: "node --test", pattern: /\bnode\b[^&|;]*\s--test\b/ },
|
|
117
|
+
{ runner: "bun test", pattern: /\bbun\s+test\b/ },
|
|
118
|
+
{ runner: "vitest", pattern: /\bvitest\b/ },
|
|
119
|
+
{ runner: "jest", pattern: /\bjest\b/ },
|
|
120
|
+
{ runner: "playwright", pattern: /\bplaywright\s+test\b/ },
|
|
121
|
+
];
|
|
122
|
+
/** package.json script bodies of the root and its declared workspaces. */
|
|
123
|
+
function workspaceScripts(root, pkg) {
|
|
124
|
+
const bodies = [];
|
|
125
|
+
const collect = (manifest) => {
|
|
126
|
+
const scripts = manifest?.scripts;
|
|
127
|
+
if (scripts === null || typeof scripts !== "object")
|
|
128
|
+
return;
|
|
129
|
+
for (const body of Object.values(scripts))
|
|
130
|
+
if (typeof body === "string")
|
|
131
|
+
bodies.push(body);
|
|
132
|
+
};
|
|
133
|
+
collect(pkg);
|
|
134
|
+
const declared = Array.isArray(pkg?.workspaces)
|
|
135
|
+
? pkg.workspaces
|
|
136
|
+
: Array.isArray(pkg?.workspaces?.packages)
|
|
137
|
+
? (pkg?.workspaces).packages
|
|
138
|
+
: [];
|
|
139
|
+
for (const pattern of declared) {
|
|
140
|
+
if (typeof pattern !== "string" || pattern.startsWith("!"))
|
|
141
|
+
continue;
|
|
142
|
+
// Only `dir` and `dir/*` workspace globs are expanded.
|
|
143
|
+
const directories = pattern.endsWith("/*")
|
|
144
|
+
? (() => {
|
|
145
|
+
const parent = path.join(root, pattern.slice(0, -2));
|
|
146
|
+
try {
|
|
147
|
+
return readdirSync(parent).map((entry) => path.join(parent, entry));
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
})()
|
|
153
|
+
: pattern.includes("*")
|
|
154
|
+
? []
|
|
155
|
+
: [path.join(root, pattern)];
|
|
156
|
+
for (const directory of directories)
|
|
157
|
+
collect(packageJson(directory));
|
|
158
|
+
}
|
|
159
|
+
return bodies;
|
|
160
|
+
}
|
|
111
161
|
function packageJson(root) {
|
|
112
162
|
const filePath = path.join(root, "package.json");
|
|
113
163
|
if (!existsSync(filePath))
|
|
@@ -182,6 +232,14 @@ export function inspectProofEnvironment(root, options = {}) {
|
|
|
182
232
|
runners.push(entry.runner);
|
|
183
233
|
}
|
|
184
234
|
}
|
|
235
|
+
const bodies = workspaceScripts(root, pkg);
|
|
236
|
+
for (const entry of SCRIPT_RUNNERS) {
|
|
237
|
+
if (bodies.some((body) => entry.pattern.test(body)) &&
|
|
238
|
+
!runners.includes(entry.runner))
|
|
239
|
+
runners.push(entry.runner);
|
|
240
|
+
}
|
|
241
|
+
if (existsSync(path.join(root, "bunfig.toml")))
|
|
242
|
+
buildSystems.add("bun");
|
|
185
243
|
}
|
|
186
244
|
if (existsSync(path.join(root, "Cargo.toml")))
|
|
187
245
|
buildSystems.add("cargo");
|
|
@@ -18,9 +18,12 @@ export declare class KibiPlaywrightProducer {
|
|
|
18
18
|
private readonly options;
|
|
19
19
|
private readonly results;
|
|
20
20
|
private startedAt;
|
|
21
|
+
private globalErrors;
|
|
21
22
|
constructor(options?: KibiPlaywrightProducerOptions);
|
|
22
23
|
onBegin(): void;
|
|
23
24
|
onTestEnd(test: unknown, result: unknown): void;
|
|
25
|
+
/** Errors outside any test case (config, global setup, collection). */
|
|
26
|
+
onError(): void;
|
|
24
27
|
onEnd(result?: unknown): Promise<void>;
|
|
25
28
|
}
|
|
26
29
|
export default KibiPlaywrightProducer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright-reporter.d.ts","sourceRoot":"","sources":["../../../src/proof/producers/playwright-reporter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EAIlB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"playwright-reporter.d.ts","sourceRoot":"","sources":["../../../src/proof/producers/playwright-reporter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EAIlB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC,CAAC;AA2DH;;;;;GAKG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkC;IAC1D,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAK;gBAEb,OAAO,GAAE,6BAAkC;IAMvD,OAAO,IAAI,IAAI;IAKf,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAmD/C,uEAAuE;IAEvE,OAAO,IAAI,IAAI;IAKT,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAkC7C;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -39,6 +39,23 @@ function environment() {
|
|
|
39
39
|
runtime: { name: "node", version: process.version },
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Map Playwright's final status to a run outcome. A plain `failed` run with
|
|
44
|
+
* no error outside the test cases failed in execution, so a contract under
|
|
45
|
+
* `own_results_first_attempt` can still judge each obligation's own case;
|
|
46
|
+
* global errors, a global timeout and interruptions refuse every obligation.
|
|
47
|
+
*/
|
|
48
|
+
function runOutcome(status, globalErrors) {
|
|
49
|
+
if (status === "passed" && globalErrors === 0)
|
|
50
|
+
return { outcome: "passed" };
|
|
51
|
+
if (status === "interrupted")
|
|
52
|
+
return { outcome: "interrupted" };
|
|
53
|
+
if (status === "timedout")
|
|
54
|
+
return { outcome: "timed_out", failure_phase: "infrastructure" };
|
|
55
|
+
return globalErrors > 0
|
|
56
|
+
? { outcome: "failed", failure_phase: "setup" }
|
|
57
|
+
: { outcome: "failed", failure_phase: "execution" };
|
|
58
|
+
}
|
|
42
59
|
/**
|
|
43
60
|
* First-party Playwright producer. It reports what happened as a
|
|
44
61
|
* kibi.proof-run.v1 artifact with complete attempt history; Kibi evaluates
|
|
@@ -49,6 +66,7 @@ export class KibiPlaywrightProducer {
|
|
|
49
66
|
options;
|
|
50
67
|
results = new Map();
|
|
51
68
|
startedAt;
|
|
69
|
+
globalErrors = 0;
|
|
52
70
|
constructor(options = {}) {
|
|
53
71
|
this.options = options;
|
|
54
72
|
this.startedAt = (options.now ?? (() => new Date()))().toISOString();
|
|
@@ -101,6 +119,11 @@ export class KibiPlaywrightProducer {
|
|
|
101
119
|
attempts: { status: "complete", entries: [attempt] },
|
|
102
120
|
});
|
|
103
121
|
}
|
|
122
|
+
/** Errors outside any test case (config, global setup, collection). */
|
|
123
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
124
|
+
onError() {
|
|
125
|
+
this.globalErrors += 1;
|
|
126
|
+
}
|
|
104
127
|
// implements REQ-kibi-verification-evidence-contract
|
|
105
128
|
async onEnd(result) {
|
|
106
129
|
const now = this.options.now ?? (() => new Date());
|
|
@@ -123,8 +146,8 @@ export class KibiPlaywrightProducer {
|
|
|
123
146
|
code_snapshot: this.options.codeSnapshot ?? process.env.KIBI_PROOF_SNAPSHOT ?? "",
|
|
124
147
|
environment: environment(),
|
|
125
148
|
run: {
|
|
126
|
-
|
|
127
|
-
exit_code: status === "passed" ? 0 : 1,
|
|
149
|
+
...runOutcome(status, this.globalErrors),
|
|
150
|
+
exit_code: status === "passed" && this.globalErrors === 0 ? 0 : 1,
|
|
128
151
|
started_at: this.startedAt,
|
|
129
152
|
finished_at: now().toISOString(),
|
|
130
153
|
},
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PROOF_TEST_REPORT_VERSION } from "./command-test-report.js";
|
|
2
|
+
/** Where `kibi proof run-steps` reads steps when no file is given. */
|
|
3
|
+
export declare const DEFAULT_PROOF_STEPS_PATH = "proof/steps.json";
|
|
4
|
+
export type ProofStepEntry = Readonly<{
|
|
5
|
+
test_id: string;
|
|
6
|
+
steps: readonly (readonly string[])[];
|
|
7
|
+
}>;
|
|
8
|
+
export type ProofStepAttempt = Readonly<{
|
|
9
|
+
outcome: "passed" | "failed" | "timed_out";
|
|
10
|
+
exit_code: number | null;
|
|
11
|
+
}>;
|
|
12
|
+
/** Validate a steps file: unique test ids, each with non-empty argv steps. */
|
|
13
|
+
export declare function validateProofSteps(value: unknown): ProofStepEntry[];
|
|
14
|
+
/** The selected tests' entries, in request order; a missing id is an error. */
|
|
15
|
+
export declare function selectProofSteps(entries: readonly ProofStepEntry[], testIds: readonly string[]): ProofStepEntry[];
|
|
16
|
+
/** Build the per-test report from each step's attempt (keyed by argv). */
|
|
17
|
+
export declare function buildStepReport(selected: readonly ProofStepEntry[], attempts: ReadonlyMap<string, ProofStepAttempt>): Readonly<{
|
|
18
|
+
version: typeof PROOF_TEST_REPORT_VERSION;
|
|
19
|
+
tests: readonly Record<string, unknown>[];
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Run the selected tests' steps (each distinct argv once, in declaration
|
|
23
|
+
* order), write the per-test report when KIBI_PROOF_TEST_REPORT names a
|
|
24
|
+
* path, and return the exit code: 0 only when every step passed. A step
|
|
25
|
+
* never sees the outer report path, so a nested kibi prove cannot overwrite
|
|
26
|
+
* the report this run writes. SIGINT and SIGTERM stop the running step's
|
|
27
|
+
* whole process group before the runner exits.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runProofSteps(options: {
|
|
30
|
+
workspaceRoot: string;
|
|
31
|
+
stepsPath?: string;
|
|
32
|
+
testIds?: readonly string[];
|
|
33
|
+
env?: NodeJS.ProcessEnv;
|
|
34
|
+
write?: (line: string) => void;
|
|
35
|
+
}): Promise<number>;
|
|
36
|
+
//# sourceMappingURL=step-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-runner.d.ts","sourceRoot":"","sources":["../../src/proof/step-runner.ts"],"names":[],"mappings":"AAgCA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,sEAAsE;AAEtE,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAM3D,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;CACvC,CAAC,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC3C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC,CAAC;AAMH,8EAA8E;AAE9E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,EAAE,CA0BnE;AAED,+EAA+E;AAE/E,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,cAAc,EAAE,CAMlB;AAED,0EAA0E;AAE1E,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC9C,QAAQ,CAAC;IACV,OAAO,EAAE,OAAO,yBAAyB,CAAC;IAC1C,KAAK,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CAC3C,CAAC,CAwBD;AAkED;;;;;;;GAOG;AAEH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,GAAG,OAAO,CAAC,MAAM,CAAC,CAuElB"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
|
6
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
(at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU Affero General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* A shipped step runner for `command` proof integrations.
|
|
20
|
+
*
|
|
21
|
+
* A project declares each proof-bearing test's steps (argv arrays) in a
|
|
22
|
+
* steps file; `kibi proof run-steps` is the integration's command. It runs
|
|
23
|
+
* the steps of the tests kibi prove selected (KIBI_PROOF_TEST_IDS), each
|
|
24
|
+
* distinct argv once, and writes a kibi.proof-test-report.v1 to
|
|
25
|
+
* KIBI_PROOF_TEST_REPORT so every test keeps its own receipt: one failing
|
|
26
|
+
* step fails only the tests that declare it.
|
|
27
|
+
*/
|
|
28
|
+
import { spawn } from "node:child_process";
|
|
29
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
30
|
+
import path from "node:path";
|
|
31
|
+
import { PROOF_TEST_REPORT_ENV, PROOF_TEST_REPORT_VERSION, } from "./command-test-report.js";
|
|
32
|
+
/** Where `kibi proof run-steps` reads steps when no file is given. */
|
|
33
|
+
// implements REQ-kibi-fresh-verification-receipts-v2
|
|
34
|
+
export const DEFAULT_PROOF_STEPS_PATH = "proof/steps.json";
|
|
35
|
+
const DEFAULT_STEP_TIMEOUT_MS = 15 * 60_000;
|
|
36
|
+
const TERM_GRACE_MS = 2_000;
|
|
37
|
+
function fail(message) {
|
|
38
|
+
throw new Error(`kibi proof run-steps: ${message}`);
|
|
39
|
+
}
|
|
40
|
+
/** Validate a steps file: unique test ids, each with non-empty argv steps. */
|
|
41
|
+
// implements REQ-kibi-fresh-verification-receipts-v2
|
|
42
|
+
export function validateProofSteps(value) {
|
|
43
|
+
if (!Array.isArray(value) || value.length === 0)
|
|
44
|
+
fail("the steps file must be a non-empty JSON array of {test_id, steps}");
|
|
45
|
+
const ids = new Set();
|
|
46
|
+
return value.map((entry, index) => {
|
|
47
|
+
if (entry === null || typeof entry !== "object" || Array.isArray(entry))
|
|
48
|
+
fail(`entry ${index} must be an object`);
|
|
49
|
+
const row = entry;
|
|
50
|
+
const testId = typeof row.test_id === "string" ? row.test_id.trim() : "";
|
|
51
|
+
if (testId === "")
|
|
52
|
+
fail(`entry ${index} has an empty test_id`);
|
|
53
|
+
if (ids.has(testId))
|
|
54
|
+
fail(`duplicate test_id ${JSON.stringify(testId)}`);
|
|
55
|
+
ids.add(testId);
|
|
56
|
+
if (!Array.isArray(row.steps) || row.steps.length === 0)
|
|
57
|
+
fail(`${testId} must declare at least one step`);
|
|
58
|
+
const steps = row.steps.map((argv, stepIndex) => {
|
|
59
|
+
if (!Array.isArray(argv) ||
|
|
60
|
+
argv.length === 0 ||
|
|
61
|
+
argv.some((part) => typeof part !== "string") ||
|
|
62
|
+
argv[0].trim() === "")
|
|
63
|
+
fail(`${testId} step ${stepIndex + 1} must be a non-empty string argv array`);
|
|
64
|
+
return [...argv];
|
|
65
|
+
});
|
|
66
|
+
return { test_id: testId, steps };
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/** The selected tests' entries, in request order; a missing id is an error. */
|
|
70
|
+
// implements REQ-kibi-fresh-verification-receipts-v2
|
|
71
|
+
export function selectProofSteps(entries, testIds) {
|
|
72
|
+
const byId = new Map(entries.map((entry) => [entry.test_id, entry]));
|
|
73
|
+
const missing = testIds.filter((id) => !byId.has(id));
|
|
74
|
+
if (missing.length > 0)
|
|
75
|
+
fail(`no steps declared for ${missing.join(", ")}`);
|
|
76
|
+
return testIds.map((id) => byId.get(id));
|
|
77
|
+
}
|
|
78
|
+
/** Build the per-test report from each step's attempt (keyed by argv). */
|
|
79
|
+
// implements REQ-kibi-fresh-verification-receipts-v2
|
|
80
|
+
export function buildStepReport(selected, attempts) {
|
|
81
|
+
return {
|
|
82
|
+
version: PROOF_TEST_REPORT_VERSION,
|
|
83
|
+
tests: selected.map((entry) => {
|
|
84
|
+
const steps = entry.steps.map((argv, index) => {
|
|
85
|
+
const attempt = attempts.get(JSON.stringify(argv)) ?? {
|
|
86
|
+
outcome: "failed",
|
|
87
|
+
exit_code: null,
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
step_index: index + 1,
|
|
91
|
+
command: [...argv],
|
|
92
|
+
outcome: attempt.outcome,
|
|
93
|
+
exit_code: attempt.exit_code,
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
const failure = steps.find((step) => step.outcome !== "passed");
|
|
97
|
+
return {
|
|
98
|
+
test_id: entry.test_id,
|
|
99
|
+
outcome: failure === undefined ? "passed" : failure.outcome,
|
|
100
|
+
steps,
|
|
101
|
+
};
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const running = new Set();
|
|
106
|
+
function signalGroup(child, signal) {
|
|
107
|
+
const pid = child.pid;
|
|
108
|
+
if (process.platform !== "win32" && pid !== undefined) {
|
|
109
|
+
try {
|
|
110
|
+
process.kill(-pid, signal);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// The group may already be gone.
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
child.kill(signal);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
// Already exited.
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/** Run one step once, in its own process group, with a timeout. */
|
|
125
|
+
function runStep(argv, cwd, env, timeoutMs) {
|
|
126
|
+
const [command, ...args] = argv;
|
|
127
|
+
return new Promise((resolve) => {
|
|
128
|
+
let timedOut = false;
|
|
129
|
+
let child;
|
|
130
|
+
try {
|
|
131
|
+
child = spawn(command, args, {
|
|
132
|
+
cwd,
|
|
133
|
+
env,
|
|
134
|
+
shell: false,
|
|
135
|
+
stdio: "inherit",
|
|
136
|
+
detached: process.platform !== "win32",
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
resolve({ outcome: "failed", exit_code: null });
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
running.add(child);
|
|
144
|
+
const timer = setTimeout(() => {
|
|
145
|
+
timedOut = true;
|
|
146
|
+
signalGroup(child, "SIGTERM");
|
|
147
|
+
setTimeout(() => signalGroup(child, "SIGKILL"), TERM_GRACE_MS).unref();
|
|
148
|
+
}, timeoutMs);
|
|
149
|
+
const done = (code) => {
|
|
150
|
+
clearTimeout(timer);
|
|
151
|
+
running.delete(child);
|
|
152
|
+
resolve({
|
|
153
|
+
outcome: timedOut ? "timed_out" : code === 0 ? "passed" : "failed",
|
|
154
|
+
exit_code: code,
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
child.once("error", () => done(null));
|
|
158
|
+
child.once("close", (code) => done(code));
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Run the selected tests' steps (each distinct argv once, in declaration
|
|
163
|
+
* order), write the per-test report when KIBI_PROOF_TEST_REPORT names a
|
|
164
|
+
* path, and return the exit code: 0 only when every step passed. A step
|
|
165
|
+
* never sees the outer report path, so a nested kibi prove cannot overwrite
|
|
166
|
+
* the report this run writes. SIGINT and SIGTERM stop the running step's
|
|
167
|
+
* whole process group before the runner exits.
|
|
168
|
+
*/
|
|
169
|
+
// implements REQ-kibi-fresh-verification-receipts-v2
|
|
170
|
+
export async function runProofSteps(options) {
|
|
171
|
+
const env = options.env ?? process.env;
|
|
172
|
+
const write = options.write ?? ((line) => console.error(line));
|
|
173
|
+
const stepsPath = path.resolve(options.workspaceRoot, options.stepsPath ?? DEFAULT_PROOF_STEPS_PATH);
|
|
174
|
+
let parsed;
|
|
175
|
+
try {
|
|
176
|
+
parsed = JSON.parse(readFileSync(stepsPath, "utf8"));
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
fail(`cannot read ${stepsPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
180
|
+
}
|
|
181
|
+
const entries = validateProofSteps(parsed);
|
|
182
|
+
let testIds = options.testIds;
|
|
183
|
+
if (testIds === undefined) {
|
|
184
|
+
const raw = env.KIBI_PROOF_TEST_IDS;
|
|
185
|
+
testIds =
|
|
186
|
+
raw === undefined || raw.trim() === ""
|
|
187
|
+
? entries.map((entry) => entry.test_id)
|
|
188
|
+
: JSON.parse(raw);
|
|
189
|
+
}
|
|
190
|
+
const selected = selectProofSteps(entries, testIds);
|
|
191
|
+
const timeoutMs = (() => {
|
|
192
|
+
const value = Number(env.KIBI_PROOF_STEP_TIMEOUT_MS);
|
|
193
|
+
return Number.isFinite(value) && value > 0 ? value : DEFAULT_STEP_TIMEOUT_MS;
|
|
194
|
+
})();
|
|
195
|
+
const stepEnv = { ...env };
|
|
196
|
+
delete stepEnv[PROOF_TEST_REPORT_ENV];
|
|
197
|
+
const stop = (signal) => {
|
|
198
|
+
for (const child of running)
|
|
199
|
+
signalGroup(child, signal);
|
|
200
|
+
process.exit(signal === "SIGINT" ? 130 : 143);
|
|
201
|
+
};
|
|
202
|
+
const onInt = () => stop("SIGINT");
|
|
203
|
+
const onTerm = () => stop("SIGTERM");
|
|
204
|
+
process.once("SIGINT", onInt);
|
|
205
|
+
process.once("SIGTERM", onTerm);
|
|
206
|
+
const attempts = new Map();
|
|
207
|
+
try {
|
|
208
|
+
for (const entry of selected)
|
|
209
|
+
for (const [index, argv] of entry.steps.entries()) {
|
|
210
|
+
const key = JSON.stringify(argv);
|
|
211
|
+
if (attempts.has(key))
|
|
212
|
+
continue;
|
|
213
|
+
write(`[proof] ${entry.test_id} step ${index + 1}: ${argv.join(" ")}`);
|
|
214
|
+
attempts.set(key, await runStep(argv, options.workspaceRoot, stepEnv, timeoutMs));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
process.removeListener("SIGINT", onInt);
|
|
219
|
+
process.removeListener("SIGTERM", onTerm);
|
|
220
|
+
}
|
|
221
|
+
const report = buildStepReport(selected, attempts);
|
|
222
|
+
const reportPath = env[PROOF_TEST_REPORT_ENV];
|
|
223
|
+
if (typeof reportPath === "string" && reportPath.trim() !== "") {
|
|
224
|
+
mkdirSync(path.dirname(reportPath), { recursive: true });
|
|
225
|
+
const temporary = `${reportPath}.${process.pid}.tmp`;
|
|
226
|
+
writeFileSync(temporary, `${JSON.stringify(report, null, 2)}\n`, "utf8");
|
|
227
|
+
renameSync(temporary, reportPath);
|
|
228
|
+
}
|
|
229
|
+
const failing = report.tests.filter((test) => test.outcome !== "passed");
|
|
230
|
+
write(failing.length === 0
|
|
231
|
+
? `[proof] every step passed for ${selected.length} test(s)`
|
|
232
|
+
: `[proof] ${failing.length} of ${selected.length} test(s) have a failing step: ${failing.map((test) => test.test_id).join(", ")}`);
|
|
233
|
+
return failing.length === 0 ? 0 : 1;
|
|
234
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How strong the evidence behind a requirement is, strongest first. proved: a
|
|
3
|
+
* re-checkable certificate covers every case. tested: fresh passing E2E
|
|
4
|
+
* receipts cover every linked scenario. asserted: a person stands behind it.
|
|
5
|
+
* unverified: an agent wrote it and no person approved it. The same list is
|
|
6
|
+
* the vocabulary of required_evidence, a requirement's evidence floor.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EVIDENCE_LEVELS: readonly ["proved", "tested", "asserted", "unverified"];
|
|
9
|
+
export type EvidenceLevel = (typeof EVIDENCE_LEVELS)[number];
|
|
10
|
+
/** Higher is stronger: unverified 0 through proved 3. */
|
|
11
|
+
export declare function evidenceRank(level: EvidenceLevel): number;
|
|
12
|
+
//# sourceMappingURL=evidence-levels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-levels.d.ts","sourceRoot":"","sources":["../../src/public/evidence-levels.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,eAAe,yDAKlB,CAAC;AAGX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,yDAAyD;AAEzD,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAEzD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How strong the evidence behind a requirement is, strongest first. proved: a
|
|
3
|
+
* re-checkable certificate covers every case. tested: fresh passing E2E
|
|
4
|
+
* receipts cover every linked scenario. asserted: a person stands behind it.
|
|
5
|
+
* unverified: an agent wrote it and no person approved it. The same list is
|
|
6
|
+
* the vocabulary of required_evidence, a requirement's evidence floor.
|
|
7
|
+
*/
|
|
8
|
+
// implements REQ-kibi-evidence-levels, REQ-kibi-evidence-floors
|
|
9
|
+
export const EVIDENCE_LEVELS = [
|
|
10
|
+
"proved",
|
|
11
|
+
"tested",
|
|
12
|
+
"asserted",
|
|
13
|
+
"unverified",
|
|
14
|
+
];
|
|
15
|
+
/** Higher is stronger: unverified 0 through proved 3. */
|
|
16
|
+
// implements REQ-kibi-evidence-floors
|
|
17
|
+
export function evidenceRank(level) {
|
|
18
|
+
return EVIDENCE_LEVELS.length - 1 - EVIDENCE_LEVELS.indexOf(level);
|
|
19
|
+
}
|
|
@@ -7,4 +7,11 @@ export declare function createCoverageDepthQualityDiagnostics(manifestResults: r
|
|
|
7
7
|
readonly passingE2eTests?: readonly string[];
|
|
8
8
|
readonly receiptGapCodes?: readonly string[];
|
|
9
9
|
}>>): readonly QualityDiagnostic[];
|
|
10
|
+
/**
|
|
11
|
+
* Requirements whose every implementing production symbol is a whole-file
|
|
12
|
+
* anchor (a coarse granularity_reason). Coverage then only says some test
|
|
13
|
+
* touches the file, so `tested` evidence is cheap; narrower behavioral
|
|
14
|
+
* symbols would tie it to the code that implements the claim.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createCoarseAnchorQualityDiagnostics(manifestResults: readonly ExtractionResult[]): readonly QualityDiagnostic[];
|
|
10
17
|
//# sourceMappingURL=coverage-depth-quality.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage-depth-quality.d.ts","sourceRoot":"","sources":["../../../src/public/impact/coverage-depth-quality.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"coverage-depth-quality.d.ts","sourceRoot":"","sources":["../../../src/public/impact/coverage-depth-quality.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAsIpD,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAI1E;AAgLD,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,SAAS,gBAAgB,EAAE,EAC5C,kBAAkB,GAAE,WAAW,CAC7B,MAAM,EACN,QAAQ,CAAC;IACP,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C,CAAC,CACS,GACZ,SAAS,iBAAiB,EAAE,CAmB9B;AAID;;;;;GAKG;AAEH,wBAAgB,oCAAoC,CAClD,eAAe,EAAE,SAAS,gBAAgB,EAAE,GAC3C,SAAS,iBAAiB,EAAE,CA2D9B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { COARSE_GRANULARITY_REASONS } from "../symbol-granularity.generated.js";
|
|
1
2
|
function entitiesById(manifestResults) {
|
|
2
3
|
return new Map(manifestResults.map((result) => [result.entity.id, result.entity]));
|
|
3
4
|
}
|
|
@@ -223,3 +224,61 @@ export function createCoverageDepthQualityDiagnostics(manifestResults, proofByRe
|
|
|
223
224
|
})
|
|
224
225
|
.toSorted((left, right) => (left.entityId ?? "").localeCompare(right.entityId ?? ""));
|
|
225
226
|
}
|
|
227
|
+
const COARSE_REASONS = new Set(COARSE_GRANULARITY_REASONS);
|
|
228
|
+
/**
|
|
229
|
+
* Requirements whose every implementing production symbol is a whole-file
|
|
230
|
+
* anchor (a coarse granularity_reason). Coverage then only says some test
|
|
231
|
+
* touches the file, so `tested` evidence is cheap; narrower behavioral
|
|
232
|
+
* symbols would tie it to the code that implements the claim.
|
|
233
|
+
*/
|
|
234
|
+
// implements REQ-audit-quality-diagnostics-v1
|
|
235
|
+
export function createCoarseAnchorQualityDiagnostics(manifestResults) {
|
|
236
|
+
const superseded = supersededRequirementIds(manifestResults);
|
|
237
|
+
const anchorsByRequirement = new Map();
|
|
238
|
+
for (const result of manifestResults) {
|
|
239
|
+
if (result.entity.type !== "symbol")
|
|
240
|
+
continue;
|
|
241
|
+
// Executable test code is not a production symbol.
|
|
242
|
+
if (result.relationships.some((rel) => rel.type === "executable_for"))
|
|
243
|
+
continue;
|
|
244
|
+
for (const relationship of result.relationships) {
|
|
245
|
+
if (relationship.type !== "implements")
|
|
246
|
+
continue;
|
|
247
|
+
const list = anchorsByRequirement.get(relationship.to) ?? [];
|
|
248
|
+
list.push(result.entity);
|
|
249
|
+
anchorsByRequirement.set(relationship.to, list);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return manifestResults
|
|
253
|
+
.filter((result) => result.entity.type === "req" &&
|
|
254
|
+
isReviewableRequirement(result.entity, superseded))
|
|
255
|
+
.flatMap((result) => {
|
|
256
|
+
const symbols = uniqueEntities(anchorsByRequirement.get(result.entity.id) ?? []);
|
|
257
|
+
if (symbols.length === 0 ||
|
|
258
|
+
!symbols.every((symbol) => COARSE_REASONS.has(symbol.granularity_reason ?? "")))
|
|
259
|
+
return [];
|
|
260
|
+
const requirement = result.entity;
|
|
261
|
+
return [
|
|
262
|
+
{
|
|
263
|
+
id: "coarse_anchor_only_review",
|
|
264
|
+
severity: "review",
|
|
265
|
+
blocking: false,
|
|
266
|
+
category: "coverage",
|
|
267
|
+
entityId: requirement.id,
|
|
268
|
+
source: requirement.source,
|
|
269
|
+
files: [requirement.source],
|
|
270
|
+
message: `Requirement ${requirement.id} (${requirement.title}) is implemented only by whole-file anchors, so its coverage says a test touches those files, not the code behind the claim.`,
|
|
271
|
+
suggestion: "Link the functions, methods or types that implement the requirement with implements (and covered_by to their tests); keep the file anchor only for genuinely module-level behavior.",
|
|
272
|
+
evidence: {
|
|
273
|
+
requirementId: requirement.id,
|
|
274
|
+
title: requirement.title,
|
|
275
|
+
symbols: symbols.map((symbol) => ({
|
|
276
|
+
id: symbol.id,
|
|
277
|
+
granularityReason: symbol.granularity_reason ?? "",
|
|
278
|
+
})),
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
];
|
|
282
|
+
})
|
|
283
|
+
.toSorted((left, right) => (left.entityId ?? "").localeCompare(right.entityId ?? ""));
|
|
284
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"full-kb-quality.d.ts","sourceRoot":"","sources":["../../../src/public/impact/full-kb-quality.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAatC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"full-kb-quality.d.ts","sourceRoot":"","sources":["../../../src/public/impact/full-kb-quality.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAatC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAcjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,KAAK,+BAA+B,GAAG;IACrC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC;IAC7D,QAAQ,CAAC,sBAAsB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAqgBF,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC,GAClD,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA8C7B;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,OAAO,GAClB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAM/C;AA2ID,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAmCvC"}
|
|
@@ -5,7 +5,7 @@ import { runOperationJsonQuery, toPrologAtom, toPrologList, } from "../operation
|
|
|
5
5
|
import { PROOF_RECEIPT_MAX_AGE_SECONDS } from "../proof-receipt.js";
|
|
6
6
|
import relationshipSchema from "../schemas/relationship.js";
|
|
7
7
|
import { analyzeTelemetryAcceptance, createTelemetryAcceptanceDiagnostics, parseTelemetryUsageLog, } from "../telemetry-acceptance.js";
|
|
8
|
-
import { createCoverageDepthQualityDiagnostics } from "./coverage-depth-quality.js";
|
|
8
|
+
import { createCoarseAnchorQualityDiagnostics, createCoverageDepthQualityDiagnostics, } from "./coverage-depth-quality.js";
|
|
9
9
|
import { createRequirementQualityDiagnostics } from "./requirement-quality.js";
|
|
10
10
|
import { createSymbolQualityDiagnostics } from "./symbol-quality.js";
|
|
11
11
|
const RELATIONSHIP_TYPES = relationshipSchema.properties.type.enum;
|
|
@@ -225,6 +225,7 @@ function toExtractedEntity(entity) {
|
|
|
225
225
|
"aliases",
|
|
226
226
|
"examples",
|
|
227
227
|
"predicate_args",
|
|
228
|
+
"value_set",
|
|
228
229
|
]) {
|
|
229
230
|
const values = optionalStringArrayField(entity, field);
|
|
230
231
|
if (values !== undefined)
|
|
@@ -552,6 +553,7 @@ export async function collectFullKbQualityDiagnostics(options) {
|
|
|
552
553
|
: {}),
|
|
553
554
|
}),
|
|
554
555
|
...coverageDepthDiagnostics,
|
|
556
|
+
...createCoarseAnchorQualityDiagnostics(manifestResults),
|
|
555
557
|
...createSymbolQualityDiagnostics({
|
|
556
558
|
manifestResults,
|
|
557
559
|
symbolsByFile: new Map(),
|