fix(build): DIGEST_RELPATH is a forward-slash literal on every platform

path.join built it with backslashes on Windows, so the wiring test's
string comparisons against setup and hosts/*.ts (which carry the
forward-slash literal) could never match there — windows-free-tests red.
path.join(root, DIGEST_RELPATH) at the write site normalizes fine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-29 15:00:23 +00:00
co-authored by Claude Fable 5
parent c2c76816aa
commit b811d4c311
+5 -1
View File
@@ -27,7 +27,11 @@ import * as fs from 'fs';
import * as path from 'path';
const ROOT = path.resolve(import.meta.dir, '..');
export const DIGEST_RELPATH = path.join('agents-digest', 'gstack-AGENTS.md');
// Repo-relative with FORWARD slashes on every platform: this constant is
// compared against literals in shell scripts, host configs, and docs (the
// wiring test), where a Windows path.join backslash form would never match.
// path.join(root, DIGEST_RELPATH) at the write site normalizes it fine.
export const DIGEST_RELPATH = 'agents-digest/gstack-AGENTS.md';
export const DIGEST_BYTE_BUDGET = 2048;
export function generateAgentsDigest(opts?: { root?: string }): { content: string; bytes: number } {