Commit Graph
769 Commits
Author SHA1 Message Date
haelyra a032472448 Merge reviewed PR #2856
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-05 23:28:21 -05:00
haelyra 3bb22fd363 Merge reviewed PR #3787
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-05 23:27:44 -05:00
haelyra 324c4187ba Merge reviewed PR #3860 2026-11-05 23:24:35 -05:00
haelyra a0e6eb56e4 Merge reviewed PR #3830 2026-11-05 23:24:06 -05:00
haelyra ee1ec55232 Merge reviewed PR #3820 2026-11-05 23:12:13 -05:00
haelyra 5e170cfa10 Merge reviewed PR #3813 2026-11-05 23:12:13 -05:00
haelyra 917ed1fd2c Merge reviewed PR #3873 2026-11-05 23:11:46 -05:00
haelyra c20ca2f20c Merge reviewed PR #3872 2026-11-05 23:11:46 -05:00
haelyra 01e4f8bd44 Merge reviewed PR #3864 2026-11-05 23:11:09 -05:00
haelyra fceb970215 Merge reviewed PR #3862 2026-11-05 23:11:09 -05:00
haelyra 912fc63c41 Merge reviewed PR #3671 2026-11-05 23:10:45 -05:00
haelyra ab10daba18 Merge reviewed PR #3870 2026-11-05 23:10:32 -05:00
Cheese 4385863e56 fix(scripts): reject inherited package manager names 2026-11-06 11:52:10 +08:00
Rahul Selvaraj feac4f52ba fix(hooks): match the full classifier notice, isolate test env
CLASSIFIER_NOTICE matched by prefix, so a pasted notice followed by a
user question was dropped from both summary paths. Anchor it to the
whole message so trailing user text is kept, and add a regression test.

Also pass ECC_SKIP_LLM_SUMMARY=1 in the withTranscript fixture helper so
an inherited ECC_LLM_SUMMARY_INTERVAL=1 cannot trigger claude -p.

Refs #3867

Assisted-by: Claude <noreply@anthropic.com>
2026-11-06 08:47:21 +08:00
L4XB 30eb570117 fix(hooks): read NUL-ended delimiters, Bash blanks before #, and long bodies
Bash ends a decoded $'...' string at its first NUL, so `cat <<$'EOF\0X'`
ends at the line EOF, but the splitter looked for EOF\0X and swallowed
the commands after the body. A carriage return or a no-break space is
not a blank to Bash, so `echo foo\r# && npm run dev` runs the dev
server, but the splitter read the # as a comment. And spreading a long
substitution's segments into push() threw RangeError, which the hook's
catch turned into an allow. Truncate the decoded part at the NUL, use
Bash's blanks for word starts, and append the segments one at a time.
2026-11-05 13:07:21 +01:00
Rahul Selvaraj 846a561a7b fix(hooks): drop classifier notices from LLM summary input
The safety-classifier notice filter only covered the mechanical summary.
When generateSessionSummary runs (low context or message interval),
extractConversationText read the raw transcript and passed the notice to
the LLM as a user turn, so it could still reach saved context.

Move the check into one shared isClassifierNotice() in
scripts/lib/llm-summary.js and use it in both userMessageText() and
extractConversationText(). Add LLM-path regression tests, and split the
session-end classifier-notice tests into small functions (<50 lines).

Refs #3867

