Skip to content

Integrate reviewed ECC reliability and workflow contributions - #3806

Merged
haelyra merged 211 commits into
mainfrom
maint/pr-stewardship-20261029
Oct 29, 2026
Merged

haelyra merged 211 commits into
mainfrom
maint/pr-stewardship-20261029

Conversation

@haelyra

@haelyra haelyra commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

ECC users encounter inconsistent installation, hook, project identity and task-routing behavior across supported harnesses. This integration preserves reviewed contributor heads and applies bounded repairs where combined behavior or actual workflow checks exposed gaps.

The resulting behavior preserves user files and local ownership, gates native work admission, prevents recursive assignment intake, retains inbox/schedule identity, resolves installed helpers safely, and provides revision-bound issue and module evidence guidance.

Included contributions

Maintainer repairs

Surface Resulting behavior
Windows identity Native long/short-path comparison preserves Git-spelled project-ID hashing, aliases and observer leases.
Installation Managed Copilot detector closure and explanation match the actual command; arbitrary project markers grant no helper trust; repair/uninstall retain user files.
Native work Legacy GitHub IDs retain local ownership; source authorship stays separate from claim admission; internal notices remain visible without recursive dispatch; rebalancing honors worker defaults.
Setup commands Strict ZIP grammar executes only the exact existing inspected archive; implicit suffix and password-operand bypasses are rejected.
Payment guidance Express4 handler failures reach error middleware; replay claims retain supported authorization lifetime; unsupported and failed cases deny safely.
Issue evidence Initial host selection precedes fetch; canonical immutable SHA and clean matching checkout gate local conclusions; hidden flags and replacement objects cannot substitute evidence; fetched instructions and untrusted code gain no session or execution authority; all CLI data stays literal.
Documentation Module audits inspect the selected local/shared carriers read-only; catalogs, Pi closure and plugin command names remain synchronized.
Dependencies External scans have bounded regular-file inputs and disclosed payloads; markdown-it 14.3.3 repairs the existing advisories in both locks.

Verification

  • Current published head: 61472d54c0dd71ee647d21590593a84d94ab6a19.
  • Full hosted CI, CodeQL and dependency-diff scan are checked on that exact head. Resulting-main CI, CodeQL and a fresh Supply-Chain Watch are mandatory before source closures.
  • Early full-platform checks pass observer identity and the actual documented revision gate on Linux18/20/22, macOS22 and Windows22.
  • Issue-review command suite: 29 passed under C and en_US.UTF-8. Private Git fixtures use isolated routing/configuration and atomic creation. The hostile-environment probe preserves the distinct outer repository; real shell-data payloads remain literal in Git and gh arguments. Independent real Git probes cover wrong branch, dirty index/worktree, hidden flags, replacement objects, later fixes and state preservation.
  • Installed Copilot: 19 passed; trusted-root invocations: 16 passed; observer: 18 passed; actual SessionStart/End lifecycle: 10 passed; package-manager isolation: 117 passed; ZIP-focused Python: 160 passed; actual SDK/localhost payment flow: 27 passed on Node18 and Node24.
  • Local native Rust: 507 passed, zero failed, one ignored; isolated schedule and inbox CLI workflows exercised. Python: 638 passed, four skipped, 75 subtests; 85.12% combined coverage.
  • Context/catalog/carrier validators: 313 skills, 98 commands, 71 agents, 34 profile projections; ten carrier projections and 35/35 relative specifiers resolved. Dependency audit reports zero vulnerabilities; changed JavaScript/Markdown lint passes.
  • Independent author, integration, accounting and roadmap reviews retain exact heads, RED/GREEN evidence and protected-skip decisions in the dated stewardship report.

Scope and limits

This advances M0 reliable multi-harness distribution and bounded M1 canonical context/evidence guidance. ECC retains policy, registry, capabilities, receipts, orchestration, state and evidence authority. Release publication, new sandbox tiers, durable ExecutionCapsules/Fleet and authenticated service certification retain separate gates.

Payment fixtures use the actual SDK/local HTTP/signature flow with Redis and Solana decoder stubs. Native CLI acceptance uses isolated synthetic state and fake model runners. Durable shared-store operation and chain settlement remain unverified. #3655 stays open for the separate hard-link exemption policy decision; this batch delivers its symlink correction only.

