@akagilnc/pi-workflow-roles 0.1.2175 → 0.1.2177

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.2175",
3
+ "version": "0.1.2177",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -152,6 +152,17 @@ function appendActivationLedgerLine(
152
152
  ensureRealDirectoryTree(resolvedHome, parent);
153
153
  assertLedgerFileInsideHome(resolvedLedger, resolvedHome);
154
154
 
155
+ // Fail-closed guard (same shape as PR #418's publication seam): on platforms
156
+ // without O_NOFOLLOW (e.g. Windows, nodejs/node#41590) the JS bitwise-or in
157
+ // ACTIVATION_LEDGER_APPEND_OPEN_FLAGS would silently drop the flag and the
158
+ // lstat→open TOCTOU anti-symlink protection would vanish while the comment
159
+ // above still claims it. Refuse loudly via the existing typed ledger failure
160
+ // channel instead of appending unprotected; never silently degrade.
161
+ if (typeof constants.O_NOFOLLOW !== "number") {
162
+ throw new ActivationLedgerError(
163
+ "activation ledger append requires O_NOFOLLOW open-flag support (anti-symlink TOCTOU protection must not be silently dropped); refusing to append",
164
+ );
165
+ }
155
166
  const bytes = Buffer.isBuffer(line) ? line : Buffer.from(line);
156
167
  let ledgerFd: number | undefined;
157
168
  let primaryFailure: unknown;