Skip to content

TML-2721: deterministic, fail-closed Drive trace emitter#633

Merged
wmadden merged 8 commits into
mainfrom
tml-2721-deterministic-trace-emitter
May 30, 2026
Merged

TML-2721: deterministic, fail-closed Drive trace emitter#633
wmadden merged 8 commits into
mainfrom
tml-2721-deterministic-trace-emitter

Conversation

@wmadden
Copy link
Copy Markdown
Contributor

@wmadden wmadden commented May 29, 2026

Drive trace events were hand-emitted: each instrumented skill built the JSON envelope itself and appended the line with printf '%s\n' >> trace.jsonl. That left every field — UUIDs, schema_version, timestamp, and the whole payload — to the agent's discretion, with no validation before the line hit the file. Malformed and drift-prone trace lines were the predictable result. This PR replaces that path with a deterministic emitter that owns the envelope and validates fail-closed, so every emitted line is schema-conformant by construction.

It also resolves a schema-ownership wrinkle that blocked the emitter: the canonical arktype schema lived in the drive-diagnose-run reader, while drive-record-traces (the library skill every emit-site cites) carried a second, hand-maintained markdown copy of the same definitions. The emitter needs to import a real schema to validate against, so the canonical schema moves to drive-record-traces and the reader keeps a vendored copy guarded by a parity test.