The final follow-up changes one fixture invocation line to disable automatic maintenance/GC in disposable repositories. Eight repeated independent suites, including forced maintenance settings, retain every byte-preservation assertion. All substantive source changes passed exact07e1e4c6 CodeRabbit, Greptile and CodeQL review; fresh full CI covers the test-only follow-up.

eneekoruiz and others added 30 commits October 13, 2026 11:44
RED: 4 failures proved fractional ISO dates fell back to mtime and escaped pending TTL. GREEN: 12 focused tests and 121 complete Linux tests pass; changed function line coverage 93.3%. Pi and catalog parity checks pass.
Antigravity only attaches a workspace rule when its frontmatter declares
a trigger. The antigravity target copied rules verbatim: common rules
have no frontmatter and language rules carry Claude's `paths:` list, so
every ECC rule landed in .agents/rules/ and was never loaded.

Add an antigravity-rule-frontmatter content transform and apply it to
rule pack files on both the manifest and legacy install paths. Rules
without frontmatter become `trigger: always_on`; `paths:` becomes
`trigger: glob` with matching `globs:`. A rule that already declares a
trigger is left alone, and rules/README.md stays inert. Canonical rule
sources are unchanged.

Fixes #3548

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plain YAML scalar cannot start with `*`, so `globs: **/*.py` is not
valid YAML for a strict parser. Emit the joined globs as a quoted string
and have the adapter tests parse the emitted frontmatter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rule that already declares a trigger may carry unquoted
`globs: **/*.ts`, which js-yaml rejects as an alias. Detect an existing
trigger before parsing so native rules, and the adapter's own output,
pass through unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as native

An empty `trigger:` line is not a usable activation trigger, so adapt
the rule instead of passing it through unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Treat a rule as native only when its parsed `trigger` is a non-empty
string, so empty, comment-only, and blank-string triggers are adapted.
The line check is kept only as the fallback for native rules whose
unquoted globs cannot be parsed as YAML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…llback

When strict YAML cannot load a rule (for example unquoted globs), the
line-based fallback treated trigger: '' as native and left the rule
without an activation trigger. Read the trigger value by hand, drop a
trailing comment and surrounding quotes, and only treat a nonblank value
as native.

Refs #3548

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dules

