@dailephd/my-dev-kit-lab 0.9.1 → 0.9.3
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/CHANGELOG.md +19 -2
- package/README.md +10 -2
- package/dist/src/agents/adapters/codexAdapter.js +4 -1
- package/dist/src/cli/help.js +38 -2
- package/dist/src/cli/runLabCli.js +9 -1
- package/dist/src/commands/buildGalleryCommand.js +16 -3
- package/dist/src/commands/runComparePromptsCommand.js +109 -0
- package/dist/src/commands/runExperimentRunCommand.js +51 -5
- package/dist/src/core/processTree.js +41 -17
- package/dist/src/core/runMeasuredCommand.js +14 -8
- package/dist/src/experiments/plugins/agentSuccessRate/campaignCheckpointStore.js +24 -2
- package/dist/src/experiments/plugins/agentSuccessRate/campaignExecution.js +7 -2
- package/dist/src/experiments/plugins/agentSuccessRate/campaignIdentity.js +29 -4
- package/dist/src/experiments/plugins/agentSuccessRate/campaignProgress.js +4 -2
- package/dist/src/experiments/plugins/agentSuccessRate/campaignResumableExecution.js +1 -1
- package/dist/src/experiments/plugins/agentSuccessRate/config.js +47 -2
- package/dist/src/experiments/plugins/agentSuccessRate/plugin.js +4 -2
- package/dist/src/experiments/plugins/agentSuccessRate/promptContract.js +121 -0
- package/dist/src/experiments/plugins/agentSuccessRate/realAgentExecution.js +32 -2
- package/dist/src/experiments/plugins/agentSuccessRate/realAgentPrompt.js +105 -11
- package/dist/src/experiments/plugins/agentSuccessRate/strictDiffResponse.js +312 -0
- package/dist/src/gallery/galleryPathSafety.js +111 -0
- package/dist/src/gallery/readGallerySources.js +542 -0
- package/dist/src/gallery/writeGalleryManifest.js +57 -3
- package/dist/src/report/experiments/buildPluginExperimentReport.js +4 -16
- package/dist/src/report/experiments/htmlSafety.js +32 -0
- package/dist/src/report/experiments/metricEvidence.js +389 -0
- package/dist/src/report/experiments/metricGlossary.js +227 -0
- package/dist/src/report/experiments/metricGlossaryCatalog.js +199 -0
- package/dist/src/report/experiments/promptTemplateComparisonEvidence.js +377 -0
- package/dist/src/report/experiments/promptTemplateComparisonModel.js +436 -0
- package/dist/src/report/experiments/renderPluginExperimentReportHtml.js +158 -64
- package/dist/src/report/experiments/renderPluginExperimentReportText.js +22 -677
- package/dist/src/report/experiments/renderPromptTemplateComparison.js +192 -0
- package/dist/src/report/experiments/renderSpecializedTextSections.js +633 -0
- package/dist/src/report/experiments/reportSectionRegistry.js +79 -0
- package/dist/src/report/experiments/specializedReportSections.js +142 -0
- package/dist/src/report/experiments/writeAgentSuccessCampaignProgressReport.js +6 -2
- package/dist/src/report/experiments/writePluginExperimentReports.js +4 -2
- package/dist/src/securityValidation/attackScenarios/payloadCorpus.js +0 -0
- package/dist/src/securityValidation/attackScenarios/scenarios/secretLeakageScenario.js +146 -133
- package/dist/src/securityValidation/attackScenarios/scenarios/subprocessInjectionScenario.js +54 -36
- package/dist/src/securityValidation/commandRunner.js +13 -6
- package/dist/src/securityValidation/packageChecks/parseNpmPackDryRun.js +34 -4
- package/dist/src/securityValidation/packageChecks/requiredPackageContents.js +106 -2
- package/dist/src/securityValidation/packageChecks/runPackageChecks.js +31 -16
- package/dist/src/securityValidation/staticScans/semgrep.js +68 -64
- package/dist/src/securityValidation/types.js +0 -4
- package/dist/src/securityValidation/validate/runSecurityValidation.js +1 -1
- package/docs/METRICS.md +12 -2
- package/examples/tutorial-browser/prepare.mjs +13 -13
- package/examples/tutorial-browser/server.mjs +13 -13
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ export async function runSecurityValidation(options) {
|
|
|
80
80
|
// missing package.json gracefully.
|
|
81
81
|
if (selectedChecks.has("package")) {
|
|
82
82
|
try {
|
|
83
|
-
const pkgOutput = await runPackageChecks({ cwd: target.targetRoot, config });
|
|
83
|
+
const pkgOutput = await runPackageChecks({ cwd: target.targetRoot, config, target });
|
|
84
84
|
collectMany(pkgOutput.checks);
|
|
85
85
|
}
|
|
86
86
|
catch (err) {
|
package/docs/METRICS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Metrics
|
|
2
2
|
|
|
3
|
-
This document is the canonical metric glossary for my-dev-kit-lab. It defines every metric that appears in benchmark profiles, prompt variants, controlled experiment artifacts, and rendered reports across the registered experiment plugins (`context-strategy-comparison`, `warm-index-reuse`, `incremental-change-staleness`, `context-window-scaling`, `retrieval-precision-recall`, `retrieval-query-strategy-comparison`,
|
|
3
|
+
This document is the canonical metric glossary for my-dev-kit-lab. It defines every metric that appears in benchmark profiles, prompt variants, controlled experiment artifacts, and rendered reports across the registered experiment plugins (`context-strategy-comparison`, `warm-index-reuse`, `incremental-change-staleness`, `context-window-scaling`, `retrieval-precision-recall`, `retrieval-query-strategy-comparison`, `context-pack-generation`, and `agent-success-rate`).
|
|
4
4
|
|
|
5
5
|
Related documentation:
|
|
6
6
|
- [ARCHITECTURE.md](ARCHITECTURE.md) — how metrics flow through the pipeline
|
|
@@ -940,10 +940,20 @@ Cumulative versus final: durations and tokens accumulate over all provider attem
|
|
|
940
940
|
- Provider telemetry can be unavailable, and in deterministic-fixture mode both treatments receive the same reference patch, so those results measure the pipeline only.
|
|
941
941
|
|
|
942
942
|
|
|
943
|
-
## Campaign progress evidence (v0.9.1
|
|
943
|
+
## Campaign progress evidence (v0.9.1 released)
|
|
944
944
|
|
|
945
945
|
Token evidence levels are `provider-reported`, `cli-reported`, `parsed-from-output`, `unavailable`, and `estimated`. The original telemetry source is retained. Numeric availability is recorded per token field, so partial measurements remain partial and normalization never fills missing fields or invents totals; unattributed OpenTelemetry evidence is unavailable. Duration provenance is `lab-wall-clock` for valid observed elapsed time and `unavailable` for missing or invalid values; campaign comparison time is Lab-measured wall-clock duration, not provider-native time.
|
|
946
946
|
|
|
947
947
|
The plugin-specific progress projection is `my-dev-kit-lab-agent-success-rate-campaign-progress-v1`; the writer publishes immutable revision-specific JSON, HTML, and text snapshots. It accounts for selected cases and treatment units, while execution epochs remain recovery history and are excluded from selected-unit counts. Paused provider-limit and uncertain states remain distinct. Partial progress is not a complete scientific analysis artifact.
|
|
948
948
|
|
|
949
949
|
Evidence quality is metric-specific: task outcomes, token measurements, and duration can have different strong, partial, or unavailable classifications. Strong describes the completeness and provenance of the available evidence; it is not statistical significance. Partial evidence does not mean task failure. Missing token evidence is unavailable, never zero; estimated tokens are not provider usage. Duration is Lab-measured wall-clock time, not provider-native time. Comparisons use matched completed cases and state their denominator and exclusions; the existing paired direction is preserved. These descriptive comparisons establish no causal effect, winner, p-value, or general provider performance.
|
|
950
|
+
|
|
951
|
+
## v0.9.3 report metric evidence and prompt comparison
|
|
952
|
+
|
|
953
|
+
The plugin report projects recorded metrics into value, unit, availability, reason, provenance, reliability, variant/case identity, and an optional glossary anchor. It adds deterministic caveats for unavailable/not-applicable values, estimates, unknown token provenance/reliability, partial campaign telemetry, and missing glossary metadata. These are presentation projections; the existing JSON report and scientific formulas are unchanged, and the text report presents the same caveats from the same projection. Unknown provenance remains unknown and is never promoted to high reliability.
|
|
954
|
+
|
|
955
|
+
The descriptor registry in `src/report/experiments/metricGlossary.ts` covers every metric id emitted by the registered experiment plugins. Static ids are listed explicitly; bounded dynamic families are matched by closed patterns: context-window per-budget ids (`budget-<tokens>-utilization/correctness/success` and `context-budget-<tokens>-fit/too-large/successful/success-rate/mean-correctness/mean-utilization`), per task-locality scope ids (`overall|localized|cross-module|broad-change`-prefixed comparison counts and means for retrieval-query-strategy-comparison and context-pack-generation) and per-comparison `-token-savings-percent` / `-correctness-delta` ids of the context-strategy comparison. Definitions are condensed from the calculation owners (and this document); an id outside the static and family sets is rendered without a definition or link and produces a missing-metadata caveat. Agent-success attempt, repair, optional-fact, `patchApplied` and per-attempt provider duration/token metrics are defined from `analysis.ts`/`repairAnalysis.ts`; incremental-change count, upstream-refresh and run-level metrics are defined from the plugin's own metric descriptions. Per-attempt token provenance and reliability are preserved where the execution evidence records them, an aggregate (`totalProviderTokens`, cumulative warm-index tokens) is attributed a provenance only when every contributing measurement is known and agrees, and an aggregate reliability only when all contributors share it.
|
|
956
|
+
|
|
957
|
+
The standalone prompt comparison reports matched first-attempt invalid-output rates and reports persisted task-success verdicts separately. The numerator requires persisted proof of a completed provider response that violated the prompt/response contract (`OUTPUT_CONTRACT_*` error, verified malformed diff, or a named empty completed answer); a bare provider `invalid-output` status, provider timeouts, unavailability, limits, transport/infrastructure failures, policy rejections and failed task checks are excluded or valid, never counted as invalid. The denominator is eligible completed first-attempt responses on units matched on both sides. Evidence is verified through the campaign store's complete checkpoint validation against trusted task definitions authenticated by task digest. A V1 identity does not bind a template, and a self-validating sidecar plus intact prompt hash is insufficient to prove historical template identity. Without independent trustworthy run-bound proof, V1 identity is `UNVERIFIED` and the comparison is `INCOMPARABLE`.
|
|
958
|
+
|
|
959
|
+
No matched paid Codex/Claude smoke was authorized. Observed invalid-output-rate improvement remains **NOT_VERIFIED** and must not be claimed. The v0.9.3 release gate covers reproducible prompt-contract classification, trustworthy run-bound identity, matched comparison eligibility/denominators, and report correctness; real-provider effectiveness is a separate, opt-in empirical objective, not a readiness dependency. Prompt comparison capability alone does not demonstrate improvement.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
|
|
5
|
-
const sourceRoot = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
const targetRoot = process.argv[2];
|
|
7
|
-
if (!targetRoot) {
|
|
8
|
-
console.error("prepare requires a target root argument");
|
|
9
|
-
process.exit(2);
|
|
10
|
-
}
|
|
11
|
-
fs.mkdirSync(path.join(targetRoot, "app"), { recursive: true });
|
|
12
|
-
fs.mkdirSync(path.join(targetRoot, "out"), { recursive: true });
|
|
13
|
-
for (const file of ["index.html", "server.mjs"]) fs.copyFileSync(path.join(sourceRoot, file), path.join(targetRoot, "app", file));
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const sourceRoot = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const targetRoot = process.argv[2];
|
|
7
|
+
if (!targetRoot) {
|
|
8
|
+
console.error("prepare requires a target root argument");
|
|
9
|
+
process.exit(2);
|
|
10
|
+
}
|
|
11
|
+
fs.mkdirSync(path.join(targetRoot, "app"), { recursive: true });
|
|
12
|
+
fs.mkdirSync(path.join(targetRoot, "out"), { recursive: true });
|
|
13
|
+
for (const file of ["index.html", "server.mjs"]) fs.copyFileSync(path.join(sourceRoot, file), path.join(targetRoot, "app", file));
|
|
14
14
|
fs.writeFileSync(path.join(targetRoot, "out", "report.json"), JSON.stringify({ prepared: true, counts: { widgets: 3 } }, null, 2), "utf8");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import http from "node:http";
|
|
2
|
-
import fs from "node:fs";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
|
|
6
|
-
const root = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const port = Number(process.env.TUTORIAL_FIXTURE_PORT || 0);
|
|
8
|
-
const server = http.createServer((req, res) => {
|
|
9
|
-
const url = new URL(req.url ?? "/", "http://127.0.0.1");
|
|
10
|
-
if (url.pathname === "/api/status") { res.writeHead(200, { "content-type": "application/json" }); res.end(JSON.stringify({ ok: true, widgets: 3 })); return; }
|
|
11
|
-
const filePath = url.pathname === "/" ? path.join(root, "index.html") : path.join(root, url.pathname);
|
|
12
|
-
fs.readFile(filePath, (error, contents) => { if (error) { res.writeHead(404); res.end("not found"); return; } res.writeHead(200, { "content-type": filePath.endsWith(".html") ? "text/html" : "application/octet-stream" }); res.end(contents); });
|
|
13
|
-
});
|
|
1
|
+
import http from "node:http";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const root = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const port = Number(process.env.TUTORIAL_FIXTURE_PORT || 0);
|
|
8
|
+
const server = http.createServer((req, res) => {
|
|
9
|
+
const url = new URL(req.url ?? "/", "http://127.0.0.1");
|
|
10
|
+
if (url.pathname === "/api/status") { res.writeHead(200, { "content-type": "application/json" }); res.end(JSON.stringify({ ok: true, widgets: 3 })); return; }
|
|
11
|
+
const filePath = url.pathname === "/" ? path.join(root, "index.html") : path.join(root, url.pathname);
|
|
12
|
+
fs.readFile(filePath, (error, contents) => { if (error) { res.writeHead(404); res.end("not found"); return; } res.writeHead(200, { "content-type": filePath.endsWith(".html") ? "text/html" : "application/octet-stream" }); res.end(contents); });
|
|
13
|
+
});
|
|
14
14
|
server.listen(port, "127.0.0.1", () => console.log("tutorial fixture listening on " + server.address().port));
|