This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

export commandFingerprint + fast-fail defaults + commandWithEnvExports

Sub-batch 1/N of the reboot cutover branch. Foundation moves — convoy's
reconcile loop needs identical shape for the wire-format freeze.

- src/sessions.ts: commandFingerprint() flips from internal to export;
docstring pins the wire-format contract (16-char lowercase hex of
SHA-256 of command + \0 + args.join(\0)).
- src/client-api.ts: re-exports commandFingerprint,
DEFAULT_FAST_FAIL_WINDOW_SEC, DEFAULT_FAST_FAIL_LIMIT. Also exports
commandWithEnvExports from ptyfile.ts (already had readPtyFile —
convoy reads pty.toml verbatim per spec §4 and needs both).

Cutover-branch commit; does NOT merge until the reboot moment.
Corresponding pty-side deletes (classifyFlapping, respawnPermanent,
gc STEP-2, --fast-fail-* flags, pty up/down) come in subsequent commits
on this branch.

Nathan Herald (Jul 7, 2026, 12:51 PM +0200) 0b454ded 4dd6f9f5

+14 -4
+7 -2
src/client-api.ts
··· 42 42 type FollowerOptions, 43 43 } from "./events.ts"; 44 44 45 - // Project files 46 - export { readPtyFile, type PtyFile, type PtySessionDef } from "./ptyfile.ts"; 45 + // Project files — pty.toml reader shared with convoy's manifest processing 46 + // (convoy reads pty.toml verbatim per notes/lean-pty-core-supervision-spec.md §4). 47 + export { readPtyFile, commandWithEnvExports, type PtyFile, type PtySessionDef } from "./ptyfile.ts"; 48 + 49 + // Reboot-cutover: shared classifier primitives that convoy's respawn loop 50 + // mirrors verbatim (spec §5 + §8.1 wire-format freeze). 51 + export { commandFingerprint, DEFAULT_FAST_FAIL_WINDOW_SEC, DEFAULT_FAST_FAIL_LIMIT } from "./sessions.ts"; 47 52 48 53 // Tag filter helpers (used by --filter-tag; shared with pty-relay) 49 54 export { extractFilterTags, matchesAllTags, isReservedTagKey } from "./tags.ts";
+7 -2
src/sessions.ts
··· 460 460 /** SHA-256 of a session's respawn command line, used to auto-reset the 461 461 * fast-fail counter when the operator edits the pty.toml (or otherwise 462 462 * changes the stored command). Kept short — the tag surface is user- 463 - * facing, not a cryptographic identifier. */ 464 - function commandFingerprint(command: string, args: string[]): string { 463 + * facing, not a cryptographic identifier. 464 + * 465 + * Exported on `@myobie/pty/client` so convoy's reconcile loop computes 466 + * identical hashes (see `notes/lean-pty-core-supervision-spec.md` §8.1 467 + * — wire-format freeze). Any change to the hash shape requires a joint 468 + * version bump across pty and convoy. */ 469 + export function commandFingerprint(command: string, args: string[]): string { 465 470 const h = createHash("sha256"); 466 471 h.update(command); 467 472 h.update("\0");