@attalabs/vinaya 0.42.1 → 0.42.2

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.
Files changed (41) hide show
  1. package/dist/checks/bin/check-evidence-fresh.js +169 -147
  2. package/dist/checks/bin/check-registry-gates.js +10 -3
  3. package/dist/index.js +292 -168
  4. package/dist/lib/pre-push-cache-test-run.js +142 -143
  5. package/dist/lib/pre-push-changed-files.js +10 -3
  6. package/dist/lib/pre-push-progress-dir.js +169 -147
  7. package/dist/lib/pre-push-select-tests.js +16 -4
  8. package/dist/lib/push-progress-observer.js +169 -147
  9. package/dist/programs/archive.js +169 -147
  10. package/dist/programs/audit.js +169 -147
  11. package/dist/programs/check.js +169 -147
  12. package/dist/programs/commit-msg.js +169 -147
  13. package/dist/programs/dev-review-loop.js +291 -170
  14. package/dist/programs/dispatch.js +1902 -1876
  15. package/dist/programs/log-emit.js +169 -147
  16. package/dist/programs/log-selftest.js +169 -147
  17. package/dist/programs/log-send.js +169 -147
  18. package/dist/programs/pr-report.js +169 -147
  19. package/dist/programs/pr-snapshot.js +169 -147
  20. package/dist/programs/pr-verify-evidence.js +169 -147
  21. package/dist/programs/pr.js +169 -147
  22. package/dist/programs/review-post.js +169 -147
  23. package/dist/programs/review-status.js +177 -147
  24. package/dist/programs/sync.js +60 -38
  25. package/dist/programs/task-brief.js +169 -147
  26. package/dist/programs/task-sweep.js +241 -150
  27. package/dist/programs/task-tools-serve.js +249 -154
  28. package/dist/programs/tokens.js +169 -147
  29. package/dist/programs/waiver.js +169 -147
  30. package/package.json +1 -1
  31. package/studio-standalone/apps/vinaya-studio/.next/BUILD_ID +1 -1
  32. package/studio-standalone/apps/vinaya-studio/.next/build-manifest.json +2 -2
  33. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.html +1 -1
  34. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.rsc +1 -1
  35. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  36. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  37. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  38. package/studio-standalone/apps/vinaya-studio/.next/server/middleware-build-manifest.js +1 -1
  39. package/studio-standalone/apps/vinaya-studio/.next/server/pages/500.html +1 -1
  40. /package/studio-standalone/apps/vinaya-studio/.next/static/{yFfoujElgbwPk-7KNS-kw → Q_xjhiWztjosXWbMSJ0Yp}/_buildManifest.js +0 -0
  41. /package/studio-standalone/apps/vinaya-studio/.next/static/{yFfoujElgbwPk-7KNS-kw → Q_xjhiWztjosXWbMSJ0Yp}/_ssgManifest.js +0 -0
@@ -2077,6 +2077,138 @@ var init_resolve_repo = __esm(() => {
2077
2077
  };
2078
2078
  });
2079
2079
 
2080
+ // ../../harness/kernel/log/roles.ts
2081
+ function registerRole(name, role) {
2082
+ roles.set(name, role);
2083
+ }
2084
+ function registerTitle(name, title) {
2085
+ titles.set(name, title);
2086
+ }
2087
+ function isRole(value) {
2088
+ return value !== undefined && roles.has(value);
2089
+ }
2090
+ function lookupRole(name) {
2091
+ return roles.get(name);
2092
+ }
2093
+ function lookupTitle(name) {
2094
+ return roles.get(name)?.title ?? titles.get(name);
2095
+ }
2096
+ var roles, titles;
2097
+ var init_roles = __esm(() => {
2098
+ roles = new Map;
2099
+ titles = new Map;
2100
+ });
2101
+
2102
+ // ../../harness/kernel/log/envelope.ts
2103
+ import { createHash as createHash3 } from "node:crypto";
2104
+ function actorIdFromEnv(role) {
2105
+ return role === undefined || role === "" ? null : role;
2106
+ }
2107
+ function lineageFieldFromEnv(value) {
2108
+ return value === undefined || value === "" ? null : value;
2109
+ }
2110
+ function attemptFromEnv(value) {
2111
+ if (value === undefined || value === "")
2112
+ return null;
2113
+ const n = Number(value);
2114
+ return Number.isInteger(n) ? n : null;
2115
+ }
2116
+ function provenanceFor(input) {
2117
+ if (input.provenance)
2118
+ return input.provenance;
2119
+ if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
2120
+ return "unavailable";
2121
+ if (input.env.role || input.env.task)
2122
+ return "env_correlated";
2123
+ return "unavailable";
2124
+ }
2125
+ function issueFromTask(task) {
2126
+ if (task === undefined || task === "")
2127
+ return null;
2128
+ const n = Number(task);
2129
+ return Number.isInteger(n) ? n : null;
2130
+ }
2131
+ function roundFromEnv(round) {
2132
+ if (round === undefined || round === "")
2133
+ return;
2134
+ const n = Number(round);
2135
+ return Number.isInteger(n) ? n : undefined;
2136
+ }
2137
+ function prFromEnv(pr) {
2138
+ if (pr === undefined || pr === "")
2139
+ return;
2140
+ const n = Number(pr);
2141
+ return Number.isInteger(n) && n > 0 ? n : undefined;
2142
+ }
2143
+ function buildHeader(input) {
2144
+ const role = isRole(input.env.role) ? input.env.role : "unattributed";
2145
+ const round = roundFromEnv(input.env.round);
2146
+ const pr = prFromEnv(input.env.pr);
2147
+ const subject = {
2148
+ issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
2149
+ role,
2150
+ ...round !== undefined ? { round } : {},
2151
+ ...pr !== undefined ? { pr } : {},
2152
+ ...input.subject ?? {}
2153
+ };
2154
+ const issue = subject.issue;
2155
+ return {
2156
+ meta: {
2157
+ schema: 4,
2158
+ ts: input.now.toISOString(),
2159
+ run_id: input.runId,
2160
+ seq: input.seq,
2161
+ repo: input.repo,
2162
+ vinaya: input.vinaya,
2163
+ doctrine: input.doctrine,
2164
+ host: input.host,
2165
+ machine: createHash3("sha256").update(input.hostname).digest("hex"),
2166
+ event_id: input.eventId,
2167
+ process_id: input.processId,
2168
+ actor_id: actorIdFromEnv(input.env.role),
2169
+ lineage: {
2170
+ run: lineageFieldFromEnv(input.env.run),
2171
+ attempt: attemptFromEnv(input.env.attempt),
2172
+ parent: lineageFieldFromEnv(input.env.parent)
2173
+ },
2174
+ input_versions: {
2175
+ manifest_version: input.inputVersions?.manifestVersion ?? null,
2176
+ objectives_version: input.inputVersions?.objectivesVersion ?? null,
2177
+ brief_hash: input.inputVersions?.briefHash ?? null,
2178
+ ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
2179
+ pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
2180
+ policy_digest: input.inputVersions?.policyDigest ?? null
2181
+ },
2182
+ provenance: provenanceFor(input),
2183
+ work: {
2184
+ ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
2185
+ repo: input.repo,
2186
+ change: pr === undefined ? null : String(pr),
2187
+ revision: input.revision ?? null
2188
+ },
2189
+ flow: {
2190
+ id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
2191
+ version: lineageFieldFromEnv(input.env.flowVersion)
2192
+ },
2193
+ runtime: lineageFieldFromEnv(input.env.runtime),
2194
+ process: {
2195
+ id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
2196
+ version: lineageFieldFromEnv(input.env.processVersion),
2197
+ digest: lineageFieldFromEnv(input.env.processDigest)
2198
+ },
2199
+ runner: {
2200
+ id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
2201
+ version: lineageFieldFromEnv(input.env.runnerVersion)
2202
+ },
2203
+ source: lineageFieldFromEnv(input.env.source)
2204
+ },
2205
+ subject
2206
+ };
2207
+ }
2208
+ var init_envelope = __esm(() => {
2209
+ init_roles();
2210
+ });
2211
+
2080
2212
  // ../../harness/kernel/log/custom.ts
2081
2213
  import { z } from "zod";
