Commit Graph
2600 Commits
Author SHA1 Message Date
haelyra 1bdda4bdac fix: close validator and path edge cases 2026-08-29 15:36:59 -04:00
haelyra 703163275d test: honor per-invocation Bash overrides 2026-08-29 15:11:38 -04:00
dependabot[bot]andhaelyra 2f895a1823 chore(deps): bump actions/setup-python from 6.2.0 to 7.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.2.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/a309ff8b426b58ec0e2a45f0f869d46889d02405...5fda3b95a4ea91299a34e894583c3862153e4b97)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-29 15:01:31 -04:00
haelyra 224da03d01 fix(gateguard): match heredoc tab-strip order 2026-08-29 14:55:14 -04:00
haelyra fab534f924 test(hooks): keep matcher mirrors in sync 2026-08-29 14:55:14 -04:00
a4d72b2271 fix(gateguard): surface graduated recovery hints
Change-Id: I6ade0a2a54a26bd5721c62edf7efa462e8043a08
Co-authored-by: TRAE CLI <traecli@bytedance.com>
2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra c40d0e4f7c fix: normalize heredoc line continuations 2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra 9768c075c3 refactor: keep heredoc scanning linear 2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra 9a3ee6864a refactor: keep heredoc parser state immutable 2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra e72191ba74 fix: harden heredoc command filtering 2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra 962380c452 fix: ignore heredoc prose in GateGuard 2026-08-29 14:55:14 -04:00
Suliman Abdulrazzaqandhaelyra 6fa3efeef7 fix(hooks): use valid wildcard matchers 2026-08-29 14:55:14 -04:00
haelyra 30c41a9bde fix: close truth and portability review gaps 2026-08-29 14:55:14 -04:00
haelyra d08331f14e fix(skill-comply): harden home path redaction 2026-08-29 14:55:13 -04:00
cyreandhaelyra 2242e4d99d fix(skill-comply): redact operator home path from compliance reports
_parse_stream_json() persisted raw tool_input/tool_response content into
ObservationEvents that grade() scores and generate_report() writes to
results/<skill>.md -- a report meant to be shared and reviewed.

--add-dir restricts the agent's additional accessible directory to the
sandbox (SANDBOX_BASE = /tmp/skill-comply-sandbox), but that doesn't stop
the agent's own tool calls (a Bash command using ~ expansion, a scenario
setup_commands entry referencing a dotfile) from emitting the operator's
home directory into tool_input/tool_response -- which then lands
verbatim, truncated but not sanitized, in the written report.

Adds _redact_home_path(), pure stdlib (Path.home()), applied to both
input_str and output_str before they're stored on the ObservationEvent.
Scoped deliberately to the home directory only -- grade() needs real
tool-call semantics for LLM-based compliance classification, so
truncating/stripping content the way a pure logging hook could isn't an
option here; only the operator-identifying path component needs to go.

