@attalabs/vinaya 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/aeg-root/contracts/developer-reviewer.md +1 -1
- package/aeg-root/contracts/planner-operator.md +1 -1
- package/aeg-root/contracts/principal-operator.md +6 -6
- package/aeg-root/contracts/security-archivist.md +1 -1
- package/aeg-root/enforcement.md +14 -14
- package/aeg-root/process.md +3 -1
- package/aeg-root/roles/archivist.md +2 -2
- package/aeg-root/roles/developer/reference.md +36 -37
- package/aeg-root/roles/developer.md +9 -5
- package/aeg-root/roles/operator.md +18 -18
- package/aeg-root/roles/planner/reference.md +15 -4
- package/aeg-root/roles/principal.md +6 -1
- package/aeg-root/roles/reviewer.md +14 -6
- package/aeg-root/roles/security.md +22 -11
- package/aeg-root/roles/tranche-archivist.md +14 -2
- package/aeg-root/state-machine.md +12 -11
- package/aeg-root/templates/brief-template.md +8 -6
- package/aeg-root/templates/pr-report-template.md +1 -9
- package/aeg-root/tranche-model.md +10 -4
- package/dist/checks/bin/check-body-bare-digits.js +823 -595
- package/dist/checks/bin/check-branch-topology.js +796 -478
- package/dist/checks/bin/check-brief-shape.js +824 -596
- package/dist/checks/bin/check-changeset-coverage.js +1337 -747
- package/dist/checks/bin/check-closes-n.js +796 -478
- package/dist/checks/bin/check-coherence.js +914 -611
- package/dist/checks/bin/check-dead-branch-push.js +705 -462
- package/dist/checks/bin/check-dispatch-readiness.js +941 -624
- package/dist/checks/bin/check-doc-coverage-push.js +1332 -742
- package/dist/checks/bin/check-doc-coverage.js +1339 -742
- package/dist/checks/bin/check-doctrine-no-procedures.js +821 -593
- package/dist/checks/bin/check-doctrine-portability.js +1332 -742
- package/dist/checks/bin/check-evidence-fresh.js +1339 -918
- package/dist/checks/bin/check-exec-bits.js +1331 -741
- package/dist/checks/bin/check-first-push-dispatch.js +917 -614
- package/dist/checks/bin/check-issue-assignment.js +796 -478
- package/dist/checks/bin/check-issue-milestone-attach.js +705 -462
- package/dist/checks/bin/check-issue-objectives-numbering.js +821 -593
- package/dist/checks/bin/check-issue-parts-coverage.js +705 -462
- package/dist/checks/bin/check-issue-surface-globs.js +925 -613
- package/dist/checks/bin/check-issue-title-grammar.js +705 -462
- package/dist/checks/bin/check-issue-tranche-label.js +705 -462
- package/dist/checks/bin/check-main-branch-refusal.js +705 -462
- package/dist/checks/bin/check-no-disk-state.js +705 -462
- package/dist/checks/bin/check-pr-premise-reassert.js +821 -593
- package/dist/checks/bin/check-pr-report-density.js +705 -462
- package/dist/checks/bin/check-principal-test-plan-wait.js +705 -462
- package/dist/checks/bin/check-quoted-command.js +1816 -1228
- package/dist/checks/bin/check-reader-resolvable-prose.js +1835 -1235
- package/dist/checks/bin/check-registry-gates.js +993 -526
- package/dist/checks/bin/check-retired-vocabulary.js +1810 -1222
- package/dist/checks/bin/check-review-gate.js +832 -604
- package/dist/checks/bin/check-single-plan-pr.js +705 -462
- package/dist/checks/bin/check-surface-scope.js +796 -478
- package/dist/checks/bin/check-test-plan.js +705 -462
- package/dist/checks/bin/check-token-collection-wired.js +705 -462
- package/dist/checks/bin/check-workspace-escape.js +1332 -742
- package/dist/checks/bin/verify-dispatch.js +3849 -0
- package/dist/index.js +20876 -10091
- package/dist/lib/pre-push-cache-test-run.js +1045 -682
- package/dist/lib/pre-push-changed-files.js +16 -11
- package/dist/lib/pre-push-select-tests.js +785 -500
- package/package.json +2 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +7 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +71 -15
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +51 -12
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/index.ts +1 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +31 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +50 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +443 -28
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +18 -5
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +6 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +13 -13
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +46 -110
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +169 -11
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +32 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/index.ts +3 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/published-prose.ts +30 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +6 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +0 -1
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +82 -8
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +754 -7
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/leftover-detection.ts +24 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/custom.ts +157 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +44 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/executions.ts +493 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/fact-sheets.ts +111 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/generator.ts +155 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/fixtures/index.ts +12 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +128 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/catches.ts +63 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/checks.ts +146 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/common.ts +137 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/completion.ts +137 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/convergence.ts +420 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/determinism.ts +65 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/index.ts +69 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/judgment.ts +132 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/labels.ts +21 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/time.ts +167 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/questions/usage.ts +139 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +226 -15
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/store.ts +7 -7
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/cache-contract.ts +207 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/contracts.ts +105 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/engine.ts +308 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/index.ts +34 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/measured.ts +20 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/memory-cache.ts +78 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/normalize.ts +156 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/sync/row.ts +103 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +34 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +70 -6
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +52 -4
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +19 -14
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +201 -24
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +5 -2
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-phase-history.ts +46 -0
- package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +15 -28
- package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/app-path-routes-manifest.json +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/required-server-files.json +0 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/routes-manifest.json +0 -6
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js +5 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app-paths-manifest.json +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/044u_vinaya-studio_web_src_app_studio_backlog__components_BacklogTable_tsx_0oha0bt._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/1q96_modules_@clerk_nextjs_dist_esm_app-router_client_keyless-creator-reader_0lom2js.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1bh2awk._.js → [root-of-the-server]__038scsm._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1widio3._.js → [root-of-the-server]__03__s45._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{_15gdg48._.js → [root-of-the-server]__04adkz-._.js} +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__05zwn98._.js +14 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__08e39jo._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0h9yhwx._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1wy7w66._.js → [root-of-the-server]__0jdjsxe._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__10riywf._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__13znegp._.js → [root-of-the-server]__134x-65._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__13eeix2._.js → [root-of-the-server]__1_l_l1u._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1f4bb3_._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1dky4g0._.js → [root-of-the-server]__1my83lt._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1ng2x88._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__040smoa._.js → [root-of-the-server]__1qpc6at._.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1snpgaw._.js +56 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_06h3wbl._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0gs4gvl._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_121lrn5._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1o4v6lb._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1q7h5mz._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1ztd4i3._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_209-ugd._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_214d71c._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/apps_vinaya-studio_web_src_app_studio_projects_[name]_tranches_[slug]_17dho0f._.js +3 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_server-actions_1x7vfhn.js +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_next_dist_1lzmr5o._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_animate_components_index_ts_186fje1._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_basic_components_index_ts_0xk1vda._.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/09fcolor69bun.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0lcwmwzxacdie.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ojry7lrbzkfd.css +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1-acpmtfmrc35.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1giu47hrbhroj.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1shz6lwruld25.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1ytvuy1mmnc6j.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3oxhhhm_psozq.js → 21a6_5cr956wj.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{2o9l0b7eqbr57.js → 2f2y8xxok8zph.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2g8mwnydod96u.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3li0ueedy-ozv.js → 2nrnuawd5fwpv.js} +1 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2nw47832_uvfe.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2qdxnj8wk2h0s.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3lqjwjrcvq481.js → 2xevgia1h8g0y.js} +2 -2
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3b9q75p-z5ma5.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3cv-oe7153242.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3m310lbjj4p5u.js +1 -0
- package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
- package/studio-standalone/apps/vinaya-studio/web/server.js +1 -1
- package/dist/checks/bin/check-token-report.js +0 -6526
- package/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/aeg-core/bin/verify-coherence.ts +0 -1089
- package/studio-standalone/_node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +0 -6
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/app-paths-manifest.json +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/build-manifest.json +0 -9
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route/server-reference-manifest.json +0 -4
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js +0 -6
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.map +0 -5
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route_client-reference-manifest.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/044u_vinaya-studio_web__next-internal_server_app_api_coherence_route_actions_1rnzea1.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[externals]__0cki-x_._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +0 -15
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[turbopack]_runtime.js +0 -903
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__074w9nf._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ln09ua._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0oegopp._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__13yxbjd._.js +0 -51
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1duqmtm._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1z7dml9._.js +0 -9
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0bfs_u4._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0g8_eot._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0hrh_v-._.js +0 -181
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0i4-dea._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0o54suy._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0rxd7s0._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0y1jv16._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_151m4rz._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1a9dieq._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1sxsf5q._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1sy_yfr._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_219v2an._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/apps_vinaya-studio_web_src_app_studio_projects_[name]_tranches_[slug]_05ufo8i._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_basic_components_form_input_tsx_0es8d8b._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_brutal_components_index_ts_0n_lcc4._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/packages_ui_libraries_retro_components_index_ts_0wvpm_z._.js +0 -3
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/00z3-ljjd1gj9.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bjnj-5fy4e7l.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0c8uwz_-m8s99.js +0 -165
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ct0c-xj0baf6.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ko698wh8xx2g.css +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0t5n_r4xm__t-.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0vc2u252q5q6o.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/16r_o07lw0vm0.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1cah7_e5a1zvu.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/1gjo9-6dz7nup.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/24tz8aro1uto4.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2ef2g5fozszw7.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2ka8dg687auhj.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2pf3f50gbrkyv.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2qq49pct3q51-.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3et66z7glk65w.js +0 -1
- package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3y6u3prmrkea-.js +0 -1
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yNZEFRSjP9BLUfdf96Eol}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yNZEFRSjP9BLUfdf96Eol}/_clientMiddlewareManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/web/.next/static/{z1fTSBP6ZlUjObzFIp-qq → yNZEFRSjP9BLUfdf96Eol}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Named fixture executions — realistic, hand-checkable streams of typed log
|
|
3
|
+
* events, each built to exercise one behaviour a reader of the log must get
|
|
4
|
+
* right. They are generated, never committed as data: every valid line is made
|
|
5
|
+
* by the real header builder (`../envelope`), and the test beside this file
|
|
6
|
+
* parses each one with the real event schema, so a schema change that would
|
|
7
|
+
* invalidate a fixture fails there first. A line that is deliberately not
|
|
8
|
+
* valid (an unknown version, a failing line, a repeat) is raw text kept beside
|
|
9
|
+
* the valid ones and marked with how a reader should classify it.
|
|
10
|
+
*
|
|
11
|
+
* The hand-written answer key for each execution is in `./fact-sheets`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
createRecorder,
|
|
16
|
+
FIXTURE_REPO,
|
|
17
|
+
FIXTURE_SEED,
|
|
18
|
+
LOW_TRUST_VINAYA_VERSION,
|
|
19
|
+
type EmitOptions,
|
|
20
|
+
type FixtureLine,
|
|
21
|
+
type Recorder
|
|
22
|
+
} from './generator'
|
|
23
|
+
import type { HeaderMetaV1, HeaderMetaV2, Role } from '../schema'
|
|
24
|
+
|
|
25
|
+
export const EXECUTION_NAMES = [
|
|
26
|
+
'green-one-round',
|
|
27
|
+
'three-rounds-recurring-finding',
|
|
28
|
+
'paused-and-resumed',
|
|
29
|
+
'escalated-handoff',
|
|
30
|
+
'gate-two-commits',
|
|
31
|
+
'gate-no-commit',
|
|
32
|
+
'gate-same-commit-twice',
|
|
33
|
+
'usage-and-models',
|
|
34
|
+
'historical-and-hostile-lines'
|
|
35
|
+
] as const
|
|
36
|
+
export type ExecutionName = (typeof EXECUTION_NAMES)[number]
|
|
37
|
+
|
|
38
|
+
export type FixtureExecution = {
|
|
39
|
+
name: ExecutionName
|
|
40
|
+
description: string
|
|
41
|
+
/** The execution's lines, in the order they were stored. */
|
|
42
|
+
lines: readonly FixtureLine[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type Finding = {
|
|
46
|
+
id: string
|
|
47
|
+
severity: string
|
|
48
|
+
severity_scale: string
|
|
49
|
+
policy_treatment: 'blocking' | 'non_blocking'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function finding(id: string, severity: string, blocking: boolean): Finding {
|
|
53
|
+
return {
|
|
54
|
+
id,
|
|
55
|
+
severity,
|
|
56
|
+
severity_scale: 'code-review',
|
|
57
|
+
policy_treatment: blocking ? 'blocking' : 'non_blocking'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type LoopEmit = (event: string, fields: Record<string, unknown>, options?: EmitOptions) => Record<string, unknown>
|
|
62
|
+
|
|
63
|
+
function openLoop(rec: Recorder): LoopEmit {
|
|
64
|
+
const loopId = `loop-${rec.hex(8)}`
|
|
65
|
+
const emit: LoopEmit = (event, fields, options) =>
|
|
66
|
+
rec.emit(
|
|
67
|
+
{ kind: 'dev_review_loop', event, loop_id: loopId, ...fields },
|
|
68
|
+
{ host: 'loop', ...(typeof fields.round === 'number' ? { round: fields.round } : {}), ...options }
|
|
69
|
+
)
|
|
70
|
+
emit('loop_started', {
|
|
71
|
+
task: rec.issue,
|
|
72
|
+
policy: {
|
|
73
|
+
max_rounds: 5,
|
|
74
|
+
reviewers: ['code-reviewer'],
|
|
75
|
+
models: { developer: 'sonnet', 'code-reviewer': 'opus' }
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
return emit
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** One dispatch of a role: the `dispatched` line now, the `outcome_received` line when the returned function is called. */
|
|
82
|
+
function dispatch(rec: Recorder, target: Role, model: string, round: number) {
|
|
83
|
+
const effectId = `eff-${rec.hex(8)}`
|
|
84
|
+
const shared = { kind: 'dispatch', target_role: target, model, round, effect_id: effectId }
|
|
85
|
+
const options = { round, provenance: 'parent_attributed' as const }
|
|
86
|
+
rec.emit({ ...shared, event: 'dispatched', prompt_hash: `fixture-prompt-${rec.hex(8)}` }, options)
|
|
87
|
+
return (outcome: Record<string, unknown>) =>
|
|
88
|
+
rec.emit(
|
|
89
|
+
{
|
|
90
|
+
...shared,
|
|
91
|
+
event: 'outcome_received',
|
|
92
|
+
outcome,
|
|
93
|
+
usage: { input: rec.int(2000, 9000), output: rec.int(300, 1500) }
|
|
94
|
+
},
|
|
95
|
+
options
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
type RoundSpec = {
|
|
100
|
+
n: number
|
|
101
|
+
base: string
|
|
102
|
+
head: string
|
|
103
|
+
/** What this round's reviewer reports. */
|
|
104
|
+
findings: Finding[]
|
|
105
|
+
/** The loop's own comparison with the round before — absent in round 1. */
|
|
106
|
+
compared?: { open: string[]; resolved: string[]; new: string[]; recurring: string[] }
|
|
107
|
+
/** The developer's stated confidence, as `gate_result_read` records it. */
|
|
108
|
+
confidence?: Record<string, unknown>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** One full review round on a green gate: developer turn, typecheck, gate read, reviewer turn, verdicts, comparison, end. Returns the files it changed. */
|
|
112
|
+
function runRound(rec: Recorder, loop: LoopEmit, spec: RoundSpec): number {
|
|
113
|
+
const { n, base, head, findings } = spec
|
|
114
|
+
const blockers = findings.filter((f) => f.policy_treatment === 'blocking').length
|
|
115
|
+
const approved = blockers === 0
|
|
116
|
+
loop('round_started', { round: n, base_head: base })
|
|
117
|
+
const developer = dispatch(rec, 'developer', 'sonnet', n)
|
|
118
|
+
developer(
|
|
119
|
+
n === 1
|
|
120
|
+
? { type: 'pr_opened', pr: rec.pr, head }
|
|
121
|
+
: { type: 'round_pushed', pr: rec.pr, head, comment_id: rec.commentId() }
|
|
122
|
+
)
|
|
123
|
+
rec.emit(
|
|
124
|
+
{
|
|
125
|
+
kind: 'gate',
|
|
126
|
+
event: 'checked',
|
|
127
|
+
check: 'typecheck',
|
|
128
|
+
check_version: '1',
|
|
129
|
+
policy_version: null,
|
|
130
|
+
input_fingerprint: `fp-${rec.hex(8)}`,
|
|
131
|
+
outcome: 'pass'
|
|
132
|
+
},
|
|
133
|
+
{ round: n, sha: head, host: 'ci' }
|
|
134
|
+
)
|
|
135
|
+
loop('gate_result_read', { round: n, head, green: true, ...spec.confidence })
|
|
136
|
+
const reviewer = dispatch(rec, 'code-reviewer', 'opus', n)
|
|
137
|
+
reviewer({
|
|
138
|
+
type: 'verdict',
|
|
139
|
+
verdict: approved ? 'APPROVE' : 'REQUEST CHANGES',
|
|
140
|
+
head,
|
|
141
|
+
comment_id: rec.commentId(),
|
|
142
|
+
objectives: [{ id: 'O1', met: approved }],
|
|
143
|
+
findings
|
|
144
|
+
})
|
|
145
|
+
loop('verdicts_read', { round: n, head, all_approve: approved, blockers, findings })
|
|
146
|
+
if (spec.compared) loop('findings_compared', { round: n, ...spec.compared })
|
|
147
|
+
const filesChanged = rec.int(2, 9)
|
|
148
|
+
loop('round_ended', {
|
|
149
|
+
round: n,
|
|
150
|
+
base_head: base,
|
|
151
|
+
head,
|
|
152
|
+
files_changed: filesChanged,
|
|
153
|
+
insertions: rec.int(20, 200),
|
|
154
|
+
deletions: rec.int(0, 60),
|
|
155
|
+
wall_ms: rec.int(60_000, 600_000),
|
|
156
|
+
outcome: approved ? 'green' : 'changes_requested'
|
|
157
|
+
})
|
|
158
|
+
return filesChanged
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** The loop's green ending: the stop condition, then the journal. */
|
|
162
|
+
function finishGreen(rec: Recorder, loop: LoopEmit, rounds: number, finalHead: string, filesTotal: number): void {
|
|
163
|
+
loop('stop_condition_met', { round: rounds, condition: 'green' })
|
|
164
|
+
const elapsed = rec.elapsedMs()
|
|
165
|
+
loop('journal_finalized', {
|
|
166
|
+
rounds,
|
|
167
|
+
total_wall_ms: elapsed,
|
|
168
|
+
time_to_green_ms: elapsed,
|
|
169
|
+
files_changed_total: filesTotal,
|
|
170
|
+
final_head: finalHead,
|
|
171
|
+
result: 'merged_ready'
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** One run of a check. `sha` absent records no commit at all. */
|
|
176
|
+
function gateRun(rec: Recorder, check: string, fingerprint: string, outcome: string, sha?: string): void {
|
|
177
|
+
rec.emit(
|
|
178
|
+
{
|
|
179
|
+
kind: 'gate',
|
|
180
|
+
event: 'checked',
|
|
181
|
+
check,
|
|
182
|
+
check_version: '1',
|
|
183
|
+
policy_version: null,
|
|
184
|
+
input_fingerprint: fingerprint,
|
|
185
|
+
outcome
|
|
186
|
+
},
|
|
187
|
+
{ host: 'ci', ...(sha ? { sha } : {}) }
|
|
188
|
+
)
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function usage(
|
|
192
|
+
rec: Recorder,
|
|
193
|
+
model: string | null,
|
|
194
|
+
semantics: 'cumulative' | 'delta',
|
|
195
|
+
units: { input: number | null; output: number | null; cache: number | null },
|
|
196
|
+
unknownReason: string | null = null
|
|
197
|
+
): void {
|
|
198
|
+
rec.emit(
|
|
199
|
+
{ kind: 'usage', event: 'observed', model, source: 'claude', semantics, units, unknown_reason: unknownReason },
|
|
200
|
+
{ host: 'cli' }
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function roleAttempt(rec: Recorder, role: Role, model: string, attempt: number, outcome: string): void {
|
|
205
|
+
rec.emit(
|
|
206
|
+
{
|
|
207
|
+
kind: 'role_attempt',
|
|
208
|
+
event: 'attempted',
|
|
209
|
+
actor: 'claude',
|
|
210
|
+
attempt,
|
|
211
|
+
effect_id: `eff-${rec.hex(8)}`,
|
|
212
|
+
model,
|
|
213
|
+
outcome,
|
|
214
|
+
usage: null
|
|
215
|
+
},
|
|
216
|
+
{ role, host: 'loop' }
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** A completed operation — the smallest event, so a line's header is all that differs between the historical lines below. */
|
|
221
|
+
const operationFields = {
|
|
222
|
+
kind: 'operation',
|
|
223
|
+
event: 'completed',
|
|
224
|
+
payload: {},
|
|
225
|
+
operation: 'authenticate-invocation',
|
|
226
|
+
target: null,
|
|
227
|
+
result: 'ok',
|
|
228
|
+
error_class: null
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type Scenario = { description: string; issue: number; build: (rec: Recorder) => void }
|
|
232
|
+
|
|
233
|
+
const SCENARIOS: Record<ExecutionName, Scenario> = {
|
|
234
|
+
'green-one-round': {
|
|
235
|
+
description: 'A unit of work that finishes green in a single round, with no findings.',
|
|
236
|
+
issue: 101,
|
|
237
|
+
build(rec) {
|
|
238
|
+
const loop = openLoop(rec)
|
|
239
|
+
const head = rec.sha()
|
|
240
|
+
const files = runRound(rec, loop, { n: 1, base: rec.sha(), head, findings: [] })
|
|
241
|
+
finishGreen(rec, loop, 1, head, files)
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
'three-rounds-recurring-finding': {
|
|
245
|
+
description:
|
|
246
|
+
'Three rounds: one finding recurs in round 2 beside a new one, and both are resolved in round 3. The developer states confidence from round 2 on — once straight away, once after the one extra turn.',
|
|
247
|
+
issue: 102,
|
|
248
|
+
build(rec) {
|
|
249
|
+
const loop = openLoop(rec)
|
|
250
|
+
const [h0, h1, h2, h3] = [rec.sha(), rec.sha(), rec.sha(), rec.sha()] as [string, string, string, string]
|
|
251
|
+
const auth = finding('fnd-auth-1', 'MAJOR', true)
|
|
252
|
+
const docs = finding('fnd-docs-2', 'MINOR', false)
|
|
253
|
+
let files = runRound(rec, loop, { n: 1, base: h0, head: h1, findings: [auth] })
|
|
254
|
+
files += runRound(rec, loop, {
|
|
255
|
+
n: 2,
|
|
256
|
+
base: h1,
|
|
257
|
+
head: h2,
|
|
258
|
+
findings: [auth, docs],
|
|
259
|
+
compared: { open: ['fnd-auth-1', 'fnd-docs-2'], resolved: [], new: ['fnd-docs-2'], recurring: ['fnd-auth-1'] },
|
|
260
|
+
confidence: {
|
|
261
|
+
confidence_value: 70,
|
|
262
|
+
confidence_reason: 'the auth path is covered, the docs are not',
|
|
263
|
+
extra_turn_spent: false
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
files += runRound(rec, loop, {
|
|
267
|
+
n: 3,
|
|
268
|
+
base: h2,
|
|
269
|
+
head: h3,
|
|
270
|
+
findings: [],
|
|
271
|
+
compared: { open: [], resolved: ['fnd-auth-1', 'fnd-docs-2'], new: [], recurring: [] },
|
|
272
|
+
confidence: {
|
|
273
|
+
confidence_value: 92,
|
|
274
|
+
confidence_reason: 'every finding is addressed and covered by a test',
|
|
275
|
+
extra_turn_spent: true
|
|
276
|
+
}
|
|
277
|
+
})
|
|
278
|
+
finishGreen(rec, loop, 3, h3, files)
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
'paused-and-resumed': {
|
|
282
|
+
description:
|
|
283
|
+
'Round 1 asks for changes and the loop pauses for a principal item; the principal resumes it, and round 2 finishes green.',
|
|
284
|
+
issue: 103,
|
|
285
|
+
build(rec) {
|
|
286
|
+
const loop = openLoop(rec)
|
|
287
|
+
const [h0, h1, h2] = [rec.sha(), rec.sha(), rec.sha()] as [string, string, string]
|
|
288
|
+
const queue = finding('fnd-q-1', 'MAJOR', true)
|
|
289
|
+
let files = runRound(rec, loop, { n: 1, base: h0, head: h1, findings: [queue] })
|
|
290
|
+
loop('paused', { round: 1, reason: 'principal_item' })
|
|
291
|
+
loop('resumed', { round: 1, by: 'principal' })
|
|
292
|
+
files += runRound(rec, loop, {
|
|
293
|
+
n: 2,
|
|
294
|
+
base: h1,
|
|
295
|
+
head: h2,
|
|
296
|
+
findings: [],
|
|
297
|
+
compared: { open: [], resolved: ['fnd-q-1'], new: [], recurring: [] }
|
|
298
|
+
})
|
|
299
|
+
finishGreen(rec, loop, 2, h2, files)
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
'escalated-handoff': {
|
|
303
|
+
description:
|
|
304
|
+
'The developer escalates a strategy question in round 1; it becomes a handoff to a human, and the loop stops unresolved.',
|
|
305
|
+
issue: 104,
|
|
306
|
+
build(rec) {
|
|
307
|
+
const loop = openLoop(rec)
|
|
308
|
+
const base = rec.sha()
|
|
309
|
+
loop('round_started', { round: 1, base_head: base })
|
|
310
|
+
const developer = dispatch(rec, 'developer', 'sonnet', 1)
|
|
311
|
+
developer({ type: 'escalation', class: 'strategy', comment_id: rec.commentId() })
|
|
312
|
+
rec.emit(
|
|
313
|
+
{
|
|
314
|
+
kind: 'handoff',
|
|
315
|
+
event: 'raised',
|
|
316
|
+
class: 'strategy',
|
|
317
|
+
reason: 'the brief assumes an approach the codebase no longer takes',
|
|
318
|
+
requested_decision: 'keep the brief as written, or re-plan the task'
|
|
319
|
+
},
|
|
320
|
+
{ round: 1, role: 'developer', host: 'loop' }
|
|
321
|
+
)
|
|
322
|
+
loop('stop_condition_met', { round: 1, condition: 'escalated' })
|
|
323
|
+
loop('round_ended', {
|
|
324
|
+
round: 1,
|
|
325
|
+
base_head: base,
|
|
326
|
+
head: base,
|
|
327
|
+
files_changed: 0,
|
|
328
|
+
insertions: 0,
|
|
329
|
+
deletions: 0,
|
|
330
|
+
wall_ms: rec.int(60_000, 600_000),
|
|
331
|
+
outcome: 'escalated'
|
|
332
|
+
})
|
|
333
|
+
loop('journal_finalized', {
|
|
334
|
+
rounds: 1,
|
|
335
|
+
total_wall_ms: rec.elapsedMs(),
|
|
336
|
+
time_to_green_ms: null,
|
|
337
|
+
files_changed_total: 0,
|
|
338
|
+
final_head: base,
|
|
339
|
+
result: 'stopped'
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
'gate-two-commits': {
|
|
344
|
+
description:
|
|
345
|
+
'The same check on the same input fingerprint at two different commits, failing at the first and passing at the second.',
|
|
346
|
+
issue: 105,
|
|
347
|
+
build(rec) {
|
|
348
|
+
const fingerprint = `fp-${rec.hex(8)}`
|
|
349
|
+
gateRun(rec, 'test', fingerprint, 'fail', rec.sha())
|
|
350
|
+
gateRun(rec, 'test', fingerprint, 'pass', rec.sha())
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
'gate-no-commit': {
|
|
354
|
+
description:
|
|
355
|
+
'The same check on the same input fingerprint twice with no commit recorded, passing and then failing.',
|
|
356
|
+
issue: 106,
|
|
357
|
+
build(rec) {
|
|
358
|
+
const fingerprint = `fp-${rec.hex(8)}`
|
|
359
|
+
gateRun(rec, 'lint', fingerprint, 'pass')
|
|
360
|
+
gateRun(rec, 'lint', fingerprint, 'fail')
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
'gate-same-commit-twice': {
|
|
364
|
+
description: 'A check that passes at one commit twice, on the same input fingerprint.',
|
|
365
|
+
issue: 107,
|
|
366
|
+
build(rec) {
|
|
367
|
+
const fingerprint = `fp-${rec.hex(8)}`
|
|
368
|
+
const sha = rec.sha()
|
|
369
|
+
gateRun(rec, 'build', fingerprint, 'pass', sha)
|
|
370
|
+
gateRun(rec, 'build', fingerprint, 'pass', sha)
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
'usage-and-models': {
|
|
374
|
+
description:
|
|
375
|
+
'Two cumulative and three delta usage observations across two models, one of them with every unit unknown, and a role attempt retried with its usage unknown both times.',
|
|
376
|
+
issue: 108,
|
|
377
|
+
build(rec) {
|
|
378
|
+
usage(rec, 'opus', 'cumulative', { input: 1000, output: 200, cache: 500 })
|
|
379
|
+
usage(rec, 'opus', 'cumulative', { input: 2500, output: 600, cache: 1200 })
|
|
380
|
+
usage(rec, 'sonnet', 'delta', { input: 300, output: 80, cache: 0 })
|
|
381
|
+
usage(rec, 'sonnet', 'delta', { input: 150, output: 40, cache: null })
|
|
382
|
+
usage(rec, 'sonnet', 'delta', { input: null, output: null, cache: null }, 'the vendor reported no usage')
|
|
383
|
+
roleAttempt(rec, 'developer', 'sonnet', 1, 'infrastructure_failed')
|
|
384
|
+
roleAttempt(rec, 'developer', 'sonnet', 2, 'completed')
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
'historical-and-hostile-lines': {
|
|
388
|
+
description:
|
|
389
|
+
'Lines a reader meets in an old or damaged store: schema 1, schema 2, a low-trust line from a CLI older than 0.33.0 with no attribution, a current line, a line of a schema version no build knows, a line that fails validation, and one event delivered twice.',
|
|
390
|
+
issue: 109,
|
|
391
|
+
build(rec) {
|
|
392
|
+
const common = { repo: FIXTURE_REPO, doctrine: 'fixture-doctrine-old', host: 'cli' as const }
|
|
393
|
+
const v1: HeaderMetaV1 = {
|
|
394
|
+
schema: 1,
|
|
395
|
+
ts: rec.tick().toISOString(),
|
|
396
|
+
run_id: `run-legacy-${rec.hex(6)}`,
|
|
397
|
+
seq: 0,
|
|
398
|
+
vinaya: '0.24.0',
|
|
399
|
+
machine: rec.hex(64),
|
|
400
|
+
...common
|
|
401
|
+
}
|
|
402
|
+
rec.push({ meta: v1, subject: { issue: rec.issue, role: 'developer' }, ...operationFields })
|
|
403
|
+
|
|
404
|
+
const v2Base: Omit<HeaderMetaV2, 'run_id' | 'ts' | 'machine' | 'event_id' | 'process_id'> = {
|
|
405
|
+
schema: 2,
|
|
406
|
+
seq: 3,
|
|
407
|
+
vinaya: '0.31.0',
|
|
408
|
+
actor_id: 'developer',
|
|
409
|
+
lineage: { run: null, attempt: null, parent: null },
|
|
410
|
+
input_versions: { objectives_version: null, brief_hash: null, ruling_ordinal: null, policy_digest: null },
|
|
411
|
+
provenance: 'env_correlated',
|
|
412
|
+
...common
|
|
413
|
+
}
|
|
414
|
+
const v2: HeaderMetaV2 = {
|
|
415
|
+
...v2Base,
|
|
416
|
+
ts: rec.tick().toISOString(),
|
|
417
|
+
run_id: `run-legacy-${rec.hex(6)}`,
|
|
418
|
+
machine: rec.hex(64),
|
|
419
|
+
event_id: `evt-${rec.hex(12)}`,
|
|
420
|
+
process_id: `proc-${rec.hex(8)}`
|
|
421
|
+
}
|
|
422
|
+
rec.push({ meta: v2, subject: { issue: rec.issue, role: 'developer' }, ...operationFields })
|
|
423
|
+
|
|
424
|
+
const lowTrust: HeaderMetaV2 = {
|
|
425
|
+
...v2,
|
|
426
|
+
ts: rec.tick().toISOString(),
|
|
427
|
+
run_id: `run-legacy-${rec.hex(6)}`,
|
|
428
|
+
seq: 0,
|
|
429
|
+
vinaya: LOW_TRUST_VINAYA_VERSION,
|
|
430
|
+
machine: rec.hex(64),
|
|
431
|
+
event_id: `evt-${rec.hex(12)}`,
|
|
432
|
+
process_id: `proc-${rec.hex(8)}`,
|
|
433
|
+
actor_id: null,
|
|
434
|
+
provenance: 'unavailable'
|
|
435
|
+
}
|
|
436
|
+
rec.push({ meta: lowTrust, subject: { issue: null, role: 'unattributed' }, ...operationFields })
|
|
437
|
+
|
|
438
|
+
const current = rec.emit(
|
|
439
|
+
{
|
|
440
|
+
kind: 'operation',
|
|
441
|
+
event: 'completed',
|
|
442
|
+
operation: 'authenticate-invocation',
|
|
443
|
+
target: null,
|
|
444
|
+
result: 'ok',
|
|
445
|
+
error_class: null
|
|
446
|
+
},
|
|
447
|
+
{ host: 'cli' }
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
const future = rec.build(
|
|
451
|
+
{
|
|
452
|
+
kind: 'operation',
|
|
453
|
+
event: 'completed',
|
|
454
|
+
operation: 'authenticate-invocation',
|
|
455
|
+
target: null,
|
|
456
|
+
result: 'ok',
|
|
457
|
+
error_class: null
|
|
458
|
+
},
|
|
459
|
+
{ host: 'cli' }
|
|
460
|
+
)
|
|
461
|
+
rec.push({ ...future, meta: { ...(future.meta as object), schema: 9, telepathy: true } }, 'unknown_version')
|
|
462
|
+
|
|
463
|
+
const failing = rec.build(
|
|
464
|
+
{
|
|
465
|
+
kind: 'gate',
|
|
466
|
+
event: 'checked',
|
|
467
|
+
check: 'lint',
|
|
468
|
+
check_version: '1',
|
|
469
|
+
policy_version: null,
|
|
470
|
+
input_fingerprint: null,
|
|
471
|
+
outcome: 'bogus'
|
|
472
|
+
},
|
|
473
|
+
{ host: 'ci' }
|
|
474
|
+
)
|
|
475
|
+
rec.push(failing, 'invalid')
|
|
476
|
+
|
|
477
|
+
rec.pushRaw(JSON.stringify(current), 'valid')
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** One named execution, built from a seed. The same name and seed always give the same lines, byte for byte. */
|
|
483
|
+
export function buildExecution(name: ExecutionName, seed: string = FIXTURE_SEED): FixtureExecution {
|
|
484
|
+
const scenario = SCENARIOS[name]
|
|
485
|
+
const rec = createRecorder(seed, name, EXECUTION_NAMES.indexOf(name), scenario.issue)
|
|
486
|
+
scenario.build(rec)
|
|
487
|
+
return { name, description: scenario.description, lines: rec.lines }
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/** Every named execution, in `EXECUTION_NAMES` order. */
|
|
491
|
+
export function buildExecutions(seed: string = FIXTURE_SEED): FixtureExecution[] {
|
|
492
|
+
return EXECUTION_NAMES.map((name) => buildExecution(name, seed))
|
|
493
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The answer key for each fixture execution, written by hand from the
|
|
3
|
+
* scenario in `./executions` — never computed from the lines. A later task's
|
|
4
|
+
* expected result is worked out from these sheets by a person; the test beside
|
|
5
|
+
* this file compares each sheet with the lines, so a sheet and its scenario can
|
|
6
|
+
* never drift apart unnoticed.
|
|
7
|
+
*
|
|
8
|
+
* What each fact counts:
|
|
9
|
+
* - `lines` — every stored line, valid or not, repeats included.
|
|
10
|
+
* - `schemas` — lines per declared `meta.schema`.
|
|
11
|
+
* - `rounds` — the review rounds the execution started (`round_started` events).
|
|
12
|
+
* - `eventsByKind` — lines per event family (`kind`), repeats and invalid lines included.
|
|
13
|
+
* - `findingIdentities` — the distinct finding identities the execution names, sorted.
|
|
14
|
+
* - `models` — the distinct `model` values events carry, sorted; a null model is none.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { ExecutionName } from './executions'
|
|
18
|
+
|
|
19
|
+
export type FactSheet = {
|
|
20
|
+
lines: number
|
|
21
|
+
schemas: Record<string, number>
|
|
22
|
+
rounds: number
|
|
23
|
+
eventsByKind: Record<string, number>
|
|
24
|
+
findingIdentities: string[]
|
|
25
|
+
models: string[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const FACT_SHEETS: Record<ExecutionName, FactSheet> = {
|
|
29
|
+
// loop_started, one round of four events, stop condition and journal; one developer and one reviewer dispatch pair; one typecheck.
|
|
30
|
+
'green-one-round': {
|
|
31
|
+
lines: 12,
|
|
32
|
+
schemas: { '3': 12 },
|
|
33
|
+
rounds: 1,
|
|
34
|
+
eventsByKind: { dev_review_loop: 7, dispatch: 4, gate: 1 },
|
|
35
|
+
findingIdentities: [],
|
|
36
|
+
models: ['opus', 'sonnet']
|
|
37
|
+
},
|
|
38
|
+
// Round 1 reports the authentication finding; round 2 reports it again (recurring) beside the documentation finding; round 3 resolves both.
|
|
39
|
+
// Rounds 2 and 3 carry a findings comparison and a stated confidence, round 3 after the extra turn.
|
|
40
|
+
'three-rounds-recurring-finding': {
|
|
41
|
+
lines: 32,
|
|
42
|
+
schemas: { '3': 32 },
|
|
43
|
+
rounds: 3,
|
|
44
|
+
eventsByKind: { dev_review_loop: 17, dispatch: 12, gate: 3 },
|
|
45
|
+
findingIdentities: ['fnd-auth-1', 'fnd-docs-2'],
|
|
46
|
+
models: ['opus', 'sonnet']
|
|
47
|
+
},
|
|
48
|
+
// Round 1 reports one finding and ends changes requested; a pause and a resume follow; round 2 resolves it.
|
|
49
|
+
'paused-and-resumed': {
|
|
50
|
+
lines: 24,
|
|
51
|
+
schemas: { '3': 24 },
|
|
52
|
+
rounds: 2,
|
|
53
|
+
eventsByKind: { dev_review_loop: 14, dispatch: 8, gate: 2 },
|
|
54
|
+
findingIdentities: ['fnd-q-1'],
|
|
55
|
+
models: ['opus', 'sonnet']
|
|
56
|
+
},
|
|
57
|
+
// loop_started, round_started, stop condition, round_ended and journal; the developer dispatch pair; one handoff. No reviewer is ever dispatched.
|
|
58
|
+
'escalated-handoff': {
|
|
59
|
+
lines: 8,
|
|
60
|
+
schemas: { '3': 8 },
|
|
61
|
+
rounds: 1,
|
|
62
|
+
eventsByKind: { dev_review_loop: 5, dispatch: 2, handoff: 1 },
|
|
63
|
+
findingIdentities: [],
|
|
64
|
+
models: ['sonnet']
|
|
65
|
+
},
|
|
66
|
+
// One check and one fingerprint: fail at the first commit, pass at the second.
|
|
67
|
+
'gate-two-commits': {
|
|
68
|
+
lines: 2,
|
|
69
|
+
schemas: { '3': 2 },
|
|
70
|
+
rounds: 0,
|
|
71
|
+
eventsByKind: { gate: 2 },
|
|
72
|
+
findingIdentities: [],
|
|
73
|
+
models: []
|
|
74
|
+
},
|
|
75
|
+
// One check and one fingerprint, no commit on either line: pass, then fail.
|
|
76
|
+
'gate-no-commit': {
|
|
77
|
+
lines: 2,
|
|
78
|
+
schemas: { '3': 2 },
|
|
79
|
+
rounds: 0,
|
|
80
|
+
eventsByKind: { gate: 2 },
|
|
81
|
+
findingIdentities: [],
|
|
82
|
+
models: []
|
|
83
|
+
},
|
|
84
|
+
// One check, one fingerprint, one commit: pass, pass.
|
|
85
|
+
'gate-same-commit-twice': {
|
|
86
|
+
lines: 2,
|
|
87
|
+
schemas: { '3': 2 },
|
|
88
|
+
rounds: 0,
|
|
89
|
+
eventsByKind: { gate: 2 },
|
|
90
|
+
findingIdentities: [],
|
|
91
|
+
models: []
|
|
92
|
+
},
|
|
93
|
+
// Five usage observations (two cumulative opus, three delta sonnet, the last with every unit unknown) and two sonnet role attempts with null usage.
|
|
94
|
+
'usage-and-models': {
|
|
95
|
+
lines: 7,
|
|
96
|
+
schemas: { '3': 7 },
|
|
97
|
+
rounds: 0,
|
|
98
|
+
eventsByKind: { usage: 5, role_attempt: 2 },
|
|
99
|
+
findingIdentities: [],
|
|
100
|
+
models: ['opus', 'sonnet']
|
|
101
|
+
},
|
|
102
|
+
// In order: schema 1, schema 2, schema 2 low-trust (0.30.1), schema 3, schema 9 (unknown), schema 3 failing validation (a gate line), the schema 3 line again.
|
|
103
|
+
'historical-and-hostile-lines': {
|
|
104
|
+
lines: 7,
|
|
105
|
+
schemas: { '1': 1, '2': 2, '3': 3, '9': 1 },
|
|
106
|
+
rounds: 0,
|
|
107
|
+
eventsByKind: { operation: 6, gate: 1 },
|
|
108
|
+
findingIdentities: [],
|
|
109
|
+
models: []
|
|
110
|
+
}
|
|
111
|
+
}
|