GGustavo Cateimfix(hooks): raise SessionStart timeout to 30s
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(hooks): run SessionStart command under Codex | 1 个月前 | |
hooks: keep the skill body when frontmatter is never closed The three runtimes disagreed on a malformed SKILL.md whose opening --- has no closing delimiter. Node's regex only strips a *complete* fence, so it kept the whole file; the sh and PowerShell fallbacks entered frontmatter mode and never left, injecting the banner - which promises "the ruleset below applies" - followed by nothing. Treat an unterminated fence as not-frontmatter everywhere: PowerShell only strips when the closing delimiter was found, and the awk script becomes two-pass so the strip decision is made after seeing whether the fence ever closes. A parity test pins all runtimes to identical output for this input, alongside the existing trailing-whitespace case. Verified on Windows (PS 5.1 + Git bash awk 5.4): 4/4 tests pass; reverting only always-on.ps1 fails exactly the new test with the banner-plus-empty-body output. | 2 个月前 | |
hooks: keep the skill body when frontmatter is never closed The three runtimes disagreed on a malformed SKILL.md whose opening --- has no closing delimiter. Node's regex only strips a *complete* fence, so it kept the whole file; the sh and PowerShell fallbacks entered frontmatter mode and never left, injecting the banner - which promises "the ruleset below applies" - followed by nothing. Treat an unterminated fence as not-frontmatter everywhere: PowerShell only strips when the closing delimiter was found, and the awk script becomes two-pass so the strip decision is made after seeing whether the fence ever closes. A parity test pins all runtimes to identical output for this input, alongside the existing trailing-whitespace case. Verified on Windows (PS 5.1 + Git bash awk 5.4): 4/4 tests pass; reverting only always-on.ps1 fails exactly the new test with the banner-plus-empty-body output. | 2 个月前 | |
fix(hooks): raise SessionStart timeout to 30s The always-on launcher is capped at 5s, which measures Node's cold start under contention rather than the hook's own work. With several other SessionStart hooks registered, the launcher took 6549ms and was cancelled, so the ruleset was silently dropped from the session. The hook only does an existsSync, a readFileSync and a regex strip, with no network or blocking I/O, and it exits 0 immediately when the opt-in flag is absent. A wider ceiling cannot stall a session in practice, and 30s stays under Claude Code's 60s hook default. | 1 个月前 |