New TestParseStreamJsonRedactsHomePath class in
skills/skill-comply/tests/test_runner.py (3 tests) -- full file now
10/10 passing, up from 7/7. Confirmed tests/test_invariant_runner.py (the
sandbox-execution security tests from #2149) still passes clean, 4/4.

Fixes #2730
2026-08-29 14:55:13 -04:00
haelyraandLKL-ZREO 9542c33454 test(skill-stocktake): cover canonical symlink discovery
Co-authored-by: LKL-ZREO <891878708@qq.com>
2026-08-29 14:55:13 -04:00
981f97bff4 fix(skill-stocktake): use NUL-delimited paths to avoid newline desync
The find -> sort -> read chain in both scripts used newline-delimited
records (plain read -r), so a skill directory name containing a
literal newline would be split across two records. Verified with a
directory literally named "evil\nskill": the old reader produced a
truncated "evil" fragment plus an orphan "skill/SKILL.md" fragment,
inflating the skill count and throwing awk/date errors on the garbage
paths.

Switch to -print0 / sort -z / read -r -d '' in both scripts so a path
is always read as a single record, regardless of its contents. Paths
under scan are untrusted input.

Addresses further CodeRabbit review feedback on PR #2640.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhDjpSfrbPpnpqT3CZBEX1
2026-08-29 14:55:13 -04:00
dfb5da59fb fix(skill-stocktake): surface find errors instead of swallowing them
Following up on the -L fix: find -L can now traverse symlinks, but a
broken symlink target or an unreadable directory makes find skip that
entry and exit non-zero. Both scripts previously redirected find's
stderr to /dev/null and never checked its exit status, so a scan could
silently under-count skills with no indication anything was wrong.

Capture find's exit status and stderr in both scripts; on failure,
print a warning (with the underlying find error) to stderr while still
emitting the best-effort results for whatever was found. Verified with
a permission-denied skill directory: real BSD find exits 1 and reports
"Permission denied" on stderr, now surfaced as an explicit warning
instead of silently dropped.

Addresses CodeRabbit review feedback on PR #2640.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhDjpSfrbPpnpqT3CZBEX1
2026-08-29 14:55:13 -04:00
1c450766a9 fix(skill-stocktake): follow symlinks and match only SKILL.md in scans
scan.sh and quick-diff.sh both used `find "$dir" -name "*.md" -type f`,
which missed symlinked skill directories (no -L) and miscounted any
non-skill markdown file sitting in a skills directory as a skill
(matched *.md instead of SKILL.md). Both call sites now use
`find -L "$dir" -name "SKILL.md" -type f`.

Repro (temp dir with 1 real skill, 1 symlinked skill, 1 stray .md file):
before: 2 skills found (real skill + the stray .md, symlinked skill invisible)
after:  2 skills found (real skill + symlinked skill, stray .md excluded)

Fixes #2598

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhDjpSfrbPpnpqT3CZBEX1
2026-08-29 14:55:13 -04:00
Juan Pabloandhaelyra 974ccc749f fix(ci): validate SKILL.md frontmatter under docs/{locale}/skills/ mirrors
Extends scripts/ci/validate-skills.js to also scan docs/{locale}/skills/
translated mirrors, not just curated skills/. Adds detection for the
YAML defect classes from #2630 without a parser dependency: unquoted
values containing ": " (glued next key / dropped quoting), values
starting with the reserved '@'/'`' indicators, and missing frontmatter
blocks entirely (required only for docs mirrors; curated skills/ keeps
its existing tolerant behavior).
2026-08-29 14:55:13 -04:00
Souptik Chakrabortyandhaelyra 51dc76ee07 test(gateguard): reject Reflect access on process.env
Greptile flagged that the env-access guard in
gateguard-env-documented.test.js could be bypassed via reflective reads
of process.env (Reflect.get/has/set/deleteProperty/defineProperty/
getOwnPropertyDescriptor/ownKeys), since none of the existing
UNSUPPORTED_ACCESS patterns matched that form.

Add a rule that rejects Reflect.get/has/set/deleteProperty/
defineProperty/getOwnPropertyDescriptor/ownKeys(process.env, ...) and
three self-check fixture cases (Reflect.get, Reflect.has,
Reflect.ownKeys) so the guard is pinned against silently missing them
again.

Negative control: commenting out only the new rule reproduces exactly
the reported gap (the 3 new fixture cases fail with "access guard
missed: Reflect.get, Reflect.has, Reflect.ownKeys"); restoring it goes
back to 10/10.
2026-08-29 14:55:13 -04:00
Souptik Chakrabortyandhaelyra f1521c8937 test(gateguard): read env knobs from code and pin the access convention
The documentation surface test scanned the hook's raw source with two
regexes. That had two holes, both confirmed against the shipped parser:

- a GATEGUARD_* name appearing only in a comment or a string was counted
  as a real read, and
- destructured, aliased and computed reads were invisible, so an
  undocumented knob added in one of those forms would pass silently.

Blank comments, string literals, template-literal text and regex literals
before scanning, so only real code contributes. Blanking preserves length,
so `process.env[...]` keys are located in the blanked code and read back
from the raw source at the same offset.

Rather than chase every possible access form with regexes, the supported
forms are now enforced: destructuring, aliasing, spreading, enumerating
and computed keys fail the guard with instructions to either keep the
convention or extend the parser. Six self-checks cover the blanker and
the guard, including a regex literal containing a slash.

Refs #2573
2026-08-29 14:55:13 -04:00
Souptik Chakrabortyandhaelyra c4253805b5 docs(gateguard): address review - split full-disable, pin glob semantics
CodeRabbit review on #2611, all four findings:

- GATEGUARD_DISABLED sat in a table introduced as 'these do not disable the gate'. Moved to its own full-disable section with ECC_GATEGUARD, and corrected the accepted values against ECC_DISABLE_VALUES (0/false/off/disabled/disable - the earlier draft would have implied 'no' works, which it does not).

- Documented that a leading **/ compiles to .*/ and so needs a preceding separator: verified by reproducing the hook's glob->regex translation, **/tests/** matches /repo/tests/foo.js but not a bare relative tests/foo.js. Docs now say so and the example carries both forms. Matcher behaviour deliberately unchanged - widening it is a behaviour change, not a docs fix.

- Reverse-drift check now compares documented names against the parsed env reads instead of hookSource.includes(), so a name surviving only in a comment or error string no longer satisfies it.

- readGateguardEnvNames builds one Set from collected matches instead of mutating via Set#add, per the repo's no-in-place-mutation guideline.
2026-08-29 14:55:13 -04:00
Souptik Chakrabortyandhaelyra 4377ea1753 docs(gateguard): document the graduated gate controls
GateGuard reads five GATEGUARD_* environment variables that were absent
from skills/gateguard/SKILL.md, so the only discoverable escape hatch was
ECC_GATEGUARD=off - disabling the load-bearing destructive-Bash gate
along with the noisy ones (#2573).

Documented, with defaults and exact accepted values read from the hook:

- GATEGUARD_BASH_ROUTINE_DISABLED (was undocumented everywhere)
- GATEGUARD_EXEMPT_GLOBS (previously only in a 2.1.0 release note)
- GATEGUARD_BASH_EXTRA_DESTRUCTIVE (was undocumented)
- GATEGUARD_DISABLED (was undocumented)
- GATEGUARD_STATE_DIR (was undocumented; named in a runtime warning)
- GATEGUARD_FACT_FORCE_FULL_DENIALS (already documented; folded into the
  same table for one lookup point)

Adds tests/ci/gateguard-env-documented.test.js, which asserts every
GATEGUARD_* variable the hook reads appears in the skill doc, and that the
doc names no variable the hook has stopped reading. That surface test is
what found the three knobs beyond the two the issue reported.

Docs and test only; no hook behaviour changes.

Refs #2573
2026-08-29 14:55:13 -04:00
haelyra 2f8a5a271d test: cover inferred-window hook output 2026-08-29 14:55:13 -04:00
Tanelandhaelyra ecdd517765 fix(suggest-compact): don't quote a percentage against an assumed window
The context signal always rendered "N% of <window> window", including when
the window size was the assumed 200k default rather than a detected value.
On a 1M session whose transcript carries no [1m] marker, that produced
lines like:

  [StrategicCompact] Context ~194k tokens (97% of 200k window)

while actual usage was ~19%. The user compacts on a false alarm, loses
context, and the resulting quality drop reads as a model regression.

The gap is structural: the context threshold defaults to 80% of the
window (160k on 200k), so the signal fires precisely in the 160k-200k
band where the size cannot be determined — above 200k the observed-tokens
fallback correctly infers 1M, and below 160k nothing fires.

Model id alone cannot close this. A tier may ship both a 200k and a 1M
variant under one id, so neither the known-family table nor a new entry
can distinguish them, and the transcript records no window field.

So stop asserting what isn't known: resolveContextWindow() now reports
whether the size was detected (env override, [1m] marker, known family,
or observed tokens > 200k) or assumed, and the hook omits the percentage
and window label when it was assumed. The token count, threshold, and
firing behaviour are unchanged.

resolveContextWindowTokens() keeps its existing signature and semantics.

Note: 3 pre-existing failures in tests/hooks/suggest-compact.test.js
reproduce identically on unmodified main and are untouched here.
2026-08-29 14:55:13 -04:00
haelyra e82e477034 test(pack): tolerate slow Windows extraction 2026-08-29 14:53:54 -04:00
haelyra 4c7e965209 fix(gan): distinguish scores from verdict thresholds 2026-08-29 14:24:16 -04:00
van3hardyandhaelyra b2a8091440 test(opencode): guard plugin.tool existence before shape assertion 2026-08-29 13:40:57 -04:00
van3hardyandhaelyra e72f1e6824 test(opencode): assert init does not call shell and root plugin tools 2026-08-29 13:40:56 -04:00
van3hardyandhaelyra f932e63b0a test(opencode): assert built entry is a working plugin, not just an export shape 2026-08-29 13:40:56 -04:00
van3hardyandhaelyra f0684fda32 test(opencode): assert built entry exports only the plugin function 2026-08-29 13:40:56 -04:00
van3hardyandhaelyra b0cd531a3e fix(plugin): export only plugin function for opencode loader compatibility
opencode's legacy plugin loader (getLegacyPlugins) iterates every module
export and throws 'Plugin export is not a function' if any export is not
a plugin function. The bundle exported VERSION (string) and metadata
(object) alongside the plugin, breaking plugin loading. Export only the
plugin function so opencode can load ecc-universal.
2026-08-29 13:40:56 -04:00
曹博淳andhaelyra fcef85cb87 test: skip GAN shell checks on Windows 2026-08-29 13:40:56 -04:00
haelyra cce8f60206 test(gan): use portable Bash lookup on Windows 2026-08-29 13:40:56 -04:00
CaoBochunandhaelyra 91e846dfe2 test: execute final GAN score selection 2026-08-29 13:40:56 -04:00
CaoBochunandhaelyra 8a396ef542 test: strengthen GAN harness assertions 2026-08-29 13:40:56 -04:00
CaoBochunandhaelyra 37e9683161 test: address GAN harness review feedback 2026-08-29 13:40:56 -04:00
CaoBochunandhaelyra 70eb0f68ae fix: make GAN harness score parsing portable 2026-08-29 13:40:56 -04:00
haelyra 73c29bbd08 fix(install): register AdaL capability metadata 2026-08-29 13:40:56 -04:00
1e7493595c fix(adal): correct README install paths and add adapter regression tests
Address CodeRabbit review feedback on PR #2607:
- Fix .adal/README.md to document actual install paths (rules/, skills/)
  instead of the incorrect namespaced rules/ecc/, skills/ecc/ paths.
- Add regression tests for the adal-project install target adapter:
  root/install-state path resolution, dual id/target registry lookup,
  native .adal root sync-root-children behavior, and foreign platform
  path filtering.

Co-Authored-By: AdaL <adal@sylph.ai>
2026-08-29 13:40:56 -04:00
1444239eec feat(install): add AdaL CLI install target
Following the hermes/openclaw (#2433) and kimi (#2441) adapter recipe.

What's included (adal-project adapter, project kind, ./.adal root, same
shape as kimi-project/joycode-project):
- scripts/lib/install-targets/adal-project.js — 10-line project-kind
  adapter targeting ./.adal
- Registry + helpers platform-ownership wiring
- adal target on the 5 shared modules (rules-core, agents-core,
  commands-core, platform-configs, workflow-quality) +
  SUPPORTED_INSTALL_TARGETS + legacy-compat module
- .adal in platform-configs paths
- Both schema enums (install-modules, ecc-install-config), npm files
  allowlist, installer help text, .adal/README.md stub

AdaL (adalagent.ai) is a terminal-based AI coding agent (by SylphAI)
built on AdalFlow, with native MCP support and project-scoped config
under ./.adal/ (skills, custom tools, memory) plus a root-level
AGENTS.md instructions file — matching the shape ECC already installs
into other AGENTS.md-based harnesses (Codex, OpenCode, Kimi).

Verified: full suite matches main's baseline (3334 passed, same
pre-existing failures unrelated to this change — OpenCode build/npm-pack
surface tests requiring build tooling not present in this sandbox);
catalog check passes (67 agents / 94 commands / 281 skills); dry-run
resolves Target: adal / Adapter: adal-project / root ./.adal with all 5
modules planned; doctor reports OK after a real install; uninstall
cleanly reverses all 458 operations.

Co-Authored-By: AdaL <adal@sylph.ai>
2026-08-29 13:40:56 -04:00
benno0oandhaelyra 7c2bc54be2 test: verify Corepack uses the pinned pnpm version 2026-08-29 13:40:56 -04:00
benno0oandhaelyra b48f22f08c fix: address pre-push pnpm review findings 2026-08-29 13:40:53 -04:00
benno0oandhaelyra 03b441792e fix: resolve pnpm in Git Bash pre-push hook 2026-08-29 13:40:53 -04:00
haelyraandGitHub 656d4b5746 Merge pull request #2869 from actus7/consolidate/mcp-health-v3
fix(hooks): consolidate MCP health-check fixes (3 PRs)
2026-08-29 00:22:27 -04:00
haelyraandGitHub 3e5f889342 Merge pull request #2693 from andrest/fix/stale-model-rates-cost-estimate-and-skill
fix(lib): correct stale model rates in the shared cost estimator and skill
2026-08-28 23:59:59 -04:00
haelyraandGitHub 6d04e74e80 Merge pull request #2633 from Juanpacol/fix/harness-optimizer-eval-harness-reference
fix(agents): point harness-optimizer at eval-harness instead of missing skill
2026-08-28 23:37:13 -04:00
haelyraandGitHub c6ffd3e2d3 Merge pull request #2899 from haelyra/fix/plugin-bootstrap-prefix-classification
fix(hooks): classify platform-dependent raw prefixes
2026-08-28 23:14:10 -04:00
haelyra 303f50c57e test(hooks): construct mismatch prefix immutably 2026-08-28 22:43:28 -04:00