Changes

  • Canonical schema relocation (skills-contrib/drive-record-traces/schema.ts): the arktype trace-event schema now lives in the library skill that owns the vocabulary. drive-diagnose-run/schema.ts becomes a vendored copy; a new schema-parity test (wired into test:scripts) fails CI if the two diverge below their one-line banner. The verbatim arktype block in events.md is removed in favour of a pointer to schema.ts, ending the dual-maintenance of the same definitions.
  • Deterministic emitter (skills-contrib/drive-record-traces/emit.ts): a small Node CLI invoked once per event. The caller passes --event + a payload-only --payload JSON (plus --trace-file / --project-run-id); the emitter generates the envelope (event_id, schema_version, ts), rejects any envelope key smuggled into the payload, validates the merged event against the canonical schema, and only then appends one compact line. On a validation failure it exits non-zero and writes nothing. An exported core (emitEvent) keeps the logic unit-testable without spawning a subprocess; emit.test.ts covers the success round-trip and every failure mode. A drive:emit script is added.
  • Protocol docs repointed (emission.md, both skills' SKILL.md): the canonical emit mechanic is now the emitter, not printf. The Append protocol, Canonical Emit snippet, existence-check sketch, and operator checklist all describe invoking emit.ts; emit-time validation is documented as the first gate (read-time validation in drive-diagnose-run is the second). The docs deliberately preserve that dispatch_id/round_id remain orchestrator-generated payload fields — only event_id/schema_version/ts moved into the tool.

Why

The agent's only legitimate creative input to a trace event is the genuine per-event data (which dispatch, which verdict, how many findings). Everything else — envelope construction, append mechanics, schema conformance — is mechanical and was the source of unreliability. Pushing it into a tool that fails closed turns "the agent usually emits valid JSON" into "the file only ever contains valid events." That reliability is a precondition for trusting the diagnostics computed from these traces.

The schema moves to drive-record-traces rather than staying in the reader because the library skill is the canonical owner of the vocabulary, and an emitter that validates needs to import the schema from its own skill — keeping each skill independently installable (the reader vendors a copy under a parity guard rather than importing across the cluster boundary).

Trace-file/project_run_id resolution stays caller-side (the once-per-session lookup in emission.md) rather than moving into the emitter: a --mode flag would re-introduce the direct-change "reuse one timestamp across calls" coordination problem for no real gain.

Scope

In: the drive-record-traces and drive-diagnose-run skill files listed above, and package.json wiring. Out: the event vocabulary and field semantics are unchanged (pure relocation); no reader metric/report behaviour changes; emit-side payload-construction inside each instrumented skill is untouched (the agent still computes payload fields — only the envelope and append moved into the tool).

Summary by CodeRabbit

  • New Features

    • Added a CLI command to emit drive trace events with deterministic envelope construction, fail-closed validation, and single-line JSONL appends.
  • Documentation

    • Clarified emitter workflow and operator checklist; documented the canonical schema as the single source of truth and recommended payload-only invocation semantics.
  • Tests

    • Added tests validating emission behavior (directory creation, single-line appends, validation rejection, and preservation of existing files on failure).

Review Change Stack

wmadden added 5 commits May 29, 2026 17:36
… with parity guard

Move the Drive trace-event arktype schema to skills-contrib/drive-record-traces/schema.ts
as the single source of truth. The existing skills-contrib/drive-diagnose-run/schema.ts
becomes a vendored copy, kept byte-identical (below the one-line banner) by a new
schema-parity test wired into pnpm test:scripts.

- skills-contrib/drive-record-traces/schema.ts — new canonical file with CANONICAL banner
- skills-contrib/drive-diagnose-run/schema.ts — updated with VENDORED banner; verdict field
  reformatted to single line to match canonical (no schema behavioural change); OQ transient
  comment removed and replaced by self-documenting code
- skills-contrib/drive-diagnose-run/test/schema-parity.test.ts — new parity test; strips
  first-line banner, asserts remaining text is byte-identical across both files
- skills-contrib/drive-record-traces/events.md — all verbatim arktype code blocks removed;
  replaced with a short pointer to schema.ts; field tables and JSONL examples preserved
- package.json test:scripts — schema-parity.test.ts wired in

Reader (drive-diagnose-run/{load,cli,metrics,assertions}) continues importing ./schema.ts
unchanged.

Signed-off-by: Will Madden <madden@prisma.io>
Add skills-contrib/drive-record-traces/emit.ts: a Node CLI the orchestrator
invokes once per trace event. The caller supplies only the event type and the
event-specific payload; the emitter owns the envelope (event_id, schema_version,
ts), validates the fully-merged event against the canonical Slice1TraceEvent
schema before writing, and appends exactly one compact JSON line. Validation is
fail-closed: any failure exits non-zero and writes nothing. This replaces the
hand-written printf append path with a tool that makes every emitted line
schema-conformant by construction.

- emit.ts — exported emitEvent() core (build envelope + merge + validate +
  append) plus a thin arg-parsing main() behind the import.meta.url guard;
  rejects envelope keys appearing in the payload, naming the offending key
- test/emit.test.ts — node --test coverage: success round-trip through the
  canonical schema, envelope ownership, parent-dir creation, successive
  appends, and each failure mode (unknown event type, wrong-typed field,
  envelope-key collision, no write on failure)
- package.json — drive:emit script + emit.test.ts wired into test:scripts

Signed-off-by: Will Madden <madden@prisma.io>
The use-pathe-for-paths rule globs **/*.ts repo-wide, so emit.ts and its test
must import path helpers from pathe rather than node:path. fs imports are
unaffected (the rule is path-helpers only).

Signed-off-by: Will Madden <madden@prisma.io>
The deterministic emit.ts CLI now owns the envelope, validation, and append, so
the protocol prose should describe invoking it rather than hand-building the
envelope and hand-appending with printf.

- emission.md: § Append protocol rewritten around the emit.ts invocation (real
  CLI shape, payload-only rule, fail-closed validation rationale); § Schema
  validation now describes emit-time validation as the first gate with read-time
  in drive-diagnose-run as the second; Canonical Emit snippet, Existence-check
  sketch, and Operator checklist all call the emitter; § First emit attributes
  mkdir -p to the emitter
- SKILL.md: documents the shipped emit.ts emitter + prerequisites (Node 24+,
  arktype) per the drive-diagnose-run precedent; What this skill owns and the
  Emit blockquote example updated to the emitter invocation

dispatch_id / round_id remain payload fields the orchestrator generates; only
event_id / schema_version / ts moved to the emitter. No code, schema, reader, or
test touched.

Signed-off-by: Will Madden <madden@prisma.io>
schema.ts stopped being a hand-transcription of the vocabulary when the canonical
schema moved to drive-record-traces/schema.ts and a schema-parity test began
enforcing byte-identical sync. Correct the two stale passages: schema.ts is a
vendored copy of the canonical drive-record-traces/schema.ts; canonical edits
happen there and the parity test fails CI on divergence.

Signed-off-by: Will Madden <madden@prisma.io>
@wmadden wmadden requested a review from a team as a code owner May 29, 2026 16:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: a802eaec-dbba-497d-b379-c6a342976a24

📥 Commits

Reviewing files that changed from the base of the PR and between b55773f and 58ef0d8.

📒 Files selected for processing (1)
  • skills-contrib/drive-record-traces/emit.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills-contrib/drive-record-traces/emit.ts

📝 Walkthrough

Walkthrough

This PR centralizes Drive trace event schema management in drive-record-traces/schema.ts, implements a deterministic emitter CLI (emit.ts) that constructs/validates envelopes and appends compact JSONL lines, updates consumers to import the canonical schema, removes duplicate schema blocks from docs, adds tests, and updates npm scripts.

Changes

Schema Canonicalization and Deterministic Emission

Layer / File(s) Summary
Schema as Single Source of Truth
skills-contrib/drive-record-traces/schema.ts
Added header comment marking schema.ts as canonical and removed redundant inline comments, establishing it as the single source for Drive trace event types.
Emitter Implementation with Envelope and Validation
skills-contrib/drive-record-traces/emit.ts
Implemented emitEvent function and CLI that constructs validated trace envelopes, rejects payloads containing reserved envelope keys (event_id, schema_version, etc.), validates the full event against Slice1TraceEvent at emit time, creates parent directories as needed, and writes one compact JSON line per successful call.
Emitter Tests: Envelope, Validation, and Persistence
skills-contrib/drive-record-traces/test/emit.test.ts
Comprehensive tests for JSONL writing, envelope stamping (event_id, schema_version, ts, event_type, project_run_id, orchestrator_agent_id), directory creation, appending multiple lines, rejection of invalid inputs and envelope-key overrides, and preserving existing files on later validation failures.
Architecture and Emission Protocol Documentation
skills-contrib/drive-record-traces/SKILL.md, skills-contrib/drive-record-traces/emission.md
Updated docs to position emit.ts as the deterministic emitter owning envelope construction/validation/append, require payload-only inputs, reject envelope keys in payloads, and show canonical CLI invocation (--event, --payload, --trace-file, --project-run-id, optional --orchestrator-agent-id).
Consolidate Event Schema References in events.md
skills-contrib/drive-record-traces/events.md
Removed inline Arktype schema code blocks from individual event sections, retained human-readable field tables and examples, and added a "Machine-readable schema" reference to schema.ts.
Refactor Consumer Imports to Canonical Schema
skills-contrib/drive-diagnose-run/{assertions,cli,load,metrics}.ts, drive-diagnose-run/test/*.test.ts
Updated type imports to reference ../../drive-record-traces/schema.ts (TraceEvent, KNOWN_EVENT_TYPES, Slice1TraceEvent) instead of local ./schema.ts copies.
Update Diagnostics Documentation for New Schema Source
skills-contrib/drive-diagnose-run/SKILL.md
Reworded docs to state schemas are imported directly from skills-contrib/drive-record-traces/schema.ts.
Add Emitter to Build and Test Scripts
package.json
Added drive:emit npm script and extended test:scripts to include skills-contrib/drive-record-traces/test/emit.test.ts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • prisma/prisma-next#613: Introduces the diagnostics tool's drive-diagnose-run/schema.ts, which is the foundation being consolidated and repointed to the canonical drive-record-traces/schema.ts in this PR.

Suggested reviewers

  • aqrln

Poem

A rabbit's trace, now stitched in one line 🐇
Schema crowned where all events align,
The emitter checks, stamps, and writes just right,
No stray keys sneak in under the night,
Compact records hopping off in flight ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: introducing a deterministic, fail-closed Drive trace emitter, which is the core purpose of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-2721-deterministic-trace-emitter

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

size-limit report 📦

Path Size
postgres / no-emit 135.09 KB (0%)
postgres / emit 124.88 KB (0%)
mongo / no-emit 73.94 KB (0%)
mongo / emit 68.67 KB (0%)

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@633

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@633

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@633

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@633

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@633

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@633

@prisma-next/extension-cipherstash

npm i https://pkg.pr.new/@prisma-next/extension-cipherstash@633

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@633

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@633

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@633

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@633

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@633

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@633

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@633

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@633

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@633

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@633

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@633

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@633

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@633

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@633

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@633

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@633

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@633

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@633

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@633

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@633

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@633

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@633

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@633

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@633

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@633

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@633

prisma-next

npm i https://pkg.pr.new/prisma-next@633

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@633

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@633

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@633

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@633

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@633

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@633

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@633

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@633

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@633

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@633

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@633

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@633

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@633

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@633

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@633

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@633

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@633

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@633

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@633

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@633

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@633

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@633

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@633

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@633

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@633

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@633

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@633

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@633

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@633

commit: 58ef0d8

…rom drive-record-traces

drive-diagnose-run no longer keeps a local copy of the trace-event schema.
All code, assertions, and tests now import directly from the canonical
skills-contrib/drive-record-traces/schema.ts. The schema-parity test
that guarded the vendored copy is deleted.

- load.ts, metrics.ts, cli.ts: ./schema.ts -> ../drive-record-traces/schema.ts
- assertions/{index,brief,cascade,invariants}.ts: ../schema.ts
  -> ../../drive-record-traces/schema.ts
- test/{invariants,metrics,cascade-brief}.test.ts: same depth change
- drive-diagnose-run/schema.ts: deleted
- drive-diagnose-run/test/schema-parity.test.ts: deleted
- package.json test:scripts: schema-parity.test.ts entry removed
- drive-record-traces/schema.ts: banner updated (no vendoring language)
- drive-record-traces/events.md: § Machine-readable schema updated
- drive-diagnose-run/SKILL.md: removed vendored-copy description

Signed-off-by: Will Madden <madden@prisma.io>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills-contrib/drive-diagnose-run/assertions/brief.ts`:
- Line 1: The import in brief.ts currently uses a TypeScript file extension;
update the import to remove the .ts extension so it reads import type {
TraceEvent } from '../../drive-record-traces/schema' (referencing the TraceEvent
type and the import statement) to comply with the repo rule that TypeScript
imports must omit file extensions.

In `@skills-contrib/drive-diagnose-run/assertions/cascade.ts`:
- Line 1: The import for TraceEvent includes a .ts extension; remove the
extension so the statement imports TraceEvent from
'../../drive-record-traces/schema' (no .ts) to comply with the project guideline
"Never add file extensions to imports in TypeScript."

In `@skills-contrib/drive-diagnose-run/assertions/index.ts`:
- Line 1: Update the import to remove the TypeScript file extension: change the
import that brings in TraceEvent from '../../drive-record-traces/schema.ts' to
use '../../drive-record-traces/schema' (locate the import statement referencing
TraceEvent in assertions/index.ts).

In `@skills-contrib/drive-diagnose-run/test/metrics.test.ts`:
- Line 4: Update the TypeScript import so it omits the .ts extension: change the
import statement that brings in TraceEvent (import type { TraceEvent } from
'../../drive-record-traces/schema.ts') to use '../../drive-record-traces/schema'
instead to comply with the repo's TS import conventions and linter rules.

In `@skills-contrib/drive-record-traces/emit.ts`:
- Line 6: The import in emit.ts includes a .ts extension which violates project
guidelines; update the import statement that references Slice1TraceEvent (import
{ Slice1TraceEvent } from './schema.ts') to remove the file extension so it
reads import { Slice1TraceEvent } from './schema' and ensure any related imports
in the same file follow the same rule.
- Line 81: Replace the bare TypeScript `as` cast on the returned value with the
utility cast function: import castAs from '`@prisma-next/utils/casts`' at the top
of the file and change the return of parsed (the expression `return parsed as
Record<string, unknown>;`) to use castAs<Record<string, unknown>>(parsed) so the
runtime-safe cast utility is used instead of a bare `as`.

In `@skills-contrib/drive-record-traces/test/emit.test.ts`:
- Around line 7-8: The imports in the test use explicit .ts extensions; update
the import statements that reference emitEvent and Slice1TraceEvent (currently
importing from '../emit.ts' and '../schema.ts') to remove the .ts file
extensions (use '../emit' and '../schema') so they comply with the TypeScript
import guideline.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 7fecaaea-2a02-496c-8881-b1fa3d8b815a

📥 Commits

Reviewing files that changed from the base of the PR and between ab6eaaa and b55773f.

📒 Files selected for processing (18)
  • package.json
  • skills-contrib/drive-diagnose-run/SKILL.md
  • skills-contrib/drive-diagnose-run/assertions/brief.ts
  • skills-contrib/drive-diagnose-run/assertions/cascade.ts
  • skills-contrib/drive-diagnose-run/assertions/index.ts
  • skills-contrib/drive-diagnose-run/assertions/invariants.ts
  • skills-contrib/drive-diagnose-run/cli.ts
  • skills-contrib/drive-diagnose-run/load.ts
  • skills-contrib/drive-diagnose-run/metrics.ts
  • skills-contrib/drive-diagnose-run/test/cascade-brief.test.ts
  • skills-contrib/drive-diagnose-run/test/invariants.test.ts
  • skills-contrib/drive-diagnose-run/test/metrics.test.ts
  • skills-contrib/drive-record-traces/SKILL.md
  • skills-contrib/drive-record-traces/emission.md
  • skills-contrib/drive-record-traces/emit.ts
  • skills-contrib/drive-record-traces/events.md
  • skills-contrib/drive-record-traces/schema.ts
  • skills-contrib/drive-record-traces/test/emit.test.ts

Comment thread skills-contrib/drive-diagnose-run/assertions/brief.ts
Comment thread skills-contrib/drive-diagnose-run/assertions/cascade.ts
Comment thread skills-contrib/drive-diagnose-run/assertions/index.ts
Comment thread skills-contrib/drive-diagnose-run/test/metrics.test.ts
Comment thread skills-contrib/drive-record-traces/emit.ts
Comment thread skills-contrib/drive-record-traces/emit.ts Outdated
Comment thread skills-contrib/drive-record-traces/test/emit.test.ts
wmadden and others added 2 commits May 30, 2026 15:38
Factor the object-shape check into an isRecord type predicate so
TypeScript narrows parsed to Record<string,unknown> without a cast.
Keeps identical behaviour and error messages.

Signed-off-by: Will Madden <madden@prisma.io>
@wmadden wmadden merged commit 5a32a1b into main May 30, 2026
21 checks passed
@wmadden wmadden deleted the tml-2721-deterministic-trace-emitter branch May 30, 2026 13:56
wmadden pushed a commit that referenced this pull request May 30, 2026
Scaffold the "Drive — Judge + live-experiment harness" project workspace:
two-tier correctness-first scorecard, an LLM judge calibrated against an
accreting instrumented-run corpus, and an SDK-spawned k=N A/B harness.

Four slices (TML-2720 scorecard+vocabulary, TML-2735 golden-case harness,
TML-2736 judge, TML-2737 experiment engine); two foundation slices run in
parallel, judge + engine stack on top. Trace.jsonl carries the first
natively-instrumented project-started/spec-authored/plan-authored events,
emitted via the deterministic emitter merged in PR #633.

Signed-off-by: wmadden-electric <286902546+wmadden-electric@users.noreply.github.com>
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.

2 participants