Assisted-by: Claude <noreply@anthropic.com>
2026-11-05 18:06:51 +08:00
L4XB 04f32e06e7 Merge remote-tracking branch 'origin/main' into fix/shell-split-newlines 2026-11-05 10:27:19 +01:00
L4XB 80a26c2ceb fix(hooks): read $$ as the process ID before looking for $'...'
In `echo $$'\'; npm run dev`, Bash reads `$$` as the process-ID parameter
and the quote after it as an ordinary single quote, so it runs
`npm run dev`. The splitter took the second `$` as the start of ANSI-C
quoting, which hid the semicolon, and a here-document delimiter such as
`$$'EOF'` was read as `$EOF`, so the body never ended. Consume the `$$`
pair first in both places.
2026-11-05 10:27:19 +01:00
haelyra 7a0188db61 fix(hooks): honor Bash quote boundaries in dev guard
(cherry picked from commit f4bf43c550)
2026-11-05 10:23:23 +01:00
kevin 3d7034872e fix(memory): scan decoded fields for secrets, not serialized JSON 2026-11-05 06:27:55 +09:00
kevin cfe051de5f fix(memory): flag GitHub ghu_ tokens as suspected secrets 2026-11-05 06:19:48 +09:00
huangpz6andTRAE 464440aa51 test(hooks): emit the aggregated summary the runner parses (#3864)
The suite printed 'N passed, M failed', which parseCounts ignores, so its three cases vanished from combined totals. Use the runner's Passed:/Failed: format.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 22:07:01 +08:00
huangpz6andTRAE 5dcd3d66f7 test(hooks): cover the shared recovery-hint parser directly (#3864)
scripts/lib additions require a matching tests/lib test. Exercise normalization, default argument handling and the hidden-by-default set.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:53:11 +08:00
huangpz6andTRAE 01c2426b2c fix(gateguard): classify settings through real paths and .claude project roots (#3862)
A symlink alias to .claude/settings.json resolved past the lexical settings check, and a project whose root is .claude collapsed the class path to bare settings.json. Judge the resolved absolute path and the symlink-resolved path as well, with regressions for both.

Co-Authored-By: TRAE <noreply@trae.ai>
2026-11-04 21:52:33 +08:00
Codex f841420f22 ci: parallelize Windows full tests and preserve fixture isolation
Run the Windows full suite with two workers while retaining serial suites and exact file accounting. Resolve Bash before restricting fixture PATH, and add five junction regressions while retaining native symlink coverage.

Validation: both local full runs executed all 456 files exactly once; 9108 passed and the same 24 symlink-permission cases failed. Two workers reduced local runtime from 1324.987s to 885.387s. The 24 native symlink cases passed in the baseline GitHub Windows job.
2026-11-04 09:30:26 +09:00
Misty-Star d12137e1b7 fix: adapt Grok hooks for Windows tool execution 2026-11-03 18:59:28 +08:00
Misty-Star 34c20e751b Merge remote-tracking branch 'origin/main' into pr/2856
# Conflicts:
#	manifests/context-packs/skill-triggers@1.json
2026-11-02 16:00:47 +08:00
Misty-Star 06f6008165 merge: resolve PR 2856 conflicts with main 2026-11-02 15:35:10 +08:00
Brian fbd14b4431 test: skip inside the cleanup scope so fixtures are always removed
Review on #3830 found that memory-vault's symlink guard sat above the
try/finally that removes the fixture, so a refusal returned before
cleanup and left the directory in the OS temp dir.

Auditing the other guard sites turned up the same shape in memory-mcp,
where binRoot is created before the guard and only removed in the
finally. Six leaked ecc-memory-bin-* directories were still sitting in
this host's temp dir from earlier runs.

Both guards now sit immediately inside the try. Verified by counting
ecc-* temp directories either side of a run of both files: delta 0.

The remaining guard sites were checked and are already inside their
cleanup scope.
2026-10-31 13:54:10 -04:00
Brian 434ded9b9d test: drive trySymlink through injected deps instead of patching globals
Review on #3830 pointed out that the helper's tests replaced methods on
the shared fs and console objects, which AGENTS.md rules out, and that
the recording arrays were mutated with push.

trySymlink now takes an optional deps argument in the shape
collectResources already uses, `(deps.symlinkSync || fs.symlinkSync)`,
so the refusal branches can be driven without touching anything shared.
The 13 existing call sites pass at most three arguments and are
unchanged. The recorders rebuild their arrays rather than appending.

Also adds a case that omits deps entirely, so the default dependency is
still covered rather than only the injected one.

Re-verified by mutation: emptying UNSUPPORTED_CODES, returning true
unconditionally, removing the rethrow, dropping the skip notice, and
ignoring the injected stand-in each fail 2 to 4 of the 8 cases.
2026-10-31 13:46:14 -04:00
Brian 0aa90931c4 test: build the artifact list without mutating it
Review on #3830 raised two points against 2f898d7b.

The three artifacts.push calls mutated an array after creating it, which
AGENTS.md rules out ("Immutability (CRITICAL): Always create new objects,
never mutate"). The list is now a single literal with conditional
spreads, so the link-based cases still join it only where the OS allows
the link.

In memory-vault, the readRegularTextFile check on the target reads no
link at all, so the symlink guard now sits below it rather than above.
On a host that refuses the link, that assertion runs instead of being
skipped with the rest.
2026-10-31 13:35:52 -04:00
Brian b22924b797 test: cover the trySymlink skip and rethrow branches
Review on #3830 noted that the helper had no focused tests: a host that
permits symlinks only ever exercises the success branch, so nothing
proved the skip path this PR adds actually works.

Drives fs.symlinkSync with a stand-in to cover success and argument
forwarding, each of the three supported refusal codes, an unrelated
error, and an error with no code at all.

Verified by mutation rather than by a green run: emptying
UNSUPPORTED_CODES, returning true unconditionally, removing the rethrow,
and dropping the skip notice each fail 2 to 3 of the 7 cases.
2026-10-31 13:22:27 -04:00
Brian 2f898d7bfe test: keep non-symlink assertions running when symlinks are refused
Review on #3830 found two places where the early return added in 09de2c24
also skipped assertions that never needed a symlink:

- coordination-inventory: the oversized-JSON and missing-directory checks
  were skipped. The expected task count holds whether or not the link
  exists, so trySymlink is now called as a plain statement.
- frontend-design-direction: the incomplete-gate, malformed-input and
  no-argument checks were skipped. Link-based artifacts are now appended
  only when their link succeeds, so a refusal narrows the case list
  instead of ending the test. The junction case now runs on Windows,
  where it previously sat behind two returns that had already fired.

Also converts the one remaining direct fs.symlinkSync in
opencode-consent-legacy-lock. Junctions are permitted without elevation
on Windows, so that call did not fail here, but it still throws on a
filesystem with no symlink support at all.
2026-10-31 13:19:25 -04:00
Seekers2001 ce8bcbd483 test: remove redundant benchmark routing check 2026-10-31 18:02:53 +08:00
Seekers2001 cb094e9e87 test: cover all benchmark trigger routing paths 2026-10-31 17:55:32 +08:00
Yann Roberto f8b9a40436 fix(scripts): recognize npm-shrinkwrap.json 2026-10-30 21:34:21 +08:00
Yann Roberto 1a6cbb6716 fix(install): preserve Copilot user script scopes 2026-10-30 18:57:51 +08:00
Yann Roberto c68afd7c35 fix(install): isolate Copilot helpers from ESM projects 2026-10-30 18:31:48 +08:00
Seekers2001 088cfa9abd chore: merge upstream main into benchmark optimization 2026-10-30 17:52:28 +08:00
haelyra 35769d00d9 fix(context): validate budgets and remind before native compaction
Reject numeric prefixes, fractions and unsafe window integers consistently with summary scheduling while preserving resolver precedence. Cap only the default context reminder at eighty percent of a valid earlier native compaction budget; explicit thresholds, including zero, retain their intentional policy. Document the independent capacity, summary and advisory contracts.

RED controls reproduce malformed-budget summary triggers and the known-1M/native-200k missed reminder. Resolver65, helper47, actualStop18 and actualPreToolUse54 pass on Node18 and24. Parent and independent reviewer approved the exact diff before commit. Registry rebinding remains the integration coordinator responsibility after combining documentation repairs.
2026-10-29 19:42:27 -07:00
haelyra 96996a13c7 docs: separate summary budgets from context capacity guidance
Clarify native compaction budget scheduling independently of the model window resolver and retain immutable transcript fixtures. Helper43, ten independent scheduling controls, affected lint and independent review passed.
2026-10-29 17:43:59 -07:00
haelyra b37942d3c1 fix(summary): preserve work before the earlier compaction boundary
Separate confirmed model capacity from Stop-summary scheduling. Use the smaller confirmed capacity/native budget, or native-only budget for inferred capacity. Three unit and one actual hook RED cases now pass; helper43, actualStop15 and ten independent controls pass without changing the capacity resolver.
2026-10-29 17:37:52 -07:00
haelyra fc549b6372 fix: preserve Windows rule examples and conservative summary budgets
Address #3809 review regressions for CRLF code fences and inferred context capacity. Reproduced unit and actual Stop-hook failures; verified llm-summary38, Stop14, Copilot37 and independent code/security review. Keep confirmed model/ECC context authority, native budget scheduling and unknown capacity separate.
2026-10-29 17:27:56 -07:00
haelyra 2cdc157205 fix(hooks): integrate reviewed shell quoting and context precedence repairs 2026-10-29 17:03:51 -07:00
haelyra 0036875f86 feat(install): integrate namespaced Copilot rule instructions
Preserve contributor PR #3771 head 4114945775. Repair single-file language namespaces and preserve fenced Markdown examples. Verified 36 adapter/lifecycle and 5 support-surface tests; independent code and security review passed.
2026-10-29 17:02:31 -07:00
haelyra ee21d8da5c fix(hooks): preserve context-window evidence over compact trigger (#3760) 2026-10-29 17:01:04 -07:00
haelyra 5e062a3b3b fix(hooks): integrate reviewed shell quote extraction fix (#3801) 2026-10-29 17:00:10 -07:00
haelyra de8c290057 fix: keep Copilot detector explanation aligned with installed workflow 2026-10-29 13:09:04 -07:00
haelyra f7c4357e1c test: separate legacy realpath fallback from native Windows alias behavior 2026-10-29 13:00:53 -07:00
haelyra 6d7d4920c8 fix: close final integration security and portability gaps 2026-10-29 12:57:39 -07:00