The merge of #3470 moved the Flutter check in scripts/lib/project-detect.js
onto js-yaml with a top-level require. session-start.js loads that module
on every SessionStart, and plugin installs have no node_modules (#2822),
so the hook now exits 1 with "Cannot find module 'js-yaml'" in every
project, not only Dart ones.

Require js-yaml inside hasFlutterSdkDependency instead. When it is
missing, the existing catch returns false: Dart is still detected from
pubspec.yaml and only the Flutter refinement is skipped. Installs that
have their dependencies behave as before.

Add a case to the no-node_modules plugin install test that runs
session-start.js against a pubspec.yaml project. It fails on main.
…d the context cap

A NODE_PATH that exposes js-yaml let the regression pass the test, and an
inherited ECC_SESSION_START_MAX_CHARS=0 made it fail falsely. Drop
NODE_PATH from the child environment and pin the cap to 8000, as
session-start-alias-unavailable.test.js does.
AGENTS.md asks for new objects rather than mutation. Leave NODE_PATH out
with a rest destructure, as pre-bash-tmux-reminder.test.js does, instead
of deleting it from the env after building it.
Reuse the JSON object checks before filtering MCP merge payloads so ordinary
JSON merges retain their existing behavior when ECC_DISABLED_MCPS is set.

Add 10 regression cases covering payload shapes, preview and install state,
file contents, and plan immutability. Nine cases reproduce the original
failure. All 224 cases across 10 installer/lifecycle suites pass.

Validation: changed-file ESLint (no errors), git diff --check, and apply.js
coverage of 91.05% lines, 83.70% branches, and 100% functions.
…er is installed

The auto-open in the dashboard-web.js entrypoint spawned xdg-open/open
without an 'error' listener. When the launcher is missing (headless
Linux, containers, many WSL setups) spawn reports ENOENT asynchronously,
the try/catch cannot see it, and the unhandled 'error' event kills the
process right after the banner is printed.

Use the shared openBrowser() helper from scripts/lib/platform-launch.js,
which already handles the child's error event and unrefs the launcher,
as plan-canvas.js and control-pane.js do.

Fixes #3600
openBrowser() captures the launcher's async error internally, so a missing
xdg-open/open left headless users with no hint why no browser appeared.
Wrap the injected spawn in the entrypoint to report the failure on stderr
with the dashboard URL; the shared platform-launch helper is unchanged.
Count overlap from merged inclusive intervals instead of enumerating every
covered line. Preserve the overlap coefficient and whole-file behavior.

Cover equivalence, input immutability and billion-line spans under a bounded
child heap.

Related: #3018
Signed-off-by: Bortlesboat <169967362+Bortlesboat@users.noreply.github.com>
…xture

Adds executed regression coverage for #3530: the documented TDD detector
command now runs from an unrelated project directory against a real copy
of the ECC scripts in a plugin root whose path contains spaces, a
standalone ~/.claude install, and an ECC checkout, and must fail with an
explicit error when no root resolves. Red against the current skill
commands, which run the helper from the user's project directory.
${CLAUDE_PLUGIN_ROOT:-$PWD} fell back to the user's project directory when
the plugin variable was absent, so standalone installs and standalone ECC
checkouts hit 'Cannot find module' — the same failure #3530 reported.

The three skill commands now probe CLAUDE_PLUGIN_ROOT, then a standalone
install ($CLAUDE_CONFIG_DIR or ~/.claude), then an ECC checkout run from its
root, verifying the script exists at each step and failing with an explicit
message when none resolves. Paths stay quoted so plugin roots containing
spaces work.
This PR edits skill-tdd-workflow, skill-autonomous-loops and
skill-dmux-workflows, which feed per-skill content digests. Verified the
drift is confined to exactly those three entries (nothing added or
removed), all 33 trigger keys still resolve, and triggersDigest is
intact. Refreshing only the registryDigest field using the repo's own
digest computation; triggers content untouched.
…nt only on findings

- runs only when package.json, package-lock.json or yarn.lock changes, and
  scans all three
- contents: read; the job adds pull-requests: write only for the comment
- checkout pinned to the ci.yml v7.0.1 SHA with persist-credentials: false
- npmscan-action pinned to v1.4.0; comment: on-findings, 20-minute timeout
- documents what is sent to npmscan.com at the top of the workflow
readStdinRaw() only settled on end, error or close. If the parent kept
stdin open without writing EOF, every hook that reads through it waited
until the harness killed it (an 8-10 s stall per call).

Add an idle deadline (default 3000 ms, ECC_HOOK_INPUT_IDLE_TIMEOUT_MS,
0 disables). It is reset on each chunk, unref()ed, and on expiry detaches
from and pauses the stream so a held-open pipe cannot keep the hook alive.
Input that already parses as a complete JSON object is accepted; anything
else is marked truncated so fail-closed safety hooks still block.

bash-hook-dispatcher.js now reads through the shared reader instead of its
own end/error-only loop.

Fixes #3665

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setTimeout fires after 1 ms for any delay above 2147483647 ms, so a large
ECC_HOOK_INPUT_IDLE_TIMEOUT_MS turned the deadline into ~1 ms and marked
every hook input incomplete. Clamp to the maximum with a diagnostic, and
surface the invalid-value diagnostic when readStdinRaw resolves the env.

Refs #3665

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- bash-hook-dispatcher: honor the reader's truncated flag. pre-Bash
  blocks (exit 2) because safety checks need the complete request;
  post-Bash skips its hooks and does not echo a partial payload.
- resolveStdinIdleTimeout: treat whitespace-only values as unset instead
  of Number('  ') === 0 silently disabling the deadline.
- isCompleteJsonObject: do not accept a JSON array as a hook payload.
- tests: wait for the child's close event so stdio is drained before
  asserting; cover both bash-hook-dispatcher modes.
- hooks/README.md: keep the example below the 5 s per-hook timeout.

Refs #3665

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The held-open subprocess cases only sent partial JSON. Add a complete
`git commit --no-verify` request with stdin left open and assert the
dispatcher reaches block-no-verify instead of reporting incomplete input.

Refs #3665

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.