Skip to content

feat(#943): Phase 0 eval substrate dogfood — SDK, pi-extension, prompts, daemon, imposers#1151

Merged
getlarge merged 18 commits into
mainfrom
feat/943-phase0-eval-substrate-dogfood
May 18, 2026
Merged

feat(#943): Phase 0 eval substrate dogfood — SDK, pi-extension, prompts, daemon, imposers#1151
getlarge merged 18 commits into
mainfrom
feat/943-phase0-eval-substrate-dogfood

Conversation

@legreffier

@legreffier legreffier Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Draft. Five commits landed while dogfooding the run_eval + judge_eval_variant eval substrate against the legreffier skill (#943 Phase 0). Each commit is independently reviewable and self-contained.

Commits

  1. feat(sdk): surface server validationErrors on MoltNetError (f77d3ccd)

    • MoltNetError.validationErrors (optional readonly array) populated from ProblemDetails.errors[]
    • Imposers / daemon-side handlers can now branch on err.validationErrors?.length to print field-level rejection reasons
    • Diary: f989af1e-0e12-4fb8-9849-fac8f59b8092 (semantic, rejected alternatives spelled out)
  2. feat(pi-extension): per-step retry policy on resumeCommands (8a00e9fb)

    • resumeCommands schema: (string | ResumeCommand)[] where ResumeCommand = { run, retries?, retryBackoffMs? }
    • sandbox.json opts pnpm install into retries: 2 and bumps pnpm's own --fetch-retries=8, lowering --network-concurrency=8 to reduce DNS pressure
    • Trigger: EAI_AGAIN from registry.npmjs.org on freshly-resumed VMs (DHCP race)
    • Diary: 45094a65-93d2-4e31-9013-75b93a139c98
  3. fix(agent-runtime,agent-daemon): explicit verification consequence + complete-rejection fallback (badfb96e)

    • Producer prompt block (buildSelfVerificationBlock) now spells out the server-side rejection consequence — observed during run_eval dogfooding where the agent submitted output without verification and the attempt surfaced as lease_expired instead of the real VALIDATION_FAILED
    • Daemon's finalizeTask catches tasks.complete failures and falls back to tasks.fail with a typed error code carrying the SDK's validationErrors
    • Eliminates the silent-lease-expiry pathway when complete is rejected
    • Diary: 2cd09391-f236-4054-96f5-590d54234300
  4. feat(tools): --skill-path on run-eval, surface SDK validationErrors (a664fb9b)

    • Replaces --skill <slug> with --skill-path <file>. Slug derived from parent dir name (Claude-style <slug>/SKILL.md layout)
    • Imposers print field-level errors when the server rejects a tasks.create call
    • Diary: 070f2272-166d-4f17-989d-ecb4beb3426c

Out of scope (filed separately)

Test plan

  • Re-run the scenario-0 variant pair end-to-end with the new daemon build
  • Verify pnpm install resume retry triggers if EAI_AGAIN reappears
  • Verify a submit_run_eval_output without verification now surfaces as tasks.fail with output_rejected_by_server (not lease_expired)
  • Tail-test that --skill-path rejects a non-conforming parent dir name

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CLI go.mod is behind internal Go module releases

The CLI release is intentionally decoupled from same-run Go lib releases, so apps/moltnet-cli/go.mod must already be bumped in a normal PR.

Detected drift:

  • moltnet-api-client: go.mod has v1.28.1, expected v1.28.2

Run these commands from apps/moltnet-cli:

GOWORK=off go get github.com/getlarge/themoltnet/libs/moltnet-api-client@v1.28.2
GOWORK=off go mod tidy

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

🚨 Dependency Audit — Vulnerabilities found

Full report
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ fast-jwt: Incomplete fix for CVE-2023-48223: JWT       │
│                     │ Algorithm Confusion via Whitespace-Prefixed RSA Public │
│                     │ Key                                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-jwt                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=6.1.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=6.2.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>@getlarge/fastify-mcp>@fastify/       │
│                     │ jwt>fast-jwt                                           │
│                     │                                                        │
│                     │ libs__auth>fast-jwt                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-mvf2-f6gm-w987      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ fast-jwt: Cache Confusion via cacheKeyBuilder          │
│                     │ Collisions Can Return Claims From a Different Token    │
│                     │ (Identity/Authorization Mixup)                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-jwt                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=0.0.1 <6.2.0                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=6.2.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>@getlarge/fastify-mcp>@fastify/       │
│                     │ jwt>fast-jwt                                           │
│                     │                                                        │
│                     │ libs__auth>fast-jwt                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-rp9m-7r4c-75qg      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ Arbitrary code execution in protobufjs                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <7.5.5                                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-xq3m-2v4x-88gg      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ Arbitrary code execution in protobufjs                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <8.0.1                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-xq3m-2v4x-88gg      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ fast-jwt: JWT auth bypass due to empty HMAC secret     │
│                     │ accepted by async key resolver                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-jwt                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=6.2.3                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=6.2.4                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>@getlarge/fastify-mcp>@fastify/       │
│                     │ jwt>fast-jwt                                           │
│                     │                                                        │
│                     │ libs__auth>fast-jwt                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-gmvf-9v4p-v8jc      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ fast-jwt accepts unknown `crit` header extensions (RFC │
│                     │ 7515 violation)                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-jwt                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=6.1.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ <0.0.0                                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>@getlarge/fastify-mcp>@fastify/       │
│                     │ jwt>fast-jwt                                           │
│                     │                                                        │
│                     │ libs__auth>fast-jwt                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-hm7r-c7qw-ghp6      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ Fastify has a Body Schema Validation Bypass via        │
│                     │ Leading Space in Content-Type Header                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fastify                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=5.3.2 <=5.8.4                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=5.8.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>fastify                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-247c-9743-5963      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ fast-uri vulnerable to path traversal via              │
│                     │ percent-encoded dot segments                           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-uri                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=3.1.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=3.1.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>ajv>fast-uri           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-q3j6-qgpj-74h6      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ fast-uri vulnerable to host confusion via              │
│                     │ percent-encoded authority delimiters                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-uri                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=3.1.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=3.1.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>ajv>fast-uri           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-v39h-62p7-jpjc      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Code injection through bytes field        │
│                     │ defaults in generated toObject code                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-66ff-xgx4-vchm      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Code injection through bytes field        │
│                     │ defaults in generated toObject code                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-66ff-xgx4-vchm      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Code generation gadget after prototype    │
│                     │ pollution                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-75px-5xx7-5xc7      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Code generation gadget after prototype    │
│                     │ pollution                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-75px-5xx7-5xc7      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Process-wide denial of service through    │
│                     │ unsafe option paths                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-jvwf-75h9-cwgg      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Process-wide denial of service through    │
│                     │ unsafe option paths                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-jvwf-75h9-cwgg      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Denial of service through unbounded       │
│                     │ protobuf recursion                                     │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-685m-2w69-288q      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ protobuf.js: Denial of service through unbounded       │
│                     │ protobuf recursion                                     │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-685m-2w69-288q      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono missing validation of cookie name on write path   │
│                     │ in setCookie()                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.12                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.12                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-26pp-8wgv-hjvm      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono: Non-breaking space prefix bypass in cookie name  │
│                     │ handling in getCookie()                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.12                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.12                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-r5rp-j6wh-rvv4      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono: Path traversal in toSSG() allows writing files   │
│                     │ outside the output directory                           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=4.0.0 <=4.12.11                                      │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.12                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-xf4j-xp2r-rqqx      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono: Middleware bypass via repeated slashes in        │
│                     │ serveStatic                                            │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.12                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.12                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-wmmm-f939-6g9c      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ @hono/node-server: Middleware bypass via repeated      │
│                     │ slashes in serveStatic                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ @hono/node-server                                      │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <1.19.13                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=1.19.13                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>@hono/node-server      │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-92pp-h63x-v22m      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ fast-jwt has a ReDoS when using RegExp in allowed*     │
│                     │ leading to CPU exhaustion during token verification    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-jwt                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=5.0.0 <=6.2.0                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=6.2.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>@getlarge/fastify-mcp>@fastify/       │
│                     │ jwt>fast-jwt                                           │
│                     │                                                        │
│                     │ libs__auth>fast-jwt                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-cjw9-ghj4-fwxf      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ fast-jwt: Stateful RegExp (/g or /y) causes            │
│                     │ non-deterministic allowed-claim validation (logical    │
│                     │ DoS)                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ fast-jwt                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <6.2.1                                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=6.2.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>@getlarge/fastify-mcp>@fastify/       │
│                     │ jwt>fast-jwt                                           │
│                     │                                                        │
│                     │ libs__auth>fast-jwt                                    │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-3j8v-cgw4-2g6q      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ hono Improperly Handles JSX Attribute Names Allows     │
│                     │ HTML Injection in hono/jsx SSR                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.14                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.14                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-458j-xx4x-4375      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono has incorrect IP matching in ipRestriction() for  │
│                     │ IPv4-mapped IPv6 addresses                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.12                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.12                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-xpcf-pg52-r92g      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono has CSS Declaration Injection via Style Object    │
│                     │ Values in JSX SSR                                      │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.18                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.18                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-qp7p-654g-cw7p      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ ip-address has XSS in Address6 HTML-emitting methods   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ ip-address                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=10.1.0                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=10.1.1                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>express-rate-limit>ip- │
│                     │ address                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-v2v4-37r5-5v8g      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobuf.js: Denial of service from crafted field      │
│                     │ names in generated code                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-2pr8-phx7-x9h3      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobuf.js: Denial of service from crafted field      │
│                     │ names in generated code                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-2pr8-phx7-x9h3      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobuf.js: Prototype injection in generated message  │
│                     │ constructors                                           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-fx83-v9x8-x52w      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobuf.js: Prototype injection in generated message  │
│                     │ constructors                                           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-fx83-v9x8-x52w      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobufjs has overlong UTF-8 decoding                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ @protobufjs/utf8                                       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=1.1.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=1.1.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-                             │
│                     │ transformer>protobufjs>@protobufjs/utf8                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-q6x5-8v7m-xcrf      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobufjs has overlong UTF-8 decoding                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=8.0.0 <=8.0.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=8.0.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@opentelemetry/exporter-trace-otlp- │
│                     │ proto>@opentelemetry/otlp-transformer>protobufjs       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-q6x5-8v7m-xcrf      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ protobufjs has overlong UTF-8 decoding                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ protobufjs                                             │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=7.5.5                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.5.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__mcp-server>pino-opentelemetry-transport>otlp-    │
│                     │ logger>@opentelemetry/exporter-logs-otlp-grpc>@grpc/   │
│                     │ grpc-js>@grpc/proto-loader>protobufjs                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-q6x5-8v7m-xcrf      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono's Cache Middleware ignores Vary: Authorization /  │
│                     │ Vary: Cookie leading to cross-user cache leakage       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.18                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.18                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-p77w-8qqv-26rm      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Hono: bodyLimit() can be bypassed for chunked /        │
│                     │ unknown-length requests                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.16                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.16                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-9vqf-7f2p-gf9v      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ hono/jsx has Unvalidated JSX Tag Names that May Allow  │
│                     │ HTML Injection                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.16                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.16                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-69xw-7hcm-h432      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ brace-expansion: Large numeric range defeats           │
│                     │ documented `max` DoS protection                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ brace-expansion                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=5.0.0 <5.0.6                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=5.0.6                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-coding-          │
│                     │ agent>minimatch>brace-expansion                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-jxxr-4gwj-5jf2      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ low                 │ Elliptic Uses a Cryptographic Primitive with a Risky   │
│                     │ Implementation                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ elliptic                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <=6.6.1                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ <0.0.0                                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ libs__auth>get-jwks>jwk-to-pem>elliptic                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-848j-6mx2-7j84      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ low                 │ Hono has improper validation of NumericDate claims     │
│                     │ (exp, nbf, iat) in JWT verify()                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ hono                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <4.12.18                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=4.12.18                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps__agent-daemon>@earendil-works/pi-ai>@google/      │
│                     │ genai>@modelcontextprotocol/sdk>hono                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-hm8q-7f3q-5f36      │
└─────────────────────┴────────────────────────────────────────────────────────┘
47 vulnerabilities found
Severity: 2 low | 24 moderate | 13 high | 8 critical

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

⚠️ Knip — Unused code or dependencies found

Run pnpm run knip locally to see details, or pnpm run knip:fix to auto-fix some of them.

Full report
�[93m�[4mUnused files�[24m�[39m (33)
.agents/skills/monitor-ci/scripts/ci-poll-decide.mjs                                       
.agents/skills/monitor-ci/scripts/ci-state-update.mjs                                      
apps/console/e2e/seed-diary-browser.ts                                                     
apps/landing/src/hooks/useFeedSSE.ts                                                       
apps/mcp-server/src/schemas/index.ts                                                       
apps/rest-api/src/migrate.ts                                                               
apps/rest-api/src/sse/public-feed-poller.ts                                                
apps/rest-api/src/sse/sse-writer.ts                                                        
evals/moltnet-practices/auth-middleware-early-return/fixtures/auth-plugin.ts               
evals/moltnet-practices/auth-middleware-early-return/fixtures/team-resolver.ts             
evals/moltnet-practices/e2e-raw-fetch-vs-api-client/fixtures/sdk.gen.ts                    
evals/moltnet-practices/repository-tenant-scope-bypass/fixtures/consolidate-workflow.ts    
evals/moltnet-practices/repository-tenant-scope-bypass/fixtures/diary-entry.repository.ts  
evals/moltnet-practices/rest-error-boundary/fixtures/pack-routes.ts                        
evals/moltnet-practices/rest-error-boundary/fixtures/verification-routes.ts                
evals/moltnet-practices/webhook-auth-status-code/fixtures/hooks.ts                         
examples/compile-context.ts                                                                
examples/diary-create.ts                                                                   
examples/diary-search.ts                                                                   
examples/register.ts                                                                       
examples/sign-entry.ts                                                                     
libs/context-distill/__tests__/benchmarks/cluster.bench.ts                                 
libs/context-distill/__tests__/benchmarks/compile.bench.ts                                 
test-fixtures/generate-ssh-vectors.mjs                                                     
test-fixtures/generate-x25519-vectors.mjs                                                  
tools/db/backfill-content-hashes.ts                                                        
tools/db/backfill-diary-team-links.ts                                                      
tools/db/backfill-keto-subject-set.ts                                                      
tools/db/backfill-personal-teams.ts                                                        
tools/db/backfill-team-relations-plural.ts                                                 
tools/db/cleanup-legacy-diary-tuples.ts                                                    
tools/src/tasks/seed-judge-fixture.ts                                                      
tools/src/verify-task-context.ts                                                           
�[93m�[4mUnused dependencies�[24m�[39m (38)
@earendil-works/gondolin                     apps/agent-daemon/package.json:32:6        
pino-pretty                                  apps/agent-daemon/package.json:45:6        
@moltnet/models                              apps/console/package.json:10:6             
@fastify/otel                                apps/mcp-server/package.json:30:6          
@opentelemetry/exporter-metrics-otlp-proto   apps/mcp-server/package.json:32:6          
@opentelemetry/exporter-trace-otlp-proto     apps/mcp-server/package.json:33:6          
@opentelemetry/instrumentation               apps/mcp-server/package.json:34:6          
@opentelemetry/instrumentation-dns           apps/mcp-server/package.json:35:6          
@opentelemetry/instrumentation-http          apps/mcp-server/package.json:36:6          
@opentelemetry/instrumentation-net           apps/mcp-server/package.json:37:6          
@opentelemetry/instrumentation-pino          apps/mcp-server/package.json:38:6          
@opentelemetry/instrumentation-pg            apps/mcp-server/package.json:39:6          
@opentelemetry/instrumentation-runtime-node  apps/mcp-server/package.json:40:6          
@opentelemetry/instrumentation-undici        apps/mcp-server/package.json:41:6          
@opentelemetry/resources                     apps/mcp-server/package.json:42:6          
@opentelemetry/sdk-metrics                   apps/mcp-server/package.json:43:6          
@opentelemetry/sdk-trace-base                apps/mcp-server/package.json:44:6          
@opentelemetry/sdk-trace-node                apps/mcp-server/package.json:45:6          
@opentelemetry/semantic-conventions          apps/mcp-server/package.json:46:6          
pino                                         apps/mcp-server/package.json:50:6          
pino-opentelemetry-transport                 apps/mcp-server/package.json:51:6          
thread-stream                                apps/mcp-server/package.json:52:6          
multiformats                                 apps/rest-api/package.json:32:6            
@huggingface/transformers                    apps/rest-api/package.json:34:6            
@opentelemetry/exporter-metrics-otlp-proto   apps/rest-api/package.json:44:6            
@opentelemetry/instrumentation               apps/rest-api/package.json:46:6            
@opentelemetry/resources                     apps/rest-api/package.json:54:6            
@opentelemetry/sdk-metrics                   apps/rest-api/package.json:55:6            
@opentelemetry/sdk-trace-base                apps/rest-api/package.json:56:6            
@opentelemetry/sdk-trace-node                apps/rest-api/package.json:57:6            
@opentelemetry/semantic-conventions          apps/rest-api/package.json:58:6            
pino-pretty                                  apps/rest-api/package.json:66:6            
thread-stream                                apps/rest-api/package.json:67:6            
@noble/hashes                                libs/context-pack-service/package.json:19:6
@moltnet/auth                                tools/package.json:38:6                    
@moltnet/models                              tools/package.json:45:6                    
drizzle-orm                                  tools/package.json:53:6                    
fastq                                        tools/package.json:54:6                    
�[93m�[4mUnused devDependencies�[24m�[39m (6)
drizzle-orm     apps/mcp-server/package.json:58:6   
pino-pretty     apps/mcp-server/package.json:59:6   
vitest          libs/bootstrap/package.json:24:6    
testcontainers  libs/diary-service/package.json:29:6
lint-staged     package.json:97:6                   
@types/figlet   tools/package.json:60:6             
�[93m�[4mReferenced optional peerDependencies�[24m�[39m (1)
ink  libs/design-system/package.json
�[93m�[4mUnlisted dependencies�[24m�[39m (3)
@moltnet/database  evals/moltnet-practices/e2e-raw-fetch-vs-api-client/fixtures/governance.e2e.test.ts:19:46
pg                 libs/diary-service/__tests__/diary-service.dbos.integration.test.ts:21:27                
�[90m�[39m�[97m@nx/js�[39m�[90m/typescript�[39m  nx.json                                                                                  
�[93m�[4mUnlisted binaries�[24m�[39m (6)
python3                                             .github/workflows/ci.yml     
clawhub                                             .github/workflows/release.yml
go                                                  package.json                 
gofmt                                               package.json                 
packages/openclaw-skill/scripts/publish-clawhub.sh  package.json                 
packages/openclaw-skill/scripts/package.sh          package.json                 
�[93m�[4mUnused exports�[24m�[39m (75)
DaemonSlotRegistryError           class     apps/agent-daemon/src/lib/daemon-slot-registry.ts:8:14        
COMMON_REQUIRED_FLAGS                       apps/agent-daemon/src/lib/help.ts:3:14                        
COMMON_OPTIONAL_FLAGS                       apps/agent-daemon/src/lib/help.ts:10:14                       
buildDaemonSlotId                 function  apps/agent-daemon/src/lib/task-execution-plan.ts:74:17        
ENTRY_TYPE_OPTIONS                          apps/console/src/diaries/utils.ts:22:14                       
API_BASE_URL                                apps/landing/src/api.ts:16:14                                 
handleDiaryTags                   function  apps/mcp-server/src/diary-tools.ts:464:23                     
handleGrantCreate                 function  apps/mcp-server/src/grant-tools.ts:38:23                      
handleGrantRevoke                 function  apps/mcp-server/src/grant-tools.ts:70:23                      
handleGrantList                   function  apps/mcp-server/src/grant-tools.ts:102:23                     
handleMoltnetInfo                 function  apps/mcp-server/src/info-tools.ts:24:23                       
handlePacksUpdate                 function  apps/mcp-server/src/pack-tools.ts:295:23                      
handleRenderedPacksUpdate         function  apps/mcp-server/src/pack-tools.ts:385:23                      
handlePacksDiff                   function  apps/mcp-server/src/pack-tools.ts:487:23                      
handleSignMessage                 function  apps/mcp-server/src/prompts.ts:212:23                         
CustomPackEntrySelectionSchema              apps/mcp-server/src/schemas/pack-schemas.ts:107:14            
handleTeamsList                   function  apps/mcp-server/src/team-tools.ts:62:23                       
handleTeamMembersList             function  apps/mcp-server/src/team-tools.ts:84:23                       
handleTeamsCreate                 function  apps/mcp-server/src/team-tools.ts:109:23                      
handleTeamsJoin                   function  apps/mcp-server/src/team-tools.ts:132:23                      
handleTeamsDelete                 function  apps/mcp-server/src/team-tools.ts:155:23                      
handleTeamsInviteCreate           function  apps/mcp-server/src/team-tools.ts:178:23                      
handleTeamsInviteList             function  apps/mcp-server/src/team-tools.ts:211:23                      
handleTeamsInviteDelete           function  apps/mcp-server/src/team-tools.ts:236:23                      
handleTeamsMemberRemove           function  apps/mcp-server/src/team-tools.ts:264:23                      
ServerConfigSchema                          apps/rest-api/src/config.ts:26:14                             
DatabaseConfigSchema                        apps/rest-api/src/config.ts:38:14                             
WebhookConfigSchema                         apps/rest-api/src/config.ts:43:14                             
RecoveryConfigSchema                        apps/rest-api/src/config.ts:47:14                             
OryConfigSchema                             apps/rest-api/src/config.ts:51:14                             
ObservabilityConfigSchema                   apps/rest-api/src/config.ts:62:14                             
EmbeddingConfigSchema                       apps/rest-api/src/config.ts:98:14                             
SecurityConfigSchema                        apps/rest-api/src/config.ts:105:14                            
loadEmbeddingConfig               function  apps/rest-api/src/config.ts:264:17                            
loadPackGcConfig                  function  apps/rest-api/src/config.ts:274:17                            
loadTaskOrphanSweeperConfig       function  apps/rest-api/src/config.ts:284:17                            
acceptsProblemJson                          apps/rest-api/src/problems/index.ts:2:3                       
findProblemTypeByCode                       apps/rest-api/src/problems/index.ts:8:3                       
findProblemTypeByStatus                     apps/rest-api/src/problems/index.ts:9:3                       
getTypeUri                                  apps/rest-api/src/problems/index.ts:10:3                      
problemTypes                                apps/rest-api/src/problems/index.ts:12:3                      
DiaryTagCountSchema                         apps/rest-api/src/schemas/diary.ts:58:14                      
PublicAuthorSchema                          apps/rest-api/src/schemas/diary.ts:123:14                     
ContextPackEntrySchema                      apps/rest-api/src/schemas/packs.ts:9:14                       
TaskTypeDescriptorSchema                    apps/rest-api/src/schemas/tasks.ts:213:14                     
inflateRowCreator                 function  apps/rest-api/src/utils/auth-principal.ts:142:23              
resolvePrincipal                            apps/rest-api/src/utils/auth-principal.ts:191:10              
consolidateQueue                            apps/rest-api/src/workflows/context-distill-workflows.ts:58:14
compileQueue                                apps/rest-api/src/workflows/context-distill-workflows.ts:63:14
HumanOnboardingError              class     apps/rest-api/src/workflows/human-onboarding-workflow.ts:36:14
compileQueue                                apps/rest-api/src/workflows/index.ts:2:3                      
consolidateQueue                            apps/rest-api/src/workflows/index.ts:4:3                      
contextDistillWorkflows                     apps/rest-api/src/workflows/index.ts:7:3                      
diaryTransferWorkflow                       apps/rest-api/src/workflows/index.ts:14:3                     
TRANSFER_DECISION_EVENT                     apps/rest-api/src/workflows/index.ts:17:3                     
HumanOnboardingError                        apps/rest-api/src/workflows/index.ts:22:3                     
DEFAULT_WORKFLOW_TIMEOUT_MS                 apps/rest-api/src/workflows/index.ts:56:3                     
runWorkflow                                 apps/rest-api/src/workflows/index.ts:57:3                     
FOUNDING_ACCEPT_EVENT                       apps/rest-api/src/workflows/index.ts:61:3                     
TeamFoundingTimeoutError                    apps/rest-api/src/workflows/index.ts:67:3                     
teamFoundingWorkflow                        apps/rest-api/src/workflows/index.ts:68:3                     
DEFAULT_WORKFLOW_TIMEOUT_MS                 apps/rest-api/src/workflows/run-workflow.ts:14:14             
TeamFoundingTimeoutError          class     apps/rest-api/src/workflows/team-founding-workflow.ts:32:14   
DBOSWorkflowConflictError                   libs/database/src/dbos.ts:154:3                               
DEFAULT_DISPATCH_TIMEOUT_SECONDS            libs/database/src/workflows/task-workflows.ts:124:14          
DEFAULT_RUNNING_TIMEOUT_SECONDS             libs/database/src/workflows/task-workflows.ts:128:14          
MAX_PUBLIC_CONTENT_LENGTH                   libs/diary-service/src/diary-service.ts:53:14                 
resolveTaskScratchPath            function  libs/pi-extension/src/runtime/task-workspace.ts:119:17        
makeClient                        function  packages/legreffier-cli/src/api.ts:78:17                      
formatPortIssues                  function  packages/legreffier-cli/src/phases/portValidate.ts:213:17     
gitMergeBase                      function  tools/src/tasksmith/gh-client.ts:151:23                       
gitShowFileAtRef                  function  tools/src/tasksmith/gh-client.ts:206:23                       
SEED_INSTRUCTION                            tools/src/tasksmith/task-extractor.ts:538:10                  
verifyTask                        function  tools/src/tasksmith/verify.ts:356:23                          
cleanupPrArtifacts                function  tools/src/tasksmith/verify.ts:480:23                          
�[93m�[4mUnused exported types�[24m�[39m (49)
MailRecord                 interface  apps/console/e2e/helpers/mailslurper.ts:3:18                      
MoltnetInfoInput           type       apps/mcp-server/src/schemas/info-schemas.ts:19:13                 
IssueVoucherInput          type       apps/mcp-server/src/schemas/vouch-schemas.ts:22:13                
ListVouchersInput          type       apps/mcp-server/src/schemas/vouch-schemas.ts:25:13                
TrustGraphInput            type       apps/mcp-server/src/schemas/vouch-schemas.ts:28:13                
CorsPluginOptions          interface  apps/rest-api/src/plugins/cors.ts:11:18                           
RateLimitPluginOptions     interface  apps/rest-api/src/plugins/rate-limit.ts:14:18                     
ProblemType                type       apps/rest-api/src/problems/index.ts:11:8                          
AgentPrincipal             type       apps/rest-api/src/schemas/principal.ts:37:8                       
HumanPrincipal             type       apps/rest-api/src/schemas/principal.ts:39:8                       
PrincipalIdentity          type       apps/rest-api/src/schemas/principal.ts:41:8                       
CreateTaskInput            type       apps/rest-api/src/services/task.service.ts:2:8                    
AuthContext                type       apps/rest-api/src/types.ts:14:3                                   
PermissionChecker          type       apps/rest-api/src/types.ts:15:3                                   
RelationshipReader         type       apps/rest-api/src/types.ts:16:3                                   
RelationshipWriter         type       apps/rest-api/src/types.ts:17:3                                   
CompileWorkflowInput       type       apps/rest-api/src/workflows/index.ts:3:8                          
ConsolidateWorkflowInput   type       apps/rest-api/src/workflows/index.ts:5:8                          
ContextDistillDeps         type       apps/rest-api/src/workflows/index.ts:6:8                          
DiaryTransferDeps          type       apps/rest-api/src/workflows/index.ts:12:8                         
DiaryTransferResult        type       apps/rest-api/src/workflows/index.ts:13:8                         
TransferDecision           type       apps/rest-api/src/workflows/index.ts:18:8                         
HumanOnboardingDeps        type       apps/rest-api/src/workflows/index.ts:21:8                         
HumanOnboardingResult      type       apps/rest-api/src/workflows/index.ts:23:8                         
LegreffierOnboardingDeps   type       apps/rest-api/src/workflows/index.ts:34:8                         
MaintenanceDeps            type       apps/rest-api/src/workflows/index.ts:43:8                         
RegistrationDeps           type       apps/rest-api/src/workflows/index.ts:48:8                         
RegistrationResult         type       apps/rest-api/src/workflows/index.ts:49:8                         
RunWorkflowOptions         type       apps/rest-api/src/workflows/index.ts:58:8                         
FoundingMember             type       apps/rest-api/src/workflows/index.ts:62:8                         
TeamFoundingDeps           type       apps/rest-api/src/workflows/index.ts:65:8                         
TeamFoundingResult         type       apps/rest-api/src/workflows/index.ts:66:8                         
AdoptionState              interface  docs/.vitepress/theme/auth/useAdoption.ts:38:18                   
AdoptionStageKey           type       docs/.vitepress/theme/auth/useAdoption.ts:284:13                  
AdoptionStage              interface  docs/.vitepress/theme/auth/useAdoption.ts:292:18                  
DocsTeam                   interface  docs/.vitepress/theme/auth/useTeamSelection.ts:9:18               
SessionResolverLogger      interface  libs/auth/src/session-resolver.ts:24:18                           
GroupCreator               interface  libs/database/src/repositories/group.repository.ts:15:18          
CommandRegistrar           type       libs/pi-extension/src/commands/index.ts:5:3                       
SessionMeta                type       libs/pi-extension/src/commands/index.ts:7:3                       
RateLimitRetryOptions      type       libs/sdk/src/retry.ts:5:15                                        
AgentAdapter               type       packages/legreffier-cli/src/adapters/index.ts:11:15               
AgentAdapterOptions        type       packages/legreffier-cli/src/adapters/index.ts:11:29               
ResolveInstallationStatus  type       packages/legreffier-cli/src/phases/portResolveInstallation.ts:6:13
VerifyInstallationStatus   type       packages/legreffier-cli/src/phases/portVerifyInstallation.ts:4:13 
InitPhase                  type       packages/legreffier-cli/src/state.ts:4:13                         
EvalMode                   type       tools/src/tasks/scenario.ts:31:13                                 
EvalWorkspace              type       tools/src/tasks/scenario.ts:32:13                                 
ScenarioCriterion          interface  tools/src/tasks/scenario.ts:34:18                                 
�[93m�[4mUnused exported enum members�[24m�[39m (1)
Impose  TaskPermission  libs/auth/src/keto-constants.ts:135:3
�[93m�[4mUnused catalog entries�[24m�[39m (4)
@anthropic-ai/claude-agent-sdk  default  pnpm-workspace.yaml:32:4 
@fastify/static                 default  pnpm-workspace.yaml:42:4 
@openai/codex-sdk               default  pnpm-workspace.yaml:63:4 
zod                             default  pnpm-workspace.yaml:142:3
�[33m�[4mConfiguration hints�[24m (4)�[39m
. �[90m(root)�[39m                …p.config.ts  �[90mAdd �[97mentry�[90m and/or refine �[97mproject�[90m files in �[97mworkspaces["."]�[90m (17 unused files)�[39m        
tools                   …p.config.ts  �[90mAdd �[97mentry�[90m and/or refine �[97mproject�[90m files in �[97mworkspaces["tools"]�[90m (8 unused files)�[39m     
apps/rest-api           …p.config.ts  �[90mAdd �[97mentry�[90m and/or refine �[97mproject�[90m files in �[97mworkspaces["apps/rest-api"]�[90m (3 unused fi…�[39m
libs/context-distill    …p.config.ts  �[90mAdd �[97mentry�[90m and/or refine �[97mproject�[90m files in �[97mworkspaces["libs/context-distill"]�[90m (2 un…�[39m
 ELIFECYCLE  Command failed with exit code 1.

@getlarge
getlarge force-pushed the feat/943-phase0-eval-substrate-dogfood branch 2 times, most recently from 54709e9 to ac675da Compare May 15, 2026 12:48
legreffier Bot added 11 commits May 16, 2026 14:14
The 32 KiB inline content cap on ContextRef.content blocked the #943
Phase 0 dogfood: .claude/skills/legreffier/SKILL.md is 35,225 bytes
and is the planned skill-binding payload for the first proctored
eval scenario set. The cap was sized for short example skills;
protocol-heavy operator skills routinely exceed it.

No callers asserted the old bound; tests are green.

MoltNet-Diary: 17917279-5abb-4af3-bbcc-721d9958cb97
Add three files plus two script aliases:

- tools/src/tasks/scenario.ts — reads evals/<skill>/scenario-N/ and
  projects task.md/criteria.json/eval.json into ContextRef bindings
  and a normalized Rubric (weights summed to 1.0, llm_checklist
  scoring per agentskills.io binary-first methodology).

- tools/src/tasks/run-eval.ts — one-shot imposer per variant.
  --correlation-id REQUIRED (eval without it is pointless per #943
  design). --skill <slug> reads .claude/skills/<slug>/SKILL.md as
  a kind: skill ContextRef. --prompt-prefix / --user-inline cover
  the remaining two Tier-1 ContextBinding kinds.

- tools/src/tasks/judge-eval-variant.ts — single judge over N≥2
  completed run_eval producers. Pre-checks producer status (exists,
  type=run_eval, completed, acceptedAttemptN!=null) before POST to
  fail fast before the daemon claims a doomed judge task.

Both imposers are intentionally throwaway — retired in favor of
server-side task templates once #1135 lands.

MoltNet-Diary: 0632dcae-35f6-475a-9556-5511e73a9653
Extends MoltNetError with optional readonly validationErrors populated
from the server's ProblemDetails.errors[] array. Imposer scripts and
daemon-side error handlers can now branch on err.validationErrors?.length
to print field-level rejection reasons instead of forcing operators to
re-run with curl to see what was rejected.

Refs: #943

MoltNet-Diary: f989af1e-0e12-4fb8-9849-fac8f59b8092
resumeCommands now accepts (string | ResumeCommand)[]. Object form
takes `retries` and `retryBackoffMs` so consumers can opt brittle
idempotent steps (pnpm install, go mod download) into a bounded
retry budget without making the platform-critical steps retry.

sandbox.json opts pnpm install into retries=2 and bumps pnpm's
own --fetch-retries=8, lowering --network-concurrency=8 to reduce
DNS pressure in the post-resume DHCP race window.

Refs: #943

MoltNet-Diary: 45094a65-93d2-4e31-9013-75b93a139c98
…complete-rejection fallback

Producer prompts now spell out that omitting `verification` when
`input.successCriteria` is set causes the server to reject `submit_*`
with VALIDATION_FAILED — observed during run_eval dogfooding where
gpt-5.4-mini skipped the moltnet_get_task step entirely and the
attempt surfaced as `lease_expired` instead of the real reason.

Daemon's `finalizeTask` now catches `tasks.complete` failures and
falls back to `tasks.fail` with a typed error code
(`output_rejected_by_server` carrying the SDK's validationErrors,
or `complete_call_failed` for everything else). Eliminates the
silent-lease-expiry pathway when complete is rejected.

Refs: #943

MoltNet-Diary: 2cd09391-f236-4054-96f5-590d54234300
Replaces --skill <slug> with --skill-path <file>. The slug-only form
silently assumed the .claude/skills/<slug>/SKILL.md layout — brittle
outside this repo. Path form derives the slug from the parent dir
name and validates it against the ContextRef.slug pattern.

Imposers now surface MoltNetError.validationErrors (landed in
f77d3cc) so a server-side rejection prints the offending field
without requiring an out-of-band curl probe.

Refs: #943

MoltNet-Diary: 070f2272-166d-4f17-989d-ecb4beb3426c
MoltNet-Diary: e7e99a45-11fb-4ab0-8fc4-8dd5ee494aec
Task-Group: sandbox-resume-install-retries
Task-Family: bugfix
MoltNet-Diary: f0d334b3-eaac-4dba-b2e7-df691b95d46f
Task-Group: eval-submit-tool-enforcement
Task-Family: bugfix
Task-Completes: true
MoltNet-Diary: ab38ba6c-51fc-4067-9c91-453caa8470ac
Task-Group: legreffier-eval-runner-modes
Task-Family: feature
Task-Completes: true
MoltNet-Diary: 64fee1fb-091d-47ef-ba7d-b68c626b3a5f
Task-Group: eval-runtime-dogfood-followups
Task-Family: bugfix
Task-Completes: false
MoltNet-Diary: 77cd5648-c090-49f9-a1c9-61fc67987038
Task-Group: eval-judge-attempt-model
Task-Family: refactor
Task-Completes: false
@getlarge
getlarge force-pushed the feat/943-phase0-eval-substrate-dogfood branch from ac675da to 29b529f Compare May 16, 2026 12:25
legreffier Bot added 2 commits May 16, 2026 20:02
MoltNet-Diary: a4ff44ee-57bf-4910-933f-5bfd92715bdc
Task-Group: eval-judge-attempt-model
Task-Family: bugfix
Task-Completes: false
MoltNet-Diary: 82b9b9b8-5a7c-459b-895a-7222b2e2603d
Task-Group: eval-judge-producer-context
Task-Family: bugfix
Task-Completes: false
@getlarge

Copy link
Copy Markdown
Owner

@legreffier /complexity-review

2 similar comments
@getlarge

Copy link
Copy Markdown
Owner

@legreffier /complexity-review

@getlarge

Copy link
Copy Markdown
Owner

@legreffier /complexity-review

legreffier Bot added 2 commits May 17, 2026 22:16
MoltNet-Diary: 7ddad1a8-950a-4fac-99f4-e734ae450361
Task-Group: eval-judge-workspace-preservation
Task-Family: bugfix
Task-Completes: false
MoltNet-Diary: af2687b9-7fcd-49fc-a667-e946115ff0d5
Task-Group: eval-context-inline-prompt-discipline
Task-Family: bugfix
Task-Completes: false
@legreffier

legreffier Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Review — feat(#943): Phase 0 eval substrate dogfood

Posting as legreffier after reviewing the branch end-to-end and the related diary entries on branch:feat/943-phase0-eval-substrate-dogfood. The diary already names the problem (e:ad605aea, e:199a9014, e:64fee1fb) so I lean on those rather than re-deriving.

Latest signal: codex gpt-5.4 produced a passing run on the current shape. Consistent with e:ad605aea's last sentence ("attributable to model weakness rather than missing context wiring"). The recommendations below still hold for the weaker models the eval substrate is meant to discriminate against — if the prompt shape only works on the strongest model, the eval can't tell models apart.

Part 1 — Why weaker runners ignore their context

The producer prompt today is assembled across four sources the model sees as one stream:

[ system prompt ]
  runtime-instructor (104 lines: identity, diary, accountable commits, skill-pack disclaimer)
  \n\n---\n\n
  systemPromptPrefix      ← context[binding=prompt_prefix]; no header, no framing

[ first user message — buildRunEvalUserPrompt ]
  # Run Eval Agent
  Task id …
  ### Correlation       (5 lines on a UUID the agent doesn't act on)
  ### Scenario          ← THE TASK
  ### Input files       (optional)
  ## Self-verification  (long, instructs moltnet_get_task round-trip)
  ## Final output       (long, MUST/MUST NOT)
  \n\n---\n\n
  userInlineSuffix      ← context[binding=user_inline]; no header, no framing

[ <available_skills> in system prompt ]
  skill bindings (lazy — model must Read the file to see body)

Three concrete problems, all consistent with e:ad605aea:

(a) The scenario task is sandwiched between bureaucratic noise. "# Run Eval Agent" + task-id + correlation come before ### Scenario. ## Self-verification and ## Final output (long, MUST-y) come after. Mid-tier models anchor on the last strong instruction. Today that's "your VERY LAST action MUST be JSON" — not "read the context."

(b) prompt_prefix and user_inline have no name and no "read this first" framing. context-bindings.ts:89 joins them with \n\n---\n\n. A 20 KiB markdown blob lands after a horizontal rule with no heading. Compare DSPy where the solver schema had a field literally named context_pack. The name is the prompt.

(c) binding: 'skill' is the worst delivery for eval context. It becomes a <location> pointer in <available_skills>. The model must (i) notice it, (ii) decide it's relevant, (iii) call Read, (iv) integrate. Four failure points before a single token of context reaches reasoning. This is why qwen3.5 + gpt-5.4-codex put the Keto workflow inside the DBOS transaction despite the pack being "present."

Fix is already in e:199a9014: named section + workspace artifact, stop using skill for eval context.

Recommended shape for run_eval

# Run Eval — variant `<label>`

## Required reading
The materials below are the authoritative context for this task.
Read them in full before producing any output. They are also written
to `/workspace/context-pack.md` if you prefer file access.

<<<CONTEXT
<raw markdown bytes>
CONTEXT

## Task
<scenario.prompt>

## Input files
- `…`

## Verification
<inlined successCriteria — see Part 2>

## Output
Call `submit_run_eval_output` exactly once with { response, … }.

Concrete changes:

  1. New binding kind eval_context (don't overload prompt_prefix — that genuinely is a system-prompt prefix for non-eval tasks; conflating "system guidance" with "task reading material" is what produced e:ad605aea).
  2. Materialize /workspace/context-pack.md in the producer VM (vm.fs.writeFile alongside the skill-mount logic in inject-task-context.ts). Restores the DSPy audit-artifact flow per e:199a9014, and gives the judge a stable path instead of guessing — relevant to e:ff60dd52.
  3. Reorder buildRunEvalUserPrompt: required-reading → task → verification → output. Drop or relocate the ### Correlation block — it's daemon-side metadata, the agent doesn't act on it. If it must appear, put it in the system-prompt "Task context" list which the runtime-instructor already maintains.
  4. Imposer change (tools/src/tasks/run-eval.ts): --skill-path keeps reading the file as a source, but emits with binding: 'eval_context', not 'skill'. Otherwise the model still has to remember to Read.

Total: ~150 LoC across one schema change, one VM-fs write, one prompt reorder, one imposer mode swap.

Part 2 — agent-runtime debuggability

The mess is structural. The run_eval prompt is assembled across three modules in three layers with no single function you can read top-to-bottom:

Where Adds Owns
libs/pi-extension/src/runtime/runtime-instructor.ts (104 lines) identity, diary discipline, accountable commits, skill-pack disclaimer system prompt, every task
libs/agent-runtime/src/context-bindings.ts concatenates prompt_prefixsystemPromptPrefix, user_inlineuserInlineSuffix, writes skills per-task fragment
libs/pi-extension/src/runtime/inject-task-context.ts wraps for Gondolin VM VM glue
libs/agent-runtime/src/prompts/run-eval.ts scenario, correlation, self-verification, final output first user message
libs/pi-extension/src/runtime/execute-pi-task.ts:460–625 glues all four with inline conditionals nobody — 160-line block inside a 700-line function

When debugging a producer attempt, you can't cat one file to see "what did the model see?" — you mentally interleave four sources.

Minimum-viable refactor

One type + one assembler in libs/agent-runtime:

// libs/agent-runtime/src/prompts/assemble.ts
export interface AssembledPrompt {
  systemPrompt: string;       // runtime instructor + system fragments
  firstUserMessage: string;   // task body + user fragments
  skills: Skill[];            // pi <available_skills> entries
  // For debugging:
  sections: Array<{ source: string; role: 'system' | 'user' | 'skill'; bytes: number }>;
}

export function assembleTaskPrompt(args: {
  task: Task;
  ctx: TaskUserPromptContext;
  runtimeInstructor: string;
  context: TaskContext;
  deliverSkill: ContextDeliverer['skill'];
}): Promise<AssembledPrompt>;

execute-pi-task.ts then calls one function instead of orchestrating four. The 460–625 block collapses to:

const assembled = await assembleTaskPrompt({ task, ctx, runtimeInstructor, context: rawContext, deliverSkill });
await emit('info', { event: 'prompt_assembled', sections: assembled.sections });
// pass assembled.systemPrompt, firstUserMessage, skills to pi

The sections array is the unlock: dump it to the attempt's event log and "what did the model see?" becomes a SQL query on task_events instead of a debug session. It's also what eval replay needs — replay today shows bytes, not framing.

Per-task-type ordering becomes data, not control flow. run_eval declares context-first; fulfill_brief declares instructor-first; nobody re-implements the wrap logic.

Small cleanups while in the area

  • buildSelfVerificationBlock — inline input.successCriteria directly, drop the moltnet_get_task round-trip. With inputCid pinning the input and a 64 KiB cap, the round-trip costs more attention than it saves. The agent already has the bytes; making it re-fetch them is theatre. Echoing inputCid back stays useful as a "have you seen the input you're scoring against" check.
  • Strip rotting comments in execute-pi-task.ts and inject-task-context.ts ("// Slice 1.5 of #943 — wire …"). The diary entries on this branch are the durable record.

(Earlier draft suggested trimming buildFinalOutputBlock — withdrawn. Operator confirmed that the MUST/MUST NOT wording is load-bearing: weaker agents drop the final submit when the framing softens, which fails the attempt at the last hop. Keep it loud.)

PR-level notes

  • Commit shape is good. 11 independently reviewable commits with diary trailers. Task-Group: <slug> would have helped — the four sub-features (SDK errors, pi-extension retries, verification consequence, imposer flags) feel like four separate task chains.
  • 439693aa fix(tasks): raise ContextRef.content cap to 64 KiB — fine, but maxItems: 5 × 64 KiB = 320 KiB per task. With runtime instructor + scenario + verification + final-output, you're well into six-figure token counts before the model sees the question. Worth a procedural entry recording the new effective budget.
  • 88db35dc (pi-extension retries) and f7d37abe (SDK validationErrors) are orthogonal to eval prompts and could ship independently. Splitting would shrink this PR by ~30%.
  • Test-plan checkboxes are unchecked. At minimum item 3 (submit_run_eval_output without verificationtasks.fail with output_rejected_by_server, not lease_expired) should be exercised before merge — it's the one that motivated d9542099.
  • Missing episodic: no entry captures "qwen3.5 implemented Keto inside the DBOS transaction despite pack being present" with the actual model output. That's the most valuable artifact from this dogfood. Worth episodic with scope:agent-runtime,scope:prompts,severity:high so future eval-runner work can find it by tag.

Suggested commit chain

  1. feat(tasks): add eval_context binding, materialize /workspace/context-pack.mdlibs/tasks/src/context.ts schema + inject-task-context.ts deliverer. Diary: semantic (decision, "why new binding vs overloading prompt_prefix"). Risk: medium.
  2. refactor(agent-runtime): centralize prompt assembly in assembleTaskPrompt — extract 460–625 from execute-pi-task.ts into libs/agent-runtime/src/prompts/assemble.ts. Diary: semantic + procedural. Risk: medium.
  3. feat(eval): reorder run_eval prompt for context-first, inline successCriteriarun-eval.ts prompt + imposer emits eval_context, buildSelfVerificationBlock inlines criteria. Diary: procedural, Task-Completes: true after re-running scenario-0 against qwen3.5. Risk: medium.

The metric that tells you whether the prompt-shape hypothesis was right: re-run scenario-0 baseline-vs-context on qwen3.5 after commit 3 (gpt-5.4-codex now passes, so it's not a discriminating model anymore). If the score still doesn't move, e:ad605aea's last sentence was correct and you've at least falsified the prompt-shape hypothesis cleanly.


Sources: e:ad605aea · e:199a9014 · e:64fee1fb · e:cb73f622 · e:ff60dd52 — all on branch:feat/943-phase0-eval-substrate-dogfood, agent 1671.

@legreffier

legreffier Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Correction + addendum on commit a2b5f1ef

Correction

In my earlier comment I wrote:

buildSelfVerificationBlock — inline input.successCriteria directly, drop the moltnet_get_task round-trip.

That was wrong, and reversed what the operator actually said. Restated:

Keep the moltnet_get_task round-trip. Do NOT inline input.successCriteria in the producer prompt. The criteria are the judge's rubric. Putting them in the producer's first user message hands the agent the answer key — even when wrapped in self-verification framing, it biases the run toward "satisfy these bullets" rather than "do the task well." The current round-trip shape is correct: the agent has to actively fetch the criteria, which keeps the producer prompt lean and exercises tool-use. If anything, the block could shrink — "if successCriteria exists on moltnet_get_task for <taskId>, fetch it and emit a verification block; otherwise omit" — without inlining the rubric shape.

Sorry for the noise.

Addendum — a2b5f1ef fix(eval): strengthen inline context delivery and prompt discipline

This is the right shape and lands very close to what Part 1 recommended. Specifically:

  • New context_inline binding in libs/tasks/src/context.ts — clean separation from the genuinely-system-prompt prompt_prefix and the bottom-of-user-message user_inline.
  • formatInlineContextBlock wraps the content with a ### Injected Task Context header, slug, and <context>…</context> fence. That's the "named section" e:199a9014 called for.
  • /workspace/context-pack.md materialized by the deliverer, plus AGENTS.md mirror and .claude/CLAUDE.md @../context-pack.md import. Restores the DSPy three-file flow exactly.
  • ### Injected context discipline in buildRunEvalUserPrompt is the explicit "read context-pack.md before your first write" instruction that was missing. Good — this is what gives weaker models a chance.

Two follow-up notes on the new shape (not blocking):

  1. Section order in buildRunEvalUserPrompt is still scenario-after-discipline-after-execution-after-correlation. The contextDisciplineSection correctly precedes ### Scenario, which is the important fix. But ### Correlation and ### Execution mode still sit between the agent's role line and the discipline + task. For weaker models I'd still drop ### Correlation from the user message (it's metadata the agent doesn't act on) and consider whether ### Execution mode is system-prompt material rather than first-user-message material. Both could move into the runtime instructor under a "Task context" subsection without changing semantics.
  2. The formatInlineContextBlock header is ### Injected Task Context, but the discipline section talks about "the injected context" generically. Consider renaming the inline block header to match a single phrase the discipline section uses verbatim (e.g. both call it ### Task context pack). The weaker the model, the more these surface-form alignments matter — qwen3.5 doesn't pattern-match "Injected Task Context" ↔ "the injected context" as confidently as gpt-5.4 does.

The agent-runtime refactor (Part 2 of the earlier comment — assembleTaskPrompt) is still worth doing, but now lower priority. The prompt-shape fix was the bigger blocker; the debuggability fix can wait until you next touch this code path.

Re-running scenario-0 on qwen3.5 is now the discriminating signal: gpt-5.4-codex passing tells you the wiring works, but doesn't separate "prompt shape was the problem" from "model is strong enough to overcome any prompt shape." If qwen3.5 moves from fail→pass on the same scenario with the new context_inline delivery, the hypothesis is confirmed and you can prioritize the assembler refactor as a debuggability win rather than a correctness fix.

@legreffier

legreffier Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Two more — successCriteria correction (again) + submit-output reliability

Re-correction on successCriteria

You're right, I was wrong twice in one thread. Looking at the imposer comment in tools/src/tasks/run-eval.ts:

Why scenario.criteria.json is NOT attached to run_eval
criteria.json is the judge's hidden rubric. Attaching it to the producer run_eval task would leak the answer key… run_eval may still carry producer-visible successCriteria, but those are for generic process / completion checks, not the judge's scoring rubric.

So the rubric-leak concern lives at the imposer layer (judge's criteria.json stays off the producer), and input.successCriteria is by-design producer-visible — it's the "did you do the obvious completion steps" check, not the score. Inlining it in the prompt is fine. The current moltnet_get_task round-trip is the part that's noise: the agent has the bytes the moment the task starts, so the fetch is a tool-use detour for content already in memory.

Restated recommendation: inline input.successCriteria in buildSelfVerificationBlock and drop the moltnet_get_task instruction. Apologies for the flip-flop.

gpt-5.4: 1.0 vs 0.6 — clean signal

context_inline is doing its job. The remaining gap is weaker-model robustness and plumbing, not prompt shape. Good time to focus on the submit-output reliability you raised.

Submit-output reliability — three failure modes, three different layers

Looking at the current pipeline (submit-output-tool.tsexecute-pi-task.ts:905–965finalize.ts), there are three distinct ways a task can fail at the last step. They look the same to the operator but want different fixes.

# Failure Detected Recoverable today?
1 Model never called the submit tool. Session ended naturally on end_turn, model thought it was done. submitToolHandle.getCaptured() === null at line 911 → fail with output_missing. No. Whole attempt wasted. This is the one that hurts.
2 Model called the tool with invalid args (schema or cross-field). validateTaskOutput() returns errors → tool returns isError: true with the corrective message → model retries on the next turn. Yes, already. This is the recoverable case the submit-tool was designed for.
3 Model called with valid args, server rejects on cross-field rule (e.g. verification required iff successCriteria). tasks.complete throws → finalize.ts catches and falls back to tasks.fail with output_rejected_by_server + field-level details. Logged, not retried. Right call — the same bytes would fail the same way on retry.

Mode #2 already works. Mode #3 is correctly terminal. The lever is mode #1, and it's where automatic retry pays off.

Recommendation: in-session resubmit nudge before retrying the attempt

Cheapest, highest-leverage fix. Inside execute-pi-task.ts, before bailing with output_missing, insert one additional user turn:

// Around line 939 — submit tool exists, model never called it
} else if (submitToolHandle) {
  // First, give the model one explicit chance to submit. Most "forgot
  // to call submit" failures are simply the model ending the session
  // narratively ("done!") without realizing the runtime requires the
  // structured call. A single targeted nudge recovers the majority of
  // these without paying the cost of a fresh attempt (new VM, fresh
  // context tokens, lost workspace state).
  const nudgeBudget = opts.submitNudgeBudget ?? 1;
  for (let i = 0; i < nudgeBudget && !submitToolHandle.getCaptured(); i++) {
    await emit('info', { event: 'submit_nudge_attempt', i });
    await session.prompt(
      'You ended the session without calling `' +
        submitToolName(task.taskType) +
        '`. The runtime requires that structured call to record your output — without it the attempt fails even though your work may be correct. Call the tool now with your final output.',
    );
  }
  const recaptured = submitToolHandle.getCaptured();
  if (recaptured) {
    parsedOutput = recaptured;
    parsedOutputCid = await computeJsonCid(recaptured);
    recordTaskOutputParseResult({ taskType: task.taskType, model: opts.model, code: 'captured_via_nudge' });
  } else {
    parseError = {
      code: 'output_missing',
      message: 'Agent did not submit output… (after ' + nudgeBudget + ' nudge(s))',
    };
  }
}

Properties:

  • Cheap: stays in the same VM, same context window, same session. One extra turn vs. a whole new attempt (fresh VM = seconds + tokens; full context reseed = $$).
  • Single source of truth: still uses the existing submit tool and its validator. No duplicate code path.
  • Observable: new captured_via_nudge counter shows you the rate at which this fires — that's the metric for "is the prompt strict enough" vs "is this just intrinsic model floppiness."
  • Bounded: submitNudgeBudget defaults to 1; weaker models could get 2; budget cap means it can't loop.
  • Eval-clean: doesn't bias quality — the model still chooses its content. Only nudges presence of the call.

Don't add task-level auto-retry yet

Tempting, but it's the wrong layer for this failure mode:

So there's no failure mode where attempt-level retry is the right answer at this layer. The imposer can already create a fresh task with the same input if it wants, and that's the correct place for "this whole attempt was unrecoverable, try again with a fresh sandbox" policy — eval imposers, producer imposers, and pr-review imposers all have different retry tolerances and should decide for themselves.

If you do want a daemon-side retry knob later, gate it strictly:

  • Allow retry on: output_missing (after nudge exhausted), llm_api_error (transient), bash_timeout_cap_exceeded, prompt_build_failed.
  • Refuse retry on: output_rejected_by_server (deterministic), output_validation_failed (in-session recovery already failed), task_cancelled, max_turns_exceeded (model got stuck — retrying won't unstick it).

But the in-session nudge will eat 80%+ of the mode-#1 cases on its own. Ship that first, measure the rate, then decide if a second layer of retry is even needed.

Suggested patch order

  1. feat(pi-extension): in-session resubmit nudge before output_missing failure — ~30 LoC in execute-pi-task.ts, new submitNudgeBudget opt (default 1), new captured_via_nudge counter label. Diary: semantic (decision: in-session over attempt-retry) + procedural. Risk: low. Task-Completes: true after observing captured_via_nudge > 0 across a scenario run.
  2. fix(agent-runtime): inline successCriteria in buildSelfVerificationBlock — drop the moltnet_get_task round-trip. Risk: low. Re-run scenario-0 on qwen3.5 to confirm score doesn't regress.

The nudge counter is what gives you the empirical data to decide whether to invest in (3) — daemon-side attempt retry. If captured_via_nudge recoveries are >30% of would-be failures, the eval substrate just got much more reliable for the same scoring weight.


Sources: imposer comment in tools/src/tasks/run-eval.ts, libs/pi-extension/src/runtime/submit-output-tool.ts, libs/pi-extension/src/runtime/execute-pi-task.ts:905–965, apps/agent-daemon/src/lib/finalize.ts, plus the gpt-5.4 result (1.0 vs 0.6) the operator reported in this thread.

@legreffier

legreffier Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Correction — "imposer" framing and retry layering

I leaned on "imposer" in the last comment and built a retry layering on top of it. Both were wrong, and #1158 is exactly the corrective — already filed (by this account, 2026-05-15), and the vocabulary is settled there: proposer / propose / claim.

Threading the promises model back through the retry discussion:

In promises theory, no party can impose work on an agent. Promises are voluntary self-bindings. A proposer publishes a proposal; an agent voluntarily claims it; the claim is the promise. There is no mechanism upstream of the claim by which anyone can force a second attempt onto whoever claims next. The agent that claims is the only party that can promise to act, and only the same agent (or another that voluntarily claims) can ever produce another attempt.

So when I wrote "the proposer can already create a fresh task if it wants, and that's the correct place for retry policy" — that smuggled in coercion semantics the model explicitly rejects. A proposer re-proposing after a failed attempt is creating a new offering, not retrying the prior attempt. There is no continuity in the trust model; calling it "retry" misleads.

What this changes in the recommendation

The in-session "nudge" survives, but the framing flips:

  • Coercive read (what my comment implied): runtime detects no submit call and re-prompts to make the agent call the tool. Runtime decides on the agent's behalf.
  • Promises-aligned read: the agent's claim is a promise to run a task attempt to a recordable end-state. A session that returns control without submit_<task>_output is a session where the agent has not yet kept its own promise. The runtime's correct role is to surface that fact to the agent, then let the agent decide. The runtime is not extending the promise; it's informing the agent that the agent's promise is not yet kept.

The prompt copy carries the difference:

  • ❌ Imperative: "You ended without calling X. Call it now."
  • ✅ Informational: "This session reached end_turn but no submit-tool call was captured. Without one, this attempt is recorded as output_missing even if the underlying work succeeded. If you intended to complete, you may still call submit_<task>_output before tear-down."

One line of prompt copy; one big conceptual shift. The nudge becomes a feedback channel from substrate to agent, not a re-prompt that overrides agent choice.

What this rules out (not "defers")

Three retry layers I floated should be ruled out, not deferred:

  • Proposer-side retry (creating a new task after a failed attempt) — fine as a new proposal, but it has no privileged relationship to the prior attempt. Naming it "retry" invents continuity that doesn't exist on the network.
  • Daemon-side attempt retry (daemon claims again on the agent's behalf) — rules itself out. The daemon serves the agent; it does not extend the agent's promises.
  • Server-side automatic retry — most wrong of all; the server has no agent identity and cannot promise anything.

What remains, both grounded in agent agency

  1. In-session feedback so the agent can self-correct within its already-promised attempt. That's the nudge — and it does not extend the promise, only informs the agent the promise is not yet kept.
  2. Voluntary re-claim by an agent (same one or another) when an attempt fails and the proposal is still open. Whether that happens is up to the agents on the network, not the substrate.

The substrate's responsibility ends at emitting clear failure signals (output_missing, output_rejected_by_server, etc.) so claiming agents and observers can choose their next action.

Concrete patch to execute-pi-task.ts:939

Same ~30 LoC as before, with info_to_agent framing rather than imperative re-prompt. New counter label captured_via_feedback (not captured_via_nudge). Default budget 1; observable via metrics so you can see how often weaker models self-correct when given the information vs. needing the proposer to publish a new proposal.

If captured_via_feedback recoveries are high, the substrate is doing its job: agents are keeping their promises once informed they haven't. If they're low, the failure mode is something other than "forgot the last step" and the right next move is better signal, not stronger coercion.

Sorry for the muddled framing. The technical recommendation barely shifts; the conceptual one does, and #1158 should be the anchor for any future design conversation on this — it's the right vocabulary to think in.

@legreffier

legreffier Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Re-sequencing pointer — filed #1176

Filed #1176, which supersedes the "in-session feedback nudge" recommendation I posted earlier in this thread. Short version: the submit-tool call is part of what the agent promises when claiming the task, so it belongs in input.successCriteria as a universal gate — not in a substrate-level re-prompt path.

Re-sequencing impact on the patch chain I proposed:

  • feat(pi-extension): in-session resubmit nudge before output_missing failure — drop. The mechanism it adds (re-prompt with informational copy + captured_via_feedback counter) is the wrong layer once the submit gate is a successCriteria entry. The agent's own verification.results[] carries the signal instead.
  • fix(agent-runtime): inline successCriteria in buildSelfVerificationBlock — still stands, and becomes more important: once submit-output is a universal gate, every task-type prompt benefits from the criteria being directly visible rather than fetched.
  • feat(tasks): add eval_context binding kind, materialize /workspace/context-pack.md — already landed in a2b5f1ef.
  • refactor(agent-runtime): centralize prompt assembly in assembleTaskPrompt — independent of Make submit-tool call a successCriteria gate, not a substrate enforcement #1176; still a debuggability win.

#1176 implementation order (separate PR, not this one):

  1. Helper in libs/tasks/src/ that augments input.successCriteria with the submit-output gate at validation time.
  2. Replace output_missing synthesis in execute-pi-task.ts:939 with reading the agent's verification.results[] for the submit-output criterion.
  3. Revisit the verification required iff successCriteria rule in finalize.ts — likely redundant once the gate is universal.

This PR can land as-is for the eval-substrate scope; #1176 is the contract-level fix that follows.

MoltNet-Diary: 06a2c4a1-2d63-4f26-aa6e-49e2db4d7de5
Task-Group: eval-pr-ci-fixes
Task-Family: bugfix
Task-Completes: true
legreffier Bot added 2 commits May 18, 2026 18:44
MoltNet-Diary: 4d4bc580-15ca-4c0c-b7be-9853cee6991c
Task-Group: agent-daemon-typecheck-fix
Task-Family: bugfix
Task-Completes: true
MoltNet-Diary: 897611ca-2523-4b75-b02c-96a50854523b

Task-Group: agent-daemon-e2e-local-env

Task-Family: bugfix

Task-Completes: true
@getlarge
getlarge merged commit 5155fd7 into main May 18, 2026
27 checks passed
@getlarge
getlarge deleted the feat/943-phase0-eval-substrate-dogfood branch May 18, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant