@lannguyensi/harness 0.62.0 → 0.64.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +2 -2
  3. package/dist/cli/approve/understanding.d.ts +10 -1
  4. package/dist/cli/approve/understanding.js +19 -13
  5. package/dist/cli/approve/understanding.js.map +1 -1
  6. package/dist/cli/delegate/index.js +2 -1
  7. package/dist/cli/delegate/index.js.map +1 -1
  8. package/dist/cli/delegate/register.d.ts +5 -0
  9. package/dist/cli/delegate/register.js +90 -0
  10. package/dist/cli/delegate/register.js.map +1 -0
  11. package/dist/cli/doctor/expire-on-tool-match.d.ts +15 -0
  12. package/dist/cli/doctor/expire-on-tool-match.js +58 -0
  13. package/dist/cli/doctor/expire-on-tool-match.js.map +1 -0
  14. package/dist/cli/doctor/format.js +7 -0
  15. package/dist/cli/doctor/format.js.map +1 -1
  16. package/dist/cli/doctor/index.js +8 -0
  17. package/dist/cli/doctor/index.js.map +1 -1
  18. package/dist/cli/doctor/types.d.ts +9 -0
  19. package/dist/cli/doctor/types.js.map +1 -1
  20. package/dist/cli/dry-run.d.ts +12 -0
  21. package/dist/cli/dry-run.js +60 -27
  22. package/dist/cli/dry-run.js.map +1 -1
  23. package/dist/cli/enriched-event.d.ts +35 -0
  24. package/dist/cli/enriched-event.js +60 -0
  25. package/dist/cli/enriched-event.js.map +1 -0
  26. package/dist/cli/explain-action.d.ts +6 -1
  27. package/dist/cli/explain-action.js +31 -1
  28. package/dist/cli/explain-action.js.map +1 -1
  29. package/dist/cli/explain-policy.d.ts +23 -0
  30. package/dist/cli/explain-policy.js +28 -8
  31. package/dist/cli/explain-policy.js.map +1 -1
  32. package/dist/cli/index.js +14 -484
  33. package/dist/cli/index.js.map +1 -1
  34. package/dist/cli/init/profiles.js +9 -7
  35. package/dist/cli/init/profiles.js.map +1 -1
  36. package/dist/cli/pack/auto-approve-path.js +13 -2
  37. package/dist/cli/pack/auto-approve-path.js.map +1 -1
  38. package/dist/cli/pack/hook-codex-pre-tool-use.js +4 -2
  39. package/dist/cli/pack/hook-codex-pre-tool-use.js.map +1 -1
  40. package/dist/cli/pack/hook-pre-tool-use.js +17 -4
  41. package/dist/cli/pack/hook-pre-tool-use.js.map +1 -1
  42. package/dist/cli/pack/hook-solution-acceptance-writeguard.js +102 -1
  43. package/dist/cli/pack/hook-solution-acceptance-writeguard.js.map +1 -1
  44. package/dist/cli/policy/intercept.js +25 -90
  45. package/dist/cli/policy/intercept.js.map +1 -1
  46. package/dist/cli/policy/risk-envelope-enrichment.d.ts +40 -0
  47. package/dist/cli/policy/risk-envelope-enrichment.js +110 -0
  48. package/dist/cli/policy/risk-envelope-enrichment.js.map +1 -0
  49. package/dist/cli/register-audit-group.d.ts +5 -0
  50. package/dist/cli/register-audit-group.js +91 -0
  51. package/dist/cli/register-audit-group.js.map +1 -0
  52. package/dist/cli/register-operator-lifecycle.d.ts +5 -0
  53. package/dist/cli/register-operator-lifecycle.js +117 -0
  54. package/dist/cli/register-operator-lifecycle.js.map +1 -0
  55. package/dist/cli/remove/register.d.ts +5 -0
  56. package/dist/cli/remove/register.js +42 -0
  57. package/dist/cli/remove/register.js.map +1 -0
  58. package/dist/cli/resolve-env.js +12 -13
  59. package/dist/cli/resolve-env.js.map +1 -1
  60. package/dist/cli/test-risk.d.ts +2 -1
  61. package/dist/cli/test-risk.js +5 -1
  62. package/dist/cli/test-risk.js.map +1 -1
  63. package/dist/cli/uninstall/register.d.ts +5 -0
  64. package/dist/cli/uninstall/register.js +169 -0
  65. package/dist/cli/uninstall/register.js.map +1 -0
  66. package/dist/index.d.ts +1 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +1 -1
  69. package/dist/policy-packs/builtin/understanding-before-execution/index.js +1 -1
  70. package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +1 -1
  71. package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.js +38 -13
  72. package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.js.map +1 -1
  73. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.d.ts +2 -2
  74. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js +26 -13
  75. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js.map +1 -1
  76. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +94 -21
  77. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +221 -42
  78. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +1 -1
  79. package/dist/policy-packs/builtin/understanding-before-execution.js +7 -3
  80. package/dist/policy-packs/builtin/understanding-before-execution.js.map +1 -1
  81. package/dist/runtime/index.d.ts +1 -1
  82. package/dist/runtime/index.js.map +1 -1
  83. package/dist/runtime/intercept.d.ts +130 -1
  84. package/dist/runtime/intercept.js +85 -14
  85. package/dist/runtime/intercept.js.map +1 -1
  86. package/dist/runtime/task-providers/agent-tasks.d.ts +11 -9
  87. package/dist/runtime/task-providers/agent-tasks.js +11 -9
  88. package/dist/runtime/task-providers/agent-tasks.js.map +1 -1
  89. package/package.json +1 -1
@@ -293,12 +293,12 @@ export declare const MAX_HASHED_REPORT_BYTES: number;
293
293
  * thousands of them. The scan reads the newest file first, which is where the
294
294
  * approved report usually is.
295
295
  *
296
- * This bounds the hash scan only, not the hook as a whole by entry count: the
297
- * evidence read that follows a refused marker (shared with the no-marker path,
298
- * `listPersistedReportsBounded`) still opens and parses every `*.json` entry,
299
- * so a directory of hundreds of thousands of planted entries still takes the
300
- * hook past the PreToolUse budget, which the runtime treats as an allow. A
301
- * follow-up task bounds that read.
296
+ * The other full-directory reads on the PreToolUse path spend the same
297
+ * budget with the same floor, each its own (a fresh {@link ReadBudget} per
298
+ * listing, not one shared across the hook call): the evidence read, the
299
+ * auto-approval precondition listing, the subagent-delegation lookup and the
300
+ * parse-error log lookup each read at most about 32 MiB, and none opens an
301
+ * entry once the directory holds more than {@link MAX_HOOK_LISTING_ENTRIES}.
302
302
  */
303
303
  export declare const MAX_HASH_SCAN_BYTES: number;
304
304
  /**
@@ -308,6 +308,54 @@ export declare const MAX_HASH_SCAN_BYTES: number;
308
308
  * count: 32 MiB / 4 KiB = 8192 entries.
309
309
  */
310
310
  export declare const MIN_SCAN_ENTRY_COST_BYTES = 4096;
311
+ /**
312
+ * Most entries (8192, the hash scan's budget divided by its per-entry floor)
313
+ * a PreToolUse-path reader accepts in one agent-writable directory. The hash
314
+ * scan stops at its budget, but four more readers on the same hook path used
315
+ * to open every entry (the evidence read, the auto-approval precondition
316
+ * listing, the subagent-delegation lookup, the parse-error log lookup), so a
317
+ * directory of hundreds of thousands of planted entries took the hook past the
318
+ * 15 s PreToolUse budget, which the runtime treats as an allow (measured at
319
+ * 400k planted entries: 408195 opens and 28.9 s of CPU in the Claude Code
320
+ * hook). The count alone left each entry readable up to the 1 MiB per-file
321
+ * cap, so every one of those readers also charges the entries it reads against
322
+ * {@link MAX_HASH_SCAN_BYTES} (see {@link ReadBudget}).
323
+ *
324
+ * A reader does not take a newest window of such a directory: a partial view
325
+ * would let a hidden newer entry change a selection (an auto-approval would
326
+ * adopt an older pending report while a newer, hidden one is already
327
+ * approved). Past either bound (more entries, or more report data than the
328
+ * byte budget) it returns nothing and reports the directory as too large to
329
+ * read, and each reader treats that as no evidence: the evidence read
330
+ * reports no report, the auto-approval path declines, the delegation lookup
331
+ * captures nothing and the parse-error lookup finds nothing. None of them
332
+ * allows. The directory listing stops as soon as the bound is crossed. See
333
+ * {@link listDirNamesBounded}.
334
+ */
335
+ export declare const MAX_HOOK_LISTING_ENTRIES: number;
336
+ /** Result of {@link listDirNamesBounded}. */
337
+ export interface BoundedDirNames {
338
+ /** Entry names that end with the suffix, in ascending byte order; empty when `truncated`. */
339
+ names: string[];
340
+ /** True when the directory holds more matching entries than `maxEntries`, or more entries in all than `maxScanned`. */
341
+ truncated: boolean;
342
+ }
343
+ /**
344
+ * Names under `dir` ending in `suffix`, or none and `truncated: true` when
345
+ * there are more than `maxEntries` of them. The one listing the bounded
346
+ * PreToolUse-path readers share, so the bound lives in one place; a missing or
347
+ * unreadable directory lists nothing and is not `truncated`.
348
+ *
349
+ * The listing reads the directory one entry at a time and stops as soon as
350
+ * `maxEntries + 1` matching names have been seen, or `maxScanned` entries of
351
+ * any name (default: {@link HOOK_LISTING_SCAN_FACTOR} times `maxEntries`),
352
+ * so millions of planted names, matching or not, cost a bounded number of
353
+ * directory reads and no allocation of their names. The directory handle is
354
+ * always closed. An unbounded `maxEntries` reads the whole directory. The
355
+ * names come back in ascending byte order (the `fs.readdirSync` order), not
356
+ * in the filesystem's iteration order.
357
+ */
358
+ export declare function listDirNamesBounded(dir: string, suffix: string, maxEntries: number, maxScanned?: number): BoundedDirNames;
311
359
  /** Result of {@link walkContainerDepth}. */
312
360
  export interface ContainerDepthWalk {
313
361
  /** True when some array/object nests deeper than the walk's `max` levels. */
@@ -345,7 +393,15 @@ export declare function walkContainerDepth(value: unknown, max: number): Contain
345
393
  */
346
394
  export declare function canonicalReportHash(report: Record<string, unknown>): string | null;
347
395
  /** Why {@link readReportFileBounded} returned no content. */
348
- export type ReportFileReadFailure = "unreadable" | "not-regular" | "too-large" | "grew";
396
+ export type ReportFileReadFailure = "unreadable" | "not-regular" | "too-large" | "grew" | "over-budget";
397
+ /**
398
+ * Bytes a bounded multi-entry reader has spent against
399
+ * {@link MAX_HASH_SCAN_BYTES}; pass one object to every
400
+ * {@link readReportFileBounded} call of the same listing.
401
+ */
402
+ export interface ReadBudget {
403
+ spent: number;
404
+ }
349
405
  export type BoundedReportRead = {
350
406
  ok: true;
351
407
  raw: string;
@@ -375,9 +431,15 @@ export type BoundedReportRead = {
375
431
  * not-regular by the open itself (`ELOOP`), with no earlier `lstat` for a
376
432
  * swap to race. Off by default, so every hook read keeps following links
377
433
  * exactly as before; `harness approve understanding` turns it on.
434
+ *
435
+ * `opts.budget` charges the read against {@link MAX_HASH_SCAN_BYTES} the way
436
+ * the hash scan does (the larger of the `fstat` size and
437
+ * {@link MIN_SCAN_ENTRY_COST_BYTES} per entry, taken before the read); once
438
+ * the budget is spent the call opens nothing and returns `over-budget`.
378
439
  */
379
440
  export declare function readReportFileBounded(filePath: string, opts?: {
380
441
  noFollow?: boolean;
442
+ budget?: ReadBudget;
381
443
  }): BoundedReportRead;
382
444
  /** Why a report file has no canonical hash. */
383
445
  export type UnhashableReportReason = ReportFileReadFailure | "not-json-object" | "too-deep";
@@ -461,20 +523,26 @@ export type ApprovedReportHashVerification = {
461
523
  * (bytes read or the floor, whichever is larger, whatever the read returned):
462
524
  * past the budget the check denies with the mismatch reason (fail closed).
463
525
  * That bounds the entries opened (8192) and the bytes read (about 32 MiB, the
464
- * last file read may add up to the 1 MiB per-file cap). Three costs remain.
465
- * A legitimate approval whose report sits behind that much newer report data
466
- * (by name, descending) is denied; re-approving writes a new, newest report
467
- * and recovers only when the newer entries are real reports: planted `*.json`
468
- * names that sort after the timestamped report names (for example names
469
- * starting with a letter) stay newer than any new report and keep denying
470
- * until removed. The `readdir` plus name sort of the directory itself are not
471
- * charged, so a directory of hundreds of thousands of entries still costs that
472
- * listing before the scan starts. And the hash scan is not the whole hook:
473
- * the evidence read that follows a refused marker (shared with the no-marker
474
- * path, `listPersistedReportsBounded`) still opens and parses every `*.json`
475
- * entry, so the hook as a whole is still unbounded by entry count and a
476
- * large planted directory runs it past the PreToolUse budget (an allow); a
477
- * follow-up task bounds that read.
526
+ * last file read may add up to the 1 MiB per-file cap). The directory listing
527
+ * is bounded as well ({@link listDirNamesBounded}, one entry at a time): past
528
+ * {@link MAX_HOOK_LISTING_ENTRIES} `*.json` entries, or twice that many entries
529
+ * of any name, the check opens nothing and denies with a reason that names the
530
+ * bound and the remedy (fail closed), so the listing cost is bounded by that
531
+ * count however many names are planted. Two costs remain. A legitimate
532
+ * approval whose report sits behind that much newer report data (by name,
533
+ * descending) is denied; re-approving writes a new, newest report and recovers
534
+ * only when the newer entries are real reports: planted `*.json` names that
535
+ * sort after the timestamped report names (for example names starting with a
536
+ * letter) stay newer than any new report and keep denying until removed (the
537
+ * same holds past the entry bound, where the scan does not start at all).
538
+ * A reports directory with more entries than the bound is denied even when the
539
+ * approved report is among them, until entries are removed by hand. The hash
540
+ * scan is not the whole hook: the other full-directory reads on it (the
541
+ * evidence read, the auto-approval listing, the delegation lookup and the
542
+ * parse-error lookup) list the directory entry by entry and stop once
543
+ * {@link MAX_HOOK_LISTING_ENTRIES} entries are crossed, and charge the entries
544
+ * they read against the same byte budget; past either bound they open or read
545
+ * nothing more and fail closed.
478
546
  *
479
547
  * Removing the approved report while other report files remain is a deny:
480
548
  * nothing on disk carries the signed content any more. `harness gc --apply`
@@ -538,9 +606,14 @@ export interface SkippedReportEntry {
538
606
  */
539
607
  export declare function listPersistedReportsBoundedWithSkips(dir: string, opts?: {
540
608
  refuseSymlinks?: boolean;
609
+ maxEntries?: number;
541
610
  }): {
542
611
  reports: PersistedReport[];
543
612
  skipped: SkippedReportEntry[];
613
+ /** True when `opts.maxEntries` was set and the directory holds more `*.json` entries, or more report data than the byte budget; no report is returned. */
614
+ truncated: boolean;
615
+ /** Why the listing was `truncated`, as a clause that follows the subject ("holds more than ..."); empty otherwise. */
616
+ truncatedDetail: string;
544
617
  };
545
618
  /**
546
619
  * {@link listPersistedReportsBoundedWithSkips} without the skipped entries,
@@ -365,7 +365,21 @@ export function expirePersistedReport(reportsDir, sessionId, now = new Date(), t
365
365
  * `understanding-gate approve` CLI, which writes no signed marker).
366
366
  */
367
367
  export function checkPersistedReport(reportsDir, sessionId) {
368
- const reports = listPersistedReportsBounded(reportsDir);
368
+ // Bounded by entry count: the directory is agent-writable, and a read of
369
+ // hundreds of thousands of planted entries runs the hook past its budget,
370
+ // which the runtime treats as an allow. Past the bound nothing is opened and
371
+ // the answer is no evidence (never an approval, so the block stands).
372
+ const listing = listPersistedReportsBoundedWithSkips(reportsDir, {
373
+ maxEntries: MAX_HOOK_LISTING_ENTRIES,
374
+ });
375
+ if (listing.truncated) {
376
+ return {
377
+ claimsApproved: false,
378
+ detail: `no report evidence read: ${reportsDir} ${listing.truncatedDetail}`,
379
+ report: null,
380
+ };
381
+ }
382
+ const reports = listing.reports;
369
383
  if (reports.length === 0) {
370
384
  return {
371
385
  claimsApproved: false,
@@ -473,12 +487,12 @@ export const MAX_HASHED_REPORT_BYTES = 1024 * 1024;
473
487
  * thousands of them. The scan reads the newest file first, which is where the
474
488
  * approved report usually is.
475
489
  *
476
- * This bounds the hash scan only, not the hook as a whole by entry count: the
477
- * evidence read that follows a refused marker (shared with the no-marker path,
478
- * `listPersistedReportsBounded`) still opens and parses every `*.json` entry,
479
- * so a directory of hundreds of thousands of planted entries still takes the
480
- * hook past the PreToolUse budget, which the runtime treats as an allow. A
481
- * follow-up task bounds that read.
490
+ * The other full-directory reads on the PreToolUse path spend the same
491
+ * budget with the same floor, each its own (a fresh {@link ReadBudget} per
492
+ * listing, not one shared across the hook call): the evidence read, the
493
+ * auto-approval precondition listing, the subagent-delegation lookup and the
494
+ * parse-error log lookup each read at most about 32 MiB, and none opens an
495
+ * entry once the directory holds more than {@link MAX_HOOK_LISTING_ENTRIES}.
482
496
  */
483
497
  export const MAX_HASH_SCAN_BYTES = 32 * 1024 * 1024;
484
498
  /**
@@ -488,6 +502,107 @@ export const MAX_HASH_SCAN_BYTES = 32 * 1024 * 1024;
488
502
  * count: 32 MiB / 4 KiB = 8192 entries.
489
503
  */
490
504
  export const MIN_SCAN_ENTRY_COST_BYTES = 4096;
505
+ /**
506
+ * Most entries (8192, the hash scan's budget divided by its per-entry floor)
507
+ * a PreToolUse-path reader accepts in one agent-writable directory. The hash
508
+ * scan stops at its budget, but four more readers on the same hook path used
509
+ * to open every entry (the evidence read, the auto-approval precondition
510
+ * listing, the subagent-delegation lookup, the parse-error log lookup), so a
511
+ * directory of hundreds of thousands of planted entries took the hook past the
512
+ * 15 s PreToolUse budget, which the runtime treats as an allow (measured at
513
+ * 400k planted entries: 408195 opens and 28.9 s of CPU in the Claude Code
514
+ * hook). The count alone left each entry readable up to the 1 MiB per-file
515
+ * cap, so every one of those readers also charges the entries it reads against
516
+ * {@link MAX_HASH_SCAN_BYTES} (see {@link ReadBudget}).
517
+ *
518
+ * A reader does not take a newest window of such a directory: a partial view
519
+ * would let a hidden newer entry change a selection (an auto-approval would
520
+ * adopt an older pending report while a newer, hidden one is already
521
+ * approved). Past either bound (more entries, or more report data than the
522
+ * byte budget) it returns nothing and reports the directory as too large to
523
+ * read, and each reader treats that as no evidence: the evidence read
524
+ * reports no report, the auto-approval path declines, the delegation lookup
525
+ * captures nothing and the parse-error lookup finds nothing. None of them
526
+ * allows. The directory listing stops as soon as the bound is crossed. See
527
+ * {@link listDirNamesBounded}.
528
+ */
529
+ export const MAX_HOOK_LISTING_ENTRIES = MAX_HASH_SCAN_BYTES / MIN_SCAN_ENTRY_COST_BYTES;
530
+ /**
531
+ * Most entries (matching or not) {@link listDirNamesBounded} iterates in one
532
+ * directory, as a multiple of `maxEntries`. The reports and parse-errors
533
+ * directories hold nothing but their `*.json` and `*.log` entries, so a
534
+ * directory with many more names than that is planted, not real.
535
+ */
536
+ const HOOK_LISTING_SCAN_FACTOR = 2;
537
+ const TRUNCATED_REMEDY = "remove non-report or stale *.json entries from it by hand (`harness gc` removes only aged approved or expired reports)";
538
+ /** Clause a past-the-entry-bound listing reports; the caller supplies the subject. */
539
+ const ENTRIES_TRUNCATED_DETAIL = `holds more than ${MAX_HOOK_LISTING_ENTRIES} *.json entries, or more than ${MAX_HOOK_LISTING_ENTRIES * HOOK_LISTING_SCAN_FACTOR} entries of any name, more than the gate reads; ${TRUNCATED_REMEDY}`;
540
+ /** Clause a past-the-byte-budget listing reports; the caller supplies the subject. */
541
+ const BYTES_TRUNCATED_DETAIL = `holds more than ${MAX_HASH_SCAN_BYTES / (1024 * 1024)} MiB of report data, more than the gate reads; ${TRUNCATED_REMEDY}`;
542
+ /**
543
+ * Names under `dir` ending in `suffix`, or none and `truncated: true` when
544
+ * there are more than `maxEntries` of them. The one listing the bounded
545
+ * PreToolUse-path readers share, so the bound lives in one place; a missing or
546
+ * unreadable directory lists nothing and is not `truncated`.
547
+ *
548
+ * The listing reads the directory one entry at a time and stops as soon as
549
+ * `maxEntries + 1` matching names have been seen, or `maxScanned` entries of
550
+ * any name (default: {@link HOOK_LISTING_SCAN_FACTOR} times `maxEntries`),
551
+ * so millions of planted names, matching or not, cost a bounded number of
552
+ * directory reads and no allocation of their names. The directory handle is
553
+ * always closed. An unbounded `maxEntries` reads the whole directory. The
554
+ * names come back in ascending byte order (the `fs.readdirSync` order), not
555
+ * in the filesystem's iteration order.
556
+ */
557
+ export function listDirNamesBounded(dir, suffix, maxEntries, maxScanned = maxEntries * HOOK_LISTING_SCAN_FACTOR) {
558
+ let handle;
559
+ try {
560
+ handle = fs.opendirSync(dir);
561
+ }
562
+ catch {
563
+ return { names: [], truncated: false };
564
+ }
565
+ const names = [];
566
+ let scanned = 0;
567
+ try {
568
+ for (let entry = handle.readSync(); entry !== null; entry = handle.readSync()) {
569
+ scanned += 1;
570
+ if (scanned > maxScanned)
571
+ return { names: [], truncated: true };
572
+ if (!entry.name.endsWith(suffix))
573
+ continue;
574
+ names.push(entry.name);
575
+ if (names.length > maxEntries)
576
+ return { names: [], truncated: true };
577
+ }
578
+ }
579
+ catch {
580
+ return { names: [], truncated: false };
581
+ }
582
+ finally {
583
+ try {
584
+ handle.closeSync();
585
+ }
586
+ catch {
587
+ // Already gone; nothing left to release.
588
+ }
589
+ }
590
+ return { names: sortNamesByBytes(names), truncated: false };
591
+ }
592
+ /**
593
+ * `names` in ascending byte order of their UTF-8 encoding: the order
594
+ * `fs.readdirSync` returns (libuv sorts its scandir with `strcmp`), so the
595
+ * readers that took names from it before {@link listDirNamesBounded} read
596
+ * the directory one entry at a time keep the same order, and ties in their
597
+ * own newest-first sort stay deterministic instead of following the
598
+ * filesystem's iteration order.
599
+ */
600
+ function sortNamesByBytes(names) {
601
+ return names
602
+ .map((name) => ({ name, key: Buffer.from(name, "utf8") }))
603
+ .sort((a, b) => Buffer.compare(a.key, b.key))
604
+ .map((entry) => entry.name);
605
+ }
491
606
  /**
492
607
  * Iterative walk over the arrays and objects of `value` (the value itself is
493
608
  * level 1) that stops at the first one nested deeper than `max` levels.
@@ -567,6 +682,12 @@ const SYMLINK_REFUSED = {
567
682
  reason: "not-regular",
568
683
  detail: "a symbolic link, not a regular file",
569
684
  };
685
+ /** What `readReportFileBounded` returns once its `budget` is spent; nothing is opened. */
686
+ const OVER_BUDGET = {
687
+ ok: false,
688
+ reason: "over-budget",
689
+ detail: "not read: the reader's byte budget is spent",
690
+ };
570
691
  function errorCode(err) {
571
692
  const code = err?.code;
572
693
  return typeof code === "string" ? code : String(err);
@@ -591,8 +712,16 @@ function errorCode(err) {
591
712
  * not-regular by the open itself (`ELOOP`), with no earlier `lstat` for a
592
713
  * swap to race. Off by default, so every hook read keeps following links
593
714
  * exactly as before; `harness approve understanding` turns it on.
715
+ *
716
+ * `opts.budget` charges the read against {@link MAX_HASH_SCAN_BYTES} the way
717
+ * the hash scan does (the larger of the `fstat` size and
718
+ * {@link MIN_SCAN_ENTRY_COST_BYTES} per entry, taken before the read); once
719
+ * the budget is spent the call opens nothing and returns `over-budget`.
594
720
  */
595
721
  export function readReportFileBounded(filePath, opts = {}) {
722
+ const budget = opts.budget;
723
+ if (budget !== undefined && budget.spent >= MAX_HASH_SCAN_BYTES)
724
+ return OVER_BUDGET;
596
725
  let fd;
597
726
  try {
598
727
  fd = fs.openSync(filePath, fs.constants.O_RDONLY |
@@ -600,12 +729,24 @@ export function readReportFileBounded(filePath, opts = {}) {
600
729
  (opts.noFollow === true ? fs.constants.O_NOFOLLOW : 0));
601
730
  }
602
731
  catch (err) {
732
+ if (budget !== undefined)
733
+ budget.spent += MIN_SCAN_ENTRY_COST_BYTES;
603
734
  if (opts.noFollow === true && errorCode(err) === "ELOOP")
604
735
  return SYMLINK_REFUSED;
605
736
  return { ok: false, reason: "unreadable", detail: `could not be opened (${errorCode(err)})` };
606
737
  }
607
738
  try {
608
739
  const stat = fs.fstatSync(fd);
740
+ // Charged from the descriptor's size BEFORE the read, so the bytes read
741
+ // never run past the budget by more than the one file in flight: the
742
+ // larger of the size and the per-entry floor for a file about to be read,
743
+ // the floor for one that is refused unread.
744
+ if (budget !== undefined) {
745
+ budget.spent +=
746
+ stat.isFile() && stat.size <= MAX_HASHED_REPORT_BYTES
747
+ ? Math.max(stat.size, MIN_SCAN_ENTRY_COST_BYTES)
748
+ : MIN_SCAN_ENTRY_COST_BYTES;
749
+ }
609
750
  if (!stat.isFile())
610
751
  return { ok: false, reason: "not-regular", detail: "not a regular file" };
611
752
  if (stat.size > MAX_HASHED_REPORT_BYTES) {
@@ -683,22 +824,34 @@ export function canonicalReportHashOfFile(filePath, opts = {}) {
683
824
  * and `MIN_SCAN_ENTRY_COST_BYTES`; once the charges reach `MAX_HASH_SCAN_BYTES`
684
825
  * with a wanted hash still unfound the scan stops and sets `budgetExhausted`,
685
826
  * so the number of entries opened and the bytes read (about 32 MiB, the last
686
- * file read may add up to the per-file cap) are both bounded by the budget,
687
- * however many entries the directory holds. The `readdir` and the name sort
688
- * of the directory itself are outside the budget, and so is the evidence read
689
- * a refused marker falls through to (`listPersistedReportsBounded`), which
690
- * still opens every `*.json` entry.
827
+ * file read may add up to the per-file cap) are both bounded by the budget.
828
+ *
829
+ * The directory is listed through {@link listDirNamesBounded}, one entry at a
830
+ * time, so the listing is bounded too: it stops as soon as it has seen more
831
+ * than {@link MAX_HOOK_LISTING_ENTRIES} `*.json` names, or twice that many
832
+ * entries of any name, and then no entry is opened and the scan sets
833
+ * `truncated` (the caller denies: fail closed). Within those bounds the
834
+ * selection is unchanged: every `*.json` name, newest first (descending byte
835
+ * order), within the byte budget. Planted names that sort after the report
836
+ * names are read first, so they spend the budget before the real report is
837
+ * reached once they and the other entries add up to 32 MiB of charges; past
838
+ * the entry bound the scan does not start. Either way it denies, never
839
+ * allows.
691
840
  */
692
841
  function scanReportHashes(dir, wanted) {
693
- const scan = { files: 0, matched: new Set(), budgetExhausted: false };
694
- let names;
695
- try {
696
- names = fs.readdirSync(dir);
697
- }
698
- catch {
842
+ const scan = {
843
+ files: 0,
844
+ matched: new Set(),
845
+ budgetExhausted: false,
846
+ truncated: false,
847
+ };
848
+ const listed = listDirNamesBounded(dir, ".json", MAX_HOOK_LISTING_ENTRIES);
849
+ if (listed.truncated) {
850
+ scan.truncated = true;
699
851
  return scan;
700
852
  }
701
- names = names.filter((name) => name.endsWith(".json")).sort().reverse();
853
+ // Ascending byte order from the listing; the scan takes the newest name first.
854
+ const names = listed.names.reverse();
702
855
  let hashedBytes = 0; // budget charged so far, see the charge below
703
856
  for (const name of names) {
704
857
  scan.files += 1;
@@ -762,20 +915,26 @@ function scanReportHashes(dir, wanted) {
762
915
  * (bytes read or the floor, whichever is larger, whatever the read returned):
763
916
  * past the budget the check denies with the mismatch reason (fail closed).
764
917
  * That bounds the entries opened (8192) and the bytes read (about 32 MiB, the
765
- * last file read may add up to the 1 MiB per-file cap). Three costs remain.
766
- * A legitimate approval whose report sits behind that much newer report data
767
- * (by name, descending) is denied; re-approving writes a new, newest report
768
- * and recovers only when the newer entries are real reports: planted `*.json`
769
- * names that sort after the timestamped report names (for example names
770
- * starting with a letter) stay newer than any new report and keep denying
771
- * until removed. The `readdir` plus name sort of the directory itself are not
772
- * charged, so a directory of hundreds of thousands of entries still costs that
773
- * listing before the scan starts. And the hash scan is not the whole hook:
774
- * the evidence read that follows a refused marker (shared with the no-marker
775
- * path, `listPersistedReportsBounded`) still opens and parses every `*.json`
776
- * entry, so the hook as a whole is still unbounded by entry count and a
777
- * large planted directory runs it past the PreToolUse budget (an allow); a
778
- * follow-up task bounds that read.
918
+ * last file read may add up to the 1 MiB per-file cap). The directory listing
919
+ * is bounded as well ({@link listDirNamesBounded}, one entry at a time): past
920
+ * {@link MAX_HOOK_LISTING_ENTRIES} `*.json` entries, or twice that many entries
921
+ * of any name, the check opens nothing and denies with a reason that names the
922
+ * bound and the remedy (fail closed), so the listing cost is bounded by that
923
+ * count however many names are planted. Two costs remain. A legitimate
924
+ * approval whose report sits behind that much newer report data (by name,
925
+ * descending) is denied; re-approving writes a new, newest report and recovers
926
+ * only when the newer entries are real reports: planted `*.json` names that
927
+ * sort after the timestamped report names (for example names starting with a
928
+ * letter) stay newer than any new report and keep denying until removed (the
929
+ * same holds past the entry bound, where the scan does not start at all).
930
+ * A reports directory with more entries than the bound is denied even when the
931
+ * approved report is among them, until entries are removed by hand. The hash
932
+ * scan is not the whole hook: the other full-directory reads on it (the
933
+ * evidence read, the auto-approval listing, the delegation lookup and the
934
+ * parse-error lookup) list the directory entry by entry and stop once
935
+ * {@link MAX_HOOK_LISTING_ENTRIES} entries are crossed, and charge the entries
936
+ * they read against the same byte budget; past either bound they open or read
937
+ * nothing more and fail closed.
779
938
  *
780
939
  * Removing the approved report while other report files remain is a deny:
781
940
  * nothing on disk carries the signed content any more. `harness gc --apply`
@@ -809,6 +968,18 @@ export function verifyApprovedReportHash(reportsDir, primary, fallback = null) {
809
968
  wanted.add(fallback.reportContentHash);
810
969
  }
811
970
  const scan = scanReportHashes(reportsDir, wanted);
971
+ if (scan.truncated) {
972
+ // Checked before the "no report file" allow below: a directory too large
973
+ // to list holds report files the gate did not read, so it is not empty.
974
+ const truncatedKinds = fallback !== null
975
+ ? `${primary.kind} and ${fallback.kind} approval markers were`
976
+ : `${primary.kind} approval marker was`;
977
+ return {
978
+ ok: false,
979
+ detail: `no report in the reports directory could be checked against the content the ${truncatedKinds} signed for ` +
980
+ `(the reports directory ${reportsDir} ${ENTRIES_TRUNCATED_DETAIL})`,
981
+ };
982
+ }
812
983
  if (scan.files === 0 || scan.matched.has(primary.reportContentHash)) {
813
984
  return { ok: true, kind: primary.kind };
814
985
  }
@@ -859,20 +1030,28 @@ export function verifyApprovedReportHash(reportsDir, primary, fallback = null) {
859
1030
  * put (tests/decisions-citations-resolve.test.ts pins them).
860
1031
  */
861
1032
  export function listPersistedReportsBoundedWithSkips(dir, opts = {}) {
862
- let names = [];
863
- try {
864
- names = fs.readdirSync(dir);
865
- }
866
- catch {
867
- // No readable directory: no reports.
1033
+ // `maxEntries` is set by the PreToolUse-path readers (see
1034
+ // `MAX_HOOK_LISTING_ENTRIES`); the operator commands leave it unset. Setting
1035
+ // it applies both bounds of one hook read: the entry count, and the byte
1036
+ // budget every entry read is charged against (see `MAX_HASH_SCAN_BYTES`).
1037
+ const bounded = opts.maxEntries !== undefined;
1038
+ const listed = listDirNamesBounded(dir, ".json", opts.maxEntries ?? Number.POSITIVE_INFINITY);
1039
+ if (listed.truncated) {
1040
+ return { reports: [], skipped: [], truncated: true, truncatedDetail: ENTRIES_TRUNCATED_DETAIL };
868
1041
  }
1042
+ const budget = bounded ? { spent: 0 } : undefined;
869
1043
  const reports = [];
870
1044
  const skipped = [];
871
- for (const name of names.filter((n) => n.endsWith(".json"))) {
1045
+ for (const name of listed.names) {
872
1046
  const full = path.join(dir, name);
873
1047
  // `refuseSymlinks` opens with O_NOFOLLOW, so a link is recorded as skipped
874
1048
  // by the open itself and no earlier lstat can race a swap.
875
- const read = readReportFileBounded(full, { noFollow: opts.refuseSymlinks === true });
1049
+ const read = readReportFileBounded(full, { noFollow: opts.refuseSymlinks === true, budget });
1050
+ // All or nothing: a listing that ran out of budget cannot say which
1051
+ // report is the newest, so it returns no report at all.
1052
+ if (!read.ok && read.reason === "over-budget") {
1053
+ return { reports: [], skipped: [], truncated: true, truncatedDetail: BYTES_TRUNCATED_DETAIL };
1054
+ }
876
1055
  if (!read.ok) {
877
1056
  skipped.push({ filePath: full, reason: read.reason, detail: read.detail });
878
1057
  continue;
@@ -882,7 +1061,7 @@ export function listPersistedReportsBoundedWithSkips(dir, opts = {}) {
882
1061
  reports.push(report);
883
1062
  }
884
1063
  reports.sort((a, b) => b.createdAtMs - a.createdAtMs);
885
- return { reports, skipped };
1064
+ return { reports, skipped, truncated: false, truncatedDetail: "" };
886
1065
  }
887
1066
  /**
888
1067
  * {@link listPersistedReportsBoundedWithSkips} without the skipped entries,
@@ -1 +1 @@
1
- {"version":3,"file":"persisted-reports.js","sourceRoot":"","sources":["../../../../src/policy-packs/builtin/understanding-before-execution/persisted-reports.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yEAAyE;AACzE,2EAA2E;AAC3E,uEAAuE;AACvE,kCAAkC;AAClC,EAAE;AACF,0EAA0E;AAC1E,+DAA+D;AAC/D,wEAAwE;AACxE,2EAA2E;AAC3E,kEAAkE;AAClE,mBAAmB;AAEnB,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AA8BjE,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AACtD,MAAM,cAAc,GAAG,SAAS,CAAC;AAEjC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAE/D;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC7C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACtE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,uBAAuB,EAAE,cAAc,CAAC,CAAC;AACjE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAAoB;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,uBAAuB,EAAE,cAAc,CAA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CAAC,CAAC,OAAO,CAAC;AAC3D,CAAC"}
1
+ {"version":3,"file":"persisted-reports.js","sourceRoot":"","sources":["../../../../src/policy-packs/builtin/understanding-before-execution/persisted-reports.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yEAAyE;AACzE,2EAA2E;AAC3E,uEAAuE;AACvE,kCAAkC;AAClC,EAAE;AACF,0EAA0E;AAC1E,+DAA+D;AAC/D,wEAAwE;AACxE,2EAA2E;AAC3E,kEAAkE;AAClE,mBAAmB;AAEnB,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AA8BjE,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AACtD,MAAM,cAAc,GAAG,SAAS,CAAC;AAEjC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAE/D;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC7C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACtE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,uBAAuB,EAAE,cAAc,CAAC,CAAC;AACjE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAAoB;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,uBAAuB,EAAE,cAAc,CAAC,CAAC;AACxF,CAAC;AAED;;;;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