2082
2214
  var CUSTOM_EVENT_NAME_PATTERN, CUSTOM_EVENT_NAME_MAX_LENGTH = 64, CUSTOM_EVENT_RESERVED_NAMESPACE = "vinaya", CUSTOM_EVENT_MAX_FIELDS = 20, CUSTOM_FIELD_NAME_PATTERN, CUSTOM_FIELD_NAME_MAX_LENGTH = 64, CUSTOM_TEXT_MAX_LENGTH = 500, CUSTOM_WORD_PATTERN, CUSTOM_WORD_MAX_LENGTH = 64, CUSTOM_FIELD_MAX_WORDS = 50, CustomFieldTypeSchema, CustomEventDeclarationsSchema;
@@ -2134,19 +2266,11 @@ var init_custom = __esm(() => {
2134
2266
 
2135
2267
  // ../../harness/kernel/log/schema.ts
2136
2268
  import { z as z2 } from "zod";
2137
- var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000, ROLE_VALUES, RoleSchema, HOST_VALUES, HostSchema, RUN_ID_PATTERN, headerMetaCore, HeaderMetaV1Schema, LineageSchema, InputVersionsSchema, ProvenanceSchema, HeaderMetaV2Schema, WorkSchema, FlowSchema, HeaderMetaV3Schema, HeaderMetaV4Schema, HeaderMetaSchema, SubjectSchema, HeaderSchema, envelopeTail, ReviewFindingSchema, DispatchOutcomeSchema, dispatchShared, dispatchUsageField, DispatchEventSchema, CODE_TOKEN_PATTERN, CodeTokenSchema, ReviewerVerdictSchema, loopShared, DevReviewLoopEventSchema, ForgeOpSchema, ForgeWriteTargetSchema, forgeWriteShared, ForgeWriteEventSchema, GateOutcomeSchema, gateShared, GateEventSchema, OperationResultSchema, operationShared, OperationEventSchema, UsageUnitsSchema, usageShared, UsageEventSchema, RoleAttemptOutcomeSchema, roleAttemptShared, RoleAttemptEventSchema, handoffShared, HandoffEventSchema, EffectTargetSchema, effectShared, EffectEventSchema, CustomFieldValueSchema, customShared, CustomEventSchema, LogEventSchema;
2269
+ var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000, ROLE_NAME_PATTERN, RoleSchema, HOST_VALUES, HostSchema, RUN_ID_PATTERN, headerMetaCore, HeaderMetaV1Schema, LineageSchema, InputVersionsSchema, ProvenanceSchema, HeaderMetaV2Schema, WorkSchema, FlowSchema, HeaderMetaV3Schema, HeaderMetaV4Schema, HeaderMetaSchema, SubjectSchema, HeaderSchema, envelopeTail, ReviewFindingSchema, DispatchOutcomeSchema, dispatchShared, dispatchUsageField, DispatchEventSchema, CODE_TOKEN_PATTERN, CodeTokenSchema, ReviewerVerdictSchema, loopShared, DevReviewLoopEventSchema, ForgeOpSchema, ForgeWriteTargetSchema, forgeWriteShared, ForgeWriteEventSchema, GateOutcomeSchema, gateShared, GateEventSchema, OperationResultSchema, operationShared, OperationEventSchema, UsageUnitsSchema, usageShared, UsageEventSchema, RoleAttemptOutcomeSchema, roleAttemptShared, RoleAttemptEventSchema, handoffShared, HandoffEventSchema, EffectTargetSchema, effectShared, EffectEventSchema, CustomFieldValueSchema, customShared, CustomEventSchema, LogEventSchema;
2138
2270
  var init_schema = __esm(() => {
2139
2271
  init_custom();
2140
- ROLE_VALUES = [
2141
- "planner",
2142
- "developer",
2143
- "code-reviewer",
2144
- "security",
2145
- "principal",
2146
- "archivist",
2147
- "architect"
2148
- ];
2149
- RoleSchema = z2.enum(ROLE_VALUES);
2272
+ ROLE_NAME_PATTERN = /^[a-z0-9-]+$/;
2273
+ RoleSchema = z2.string().regex(ROLE_NAME_PATTERN);
2150
2274
  HOST_VALUES = ["hook", "ci", "cli", "loop"];
2151
2275
  HostSchema = z2.enum(HOST_VALUES);
2152
2276
  RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
@@ -2728,119 +2852,6 @@ var init_schema = __esm(() => {
2728
2852
  ]);
2729
2853
  });
2730
2854
 
2731
- // ../../harness/kernel/log/envelope.ts
2732
- import { createHash as createHash3 } from "node:crypto";
2733
- function isRole(value) {
2734
- return value !== undefined && ROLE_VALUES.includes(value);
2735
- }
2736
- function actorIdFromEnv(role) {
2737
- return role === undefined || role === "" ? null : role;
2738
- }
2739
- function lineageFieldFromEnv(value) {
2740
- return value === undefined || value === "" ? null : value;
2741
- }
2742
- function attemptFromEnv(value) {
2743
- if (value === undefined || value === "")
2744
- return null;
2745
- const n = Number(value);
2746
- return Number.isInteger(n) ? n : null;
2747
- }
2748
- function provenanceFor(input) {
2749
- if (input.provenance)
2750
- return input.provenance;
2751
- if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
2752
- return "unavailable";
2753
- if (input.env.role || input.env.task)
2754
- return "env_correlated";
2755
- return "unavailable";
2756
- }
2757
- function issueFromTask(task) {
2758
- if (task === undefined || task === "")
2759
- return null;
2760
- const n = Number(task);
2761
- return Number.isInteger(n) ? n : null;
2762
- }
2763
- function roundFromEnv(round) {
2764
- if (round === undefined || round === "")
2765
- return;
2766
- const n = Number(round);
2767
- return Number.isInteger(n) ? n : undefined;
2768
- }
2769
- function prFromEnv(pr) {
2770
- if (pr === undefined || pr === "")
2771
- return;
2772
- const n = Number(pr);
2773
- return Number.isInteger(n) && n > 0 ? n : undefined;
2774
- }
2775
- function buildHeader(input) {
2776
- const role = isRole(input.env.role) ? input.env.role : "unattributed";
2777
- const round = roundFromEnv(input.env.round);
2778
- const pr = prFromEnv(input.env.pr);
2779
- const subject = {
2780
- issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
2781
- role,
2782
- ...round !== undefined ? { round } : {},
2783
- ...pr !== undefined ? { pr } : {},
2784
- ...input.subject ?? {}
2785
- };
2786
- const issue = subject.issue;
2787
- return {
2788
- meta: {
2789
- schema: 4,
2790
- ts: input.now.toISOString(),
2791
- run_id: input.runId,
2792
- seq: input.seq,
2793
- repo: input.repo,
2794
- vinaya: input.vinaya,
2795
- doctrine: input.doctrine,
2796
- host: input.host,
2797
- machine: createHash3("sha256").update(input.hostname).digest("hex"),
2798
- event_id: input.eventId,
2799
- process_id: input.processId,
2800
- actor_id: actorIdFromEnv(input.env.role),
2801
- lineage: {
2802
- run: lineageFieldFromEnv(input.env.run),
2803
- attempt: attemptFromEnv(input.env.attempt),
2804
- parent: lineageFieldFromEnv(input.env.parent)
2805
- },
2806
- input_versions: {
2807
- manifest_version: input.inputVersions?.manifestVersion ?? null,
2808
- objectives_version: input.inputVersions?.objectivesVersion ?? null,
2809
- brief_hash: input.inputVersions?.briefHash ?? null,
2810
- ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
2811
- pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
2812
- policy_digest: input.inputVersions?.policyDigest ?? null
2813
- },
2814
- provenance: provenanceFor(input),
2815
- work: {
2816
- ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
2817
- repo: input.repo,
2818
- change: pr === undefined ? null : String(pr),
2819
- revision: input.revision ?? null
2820
- },
2821
- flow: {
2822
- id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
2823
- version: lineageFieldFromEnv(input.env.flowVersion)
2824
- },
2825
- runtime: lineageFieldFromEnv(input.env.runtime),
2826
- process: {
2827
- id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
2828
- version: lineageFieldFromEnv(input.env.processVersion),
2829
- digest: lineageFieldFromEnv(input.env.processDigest)
2830
- },
2831
- runner: {
2832
- id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
2833
- version: lineageFieldFromEnv(input.env.runnerVersion)
2834
- },
2835
- source: lineageFieldFromEnv(input.env.source)
2836
- },
2837
- subject
2838
- };
2839
- }
2840
- var init_envelope = __esm(() => {
2841
- init_schema();
2842
- });
2843
-
2844
2855
  // ../../harness/kernel/log/redact.ts
2845
2856
  function redactString(value, home) {
2846
2857
  let out = value.replace(GITHUB_TOKEN_PATTERN, "<redacted>").replace(CLASSIC_GITHUB_PAT_PATTERN, "$1<redacted>").replace(BEARER_TOKEN_PATTERN, "<redacted>").replace(AWS_ACCESS_KEY_PATTERN, "<redacted>").replace(SLACK_TOKEN_PATTERN, "<redacted>").replace(STRIPE_KEY_PATTERN, "<redacted>").replace(ANTHROPIC_KEY_PATTERN, "<redacted>").replace(OPENAI_KEY_PATTERN, "<redacted>").replace(NPM_TOKEN_PATTERN, "<redacted>").replace(JWT_PATTERN, "<redacted>").replace(PEM_BLOCK_PATTERN, "<redacted>").replace(BASIC_AUTH_URL_PATTERN, "$1<redacted>@").replace(GENERIC_SECRET_ASSIGNMENT_PATTERN, "$1<redacted>");
@@ -3624,7 +3635,8 @@ function code(value) {
3624
3635
  return typeof value === "string" && CODE_TOKEN_PATTERN.test(value) ? value : null;
3625
3636
  }
3626
3637
  function roleSubject(value, sentenceStart = true) {
3627
- const name = typeof value === "string" && ROLE_VALUES.includes(value) ? `the ${value === "security" ? "security reviewer" : value.replace(/-/g, " ")}` : "a role";
3638
+ const known = typeof value === "string" ? lookupRole(value) : undefined;
3639
+ const name = known ? `the ${known.reading}` : "a role";
3628
3640
  return sentenceStart ? `${name[0]?.toUpperCase()}${name.slice(1)}` : name;
3629
3641
  }
3630
3642
  function roundLabel(record) {
@@ -3743,7 +3755,7 @@ function conflictReentry(record) {
3743
3755
  function dispatched(record) {
3744
3756
  const role = text(record.target_role);
3745
3757
  const who = roleSubject(role);
3746
- const reviewing = role === "code-reviewer" || role === "security";
3758
+ const reviewing = role !== null && (lookupRole(role)?.reviews ?? false);
3747
3759
  const round = whole(record.round);
3748
3760
  return {
3749
3761
  kind: "working",
@@ -3802,6 +3814,7 @@ function narrate(record, earlier = []) {
3802
3814
  }
3803
3815
  var REASONS, PAUSE_WITHOUT_CODE;
3804
3816
  var init_narration = __esm(() => {
3817
+ init_roles();
3805
3818
  init_schema();
3806
3819
  REASONS = {
3807
3820
  escalation: { words: "a role escalated a question", person: true },
@@ -3834,13 +3847,7 @@ var init_narration = __esm(() => {
3834
3847
 
3835
3848
  // ../../harness/kernel/adapters/agents/agent-line.ts
3836
3849
  function roleLabel(role) {
3837
- if (role in roleLabels)
3838
- return roleLabels[role];
3839
- if (role === "dev-review-loop")
3840
- return "Loop";
3841
- if (role === "operator")
3842
- return "Operator";
3843
- return role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
3850
+ return lookupTitle(role) ?? role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
3844
3851
  }
3845
3852
  function formatLineMeta(meta) {
3846
3853
  if (meta === undefined)
@@ -3854,17 +3861,9 @@ function formatAgentLine(role, words, options = {}) {
3854
3861
  const mark = options.unicode ?? true ? unicodeMarks[options.mark ?? "working"] : asciiMarks[options.mark ?? "working"];
3855
3862
  return `${time} ${mark} ${roleLabel(role)} ${words}`;
3856
3863
  }
3857
- var roleLabels, unicodeMarks, asciiMarks, META_KEY, META_VALUE;
3864
+ var unicodeMarks, asciiMarks, META_KEY, META_VALUE;
3858
3865
  var init_agent_line = __esm(() => {
3859
- roleLabels = {
3860
- planner: "Planner",
3861
- developer: "Developer",
3862
- "code-reviewer": "Code review",
3863
- security: "Security",
3864
- principal: "Principal",
3865
- archivist: "Archivist",
3866
- architect: "Architect"
3867
- };
3866
+ init_roles();
3868
3867
  unicodeMarks = { working: "▸", done: "✓", failed: "✕", waiting: "◌", round: "◆" };
3869
3868
  asciiMarks = { working: ">", done: "+", failed: "x", waiting: "~", round: "#" };
3870
3869
  META_KEY = /^[a-z]+$/;
@@ -8962,6 +8961,28 @@ var init_install_process = __esm(() => {
8962
8961
  SLOT_ORDER = ["log", "config", "checks"];
8963
8962
  });
8964
8963
 
8964
+ // ../../harness/processes/vinaya-strict/integration/log/log-roles.ts
8965
+ function registerVinayaLogRoles() {
8966
+ for (const { name, reading, title, reviews } of VINAYA_LOG_ROLES)
8967
+ registerRole(name, { reading, title, reviews });
8968
+ registerTitle("dev-review-loop", "Loop");
8969
+ }
8970
+ var VINAYA_LOG_ROLES, VINAYA_LOG_ROLE_NAMES;
8971
+ var init_log_roles = __esm(() => {
8972
+ init_roles();
8973
+ VINAYA_LOG_ROLES = [
8974
+ { name: "planner", reading: "planner", title: "Planner", reviews: false },
8975
+ { name: "developer", reading: "developer", title: "Developer", reviews: false },
8976
+ { name: "code-reviewer", reading: "code reviewer", title: "Code review", reviews: true },
8977
+ { name: "security", reading: "security reviewer", title: "Security", reviews: true },
8978
+ { name: "principal", reading: "principal", title: "Principal", reviews: false },
8979
+ { name: "archivist", reading: "archivist", title: "Archivist", reviews: false },
8980
+ { name: "architect", reading: "architect", title: "Architect", reviews: false }
8981
+ ];
8982
+ VINAYA_LOG_ROLE_NAMES = VINAYA_LOG_ROLES.map((role) => role.name);
8983
+ registerVinayaLogRoles();
8984
+ });
8985
+
8965
8986
  // ../../harness/processes/vinaya-strict/integration/log/branch-issue.ts
8966
8987
  import { execFile as execFile8 } from "node:child_process";
8967
8988
  import { promisify as promisify8 } from "node:util";
@@ -9164,6 +9185,7 @@ function installVinayaLogSinkFactory() {
9164
9185
  var init_log_sink_factory = __esm(() => {
9165
9186
  init_log_sink();
9166
9187
  init_package_root();
9188
+ init_log_roles();
9167
9189
  init_branch_issue();
9168
9190
  init_doctrine_version();
9169
9191
  });
@@ -9734,8 +9756,8 @@ var init_protected_paths2 = __esm(() => {
9734
9756
 
9735
9757
  // ../../harness/processes/vinaya-strict/integration/policies/roles.ts
9736
9758
  var GRANTED_ROLES, ROLE_TOOL_GRANTS, VINAYA_TOOL_GRANTS, VINAYA_BROKER_ROLES, VINAYA_BOUNDARY_ROLES, OPERATOR_TOOL_GRANT, VINAYA_ROUTER_ROLES;
9737
- var init_roles = __esm(() => {
9738
- init_schema();
9759
+ var init_roles2 = __esm(() => {
9760
+ init_log_roles();
9739
9761
  GRANTED_ROLES = ["developer", "code-reviewer", "security", "controller"];
9740
9762
  ROLE_TOOL_GRANTS = {
9741
9763
  developer: [
@@ -9754,7 +9776,7 @@ var init_roles = __esm(() => {
9754
9776
  };
9755
9777
  VINAYA_TOOL_GRANTS = { roles: GRANTED_ROLES, grants: ROLE_TOOL_GRANTS };
9756
9778
  VINAYA_BROKER_ROLES = {
9757
- recognizedRoles: ROLE_VALUES,
9779
+ recognizedRoles: VINAYA_LOG_ROLE_NAMES,
9758
9780
  workerRoles: ["developer"],
9759
9781
  surfaceOwner: "the Planner"
9760
9782
  };
@@ -9838,7 +9860,7 @@ function vinayaRouterPolicies() {
9838
9860
  var init_vinaya_policies = __esm(() => {
9839
9861
  init_launch_records();
9840
9862
  init_protected_paths2();
9841
- init_roles();
9863
+ init_roles2();
9842
9864
  init_scratch_names();
9843
9865
  });
9844
9866
 
@@ -1529,6 +1529,8 @@ function findCrossingFiles(candidateFiles) {
1529
1529
  // ../../harness/processes/vinaya-strict/checks/log-producer-graph.ts
1530
1530
  import { existsSync as existsSync2, readFileSync as readFileSync3 } from "node:fs";
1531
1531
  import { join as join2, relative, sep } from "node:path";
1532
+ // ../../packages/test-selection/src/hunk-classes.ts
1533
+ var LOAD_ERROR_CODES = new Set([2300, 2392, 2393, 2440, 2448, 2449, 2450, 2451]);
1532
1534
  // ../../packages/test-selection/src/inventory.ts
1533
1535
  var READER_KINDS = new Set(["code", "raw-bytes", "semantic", "parsed-keys", "schema-policy"]);
1534
1536
  var EDGE_KINDS = new Set([
@@ -1581,7 +1583,12 @@ var AT_CALLS = new Set([
1581
1583
  "execveat"
1582
1584
  ]);
1583
1585
  var CLONE_CALLS = new Set(["clone", "clone3", "fork", "vfork"]);
1586
+ var OPEN_CALLS = new Set(["open", "openat", "openat2", "creat"]);
1584
1587
  var GIT_PATH_READERS = new Set(["show", "cat-file", "rev-parse"]);
1588
+ // ../../packages/test-selection/src/selector.ts
1589
+ import { readdirSync as readdirSync2, readFileSync as readFileSync2, statSync as statSync2 } from "node:fs";
1590
+ import { dirname, extname, isAbsolute, join, resolve } from "node:path";
1591
+
1585
1592
  // ../../packages/test-selection/src/scanner-inputs.ts
1586
1593
  var TREE_READERS = new Set([
1587
1594
  "readdirSync",
@@ -1594,9 +1601,6 @@ var TREE_READERS = new Set([
1594
1601
  ]);
1595
1602
  var SPAWN_CALLS = new Set(["execFileSync", "execSync", "spawnSync", "spawn", "exec", "execFile"]);
1596
1603
  var PROCESS_CALLS = new Set([...SPAWN_CALLS, "fork"]);
1597
- // ../../packages/test-selection/src/selector.ts
1598
- import { readdirSync as readdirSync2, readFileSync as readFileSync2, statSync as statSync2 } from "node:fs";
1599
- import { dirname, extname, isAbsolute, join, resolve } from "node:path";
1600
1604
 
1601
1605
  // ../../packages/test-selection/src/spawn-inputs.ts
1602
1606
  var parsedTrees = new Map;
@@ -1752,6 +1756,9 @@ function resolveRelativeImport(fromFile, specifier, knownFiles) {
1752
1756
  var TYPE_ONLY_CONDITIONS = new Set(["types", "typings"]);
1753
1757
  var PACKAGE_TEST_DATA_FOLDERS = new Set(["tests", "test", "__tests__", "specs", "fixtures"]);
1754
1758
  var PACKAGE_PROSE_FILE_NAMES = new Set(["README.md", "CHANGELOG.md", "LICENSE"]);
1759
+
1760
+ // ../../packages/test-selection/src/recorder.ts
1761
+ var RECORDER_TIME_LIMIT_MS = 15 * 60000;
1755
1762
  // ../../harness/processes/vinaya-strict/integration/repository-verification.ts
1756
1763
  function walkFiles(root) {
1757
1764
  return walkTree(diskTree(root), root);