Commit Graph
1285 Commits
Author SHA1 Message Date
haelyra 6fa858fbdf maint: integrate reviewed contribution #3803 2026-10-29 11:27:56 -07:00
haelyra 023acf21d0 maint: integrate reviewed contribution #3794 2026-10-29 11:27:56 -07:00
haelyra 14ba1e211f maint: integrate reviewed contribution #3777 2026-10-29 11:27:40 -07:00
haelyra 291635f7f9 maint: integrate reviewed contribution #3776 2026-10-29 11:27:01 -07:00
haelyra ff9095f6f7 maint: integrate reviewed contribution #3775 2026-10-29 11:26:59 -07:00
haelyra 8fc06b13cb maint: integrate reviewed contribution #3562 2026-10-29 11:26:56 -07:00
haelyra 124887fd3b maint: integrate reviewed contribution #3748 2026-10-29 11:26:55 -07:00
haelyra 65d83f9290 maint: integrate reviewed contribution #3669 2026-10-29 11:25:30 -07:00
haelyra c7db9b410f maint: integrate reviewed contribution #3657 2026-10-29 11:25:29 -07:00
haelyra 6a3c45ac7f maint: integrate reviewed contribution #3601 2026-10-29 11:25:27 -07:00
haelyra ff147d751f maint: integrate reviewed contribution #3593 2026-10-29 11:25:25 -07:00
haelyra f77db133ac maint: integrate reviewed contribution #3614 2026-10-29 11:25:23 -07:00
haelyra d2c71fd0e9 maint: integrate reviewed contribution #3588 2026-10-29 11:25:18 -07:00
haelyra 3a346e5109 maint: integrate reviewed contribution #3587 2026-10-29 11:25:13 -07:00
haelyra 09e0eb7d7f maint: integrate reviewed contribution #3591 2026-10-29 11:23:24 -07:00
haelyra 7bc0b1a6a9 maint: integrate reviewed contribution #3631 2026-10-29 11:23:22 -07:00
haelyra 9aed578c67 fix: integrate symlink-aware GateGuard exemptions from #3726 2026-10-29 11:20:48 -07:00
haelyra 8e00137b04 fix: integrate observer identity and lease repair with canonical root matching 2026-10-29 11:19:43 -07:00
minteeqahmed-png ef82fcb130 fix(scripts): strip unquoted YAML comments and preserve mixed body line endings 2026-10-29 21:49:53 +05:00
minteeqahmed-png fb4683317f fix(scripts): harden gemini-adapt-agents for CRLF, unknown flags, and block tool lists 2026-10-29 20:56:00 +05:00
longankang 8e4a6c03bf fix: validate Codex hook references in plugin cache
Collect string-valued manifest.hooks as a file reference so missing files, directories, and paths outside the cache fail validation. Add regression coverage for valid and invalid hook references while preserving non-string and absent-hook behavior.

Closes #3786
2026-10-29 15:30:33 +08:00
Ali Arslan d2df54a2ef fix(opencode): never report repair success while the pre-fix stub is retained 2026-10-29 01:06:32 +05:00
Brian La Plume 4a76f78411 fix(gateguard): expand unique sudo long-option prefixes
getopt_long accepts a unique prefix, so sudo --use root rm -rf build is
--user root and the resolver read root as the command. Expand unique
prefixes from sudo's long option table before the value/non-exec checks.
--help joins the non-executing modes.
2026-10-28 12:28:55 -07:00
Brian La Plume 2a3ed89600 refactor(config-protection): build targetPaths without mutation 2026-10-28 12:14:38 -07:00
Brian La Plume a46e36d488 fix(gateguard): sudo env assignments between options, missing value flags
sudo accepts VAR=value between its options (parse_args.c is_envar), so
sudo FOO=1 -u root rm -rf resolved -u as the command. Keep reading options
past assignments. Add sudo -R/--chroot, -a/--auth-type, -c/--login-class
and doas -a as value flags, and stop a short-cluster scan at any unknown
letter, so sudo -R/live rm -rf no longer reads the l in /live as -l.
doas -C only checks config, so it is non-executing; the existing doas -C dd
case moves to the passive list.
2026-10-28 12:13:25 -07:00
Brian La Plume 7253c8a261 fix(gateguard): treat sudo list/validate/edit modes as non-executing
sudo -l/--list, -v, -K, -V and -e/--edit (and doas -L) do not run the
command operand, so sudo -l rm -rf build was denied as destructive. The
privilege-wrapper resolver now reports no executable command for those
modes. Short clusters stop at the first value flag, so sudo -ul rm -rf
(user l) stays destructive.
2026-10-28 11:54:13 -07:00
Ali Arslan 770eb29b9f fix(opencode): remove the pre-fix declined stub the legacy migration leaves behind 2026-10-28 23:30:39 +05:00
Ali Arslan b2f4abb4c4 fix(opencode): treat the pre-fix declined factory stub as inactive during migration 2026-10-28 23:17:07 +05:00
Ali Arslan 73f61801db fix(opencode): make the declined-hooks plugin stub satisfy the V2 loader schema
The inert stub written when hook consent is not granted was
`export default async () => ({})`. OpenCode v2 validates every plugin
module before running it and requires the default export to be a definition
object with an `id` and an `effect` or `setup` function, so a declined or
runtime-less home install printed the same startup error as the V1 hook
plugin:

  PluginModule.LoadError: Plugin must export a default definition with an id
  and an effect or setup function.
  (cause: SchemaError(Expected object at ["default"]))

Write `export default { id: "ecc-hooks", setup() {} }` instead. It keeps the
inert behaviour (no imports, no module initialization of the replaced
plugin) and satisfies the loader.

Tests that pinned the generated bytes now compare against
getDisabledOpenCodePluginContent() rather than a duplicated literal, and
tests/opencode-plugin-loader-contract.test.js asserts the loader contract on
the generated payload. That test fails on the previous stub
("default export must be an object, got function").

Refs #3537. The same assertion should cover .opencode/plugins/*.ts once a V2
entrypoint lands (#3536, #3224); those plugins are scanned independently in
home installs, so both the barrel and the implementation are loaded.
2026-10-28 22:32:41 +05:00
Brian La Plume 646b4d1442 fix(gateguard): classify rm/Git behind sudo/doas/env/command wrappers
isDestructiveRm/isDestructiveGit keyed on argv[0], so sudo rm -rf,
command rm -rf and env git reset --hard read as calls to the wrapper and
were allowed once the routine shell gate was satisfied. Run both checks on
the unwrapLeadWrappers argv too, the resolution the dd and sh -c paths
already use. Overlaps #2832, which also reworks sh -c parsing and has
conflicts with main; this is the minimal rm/Git part.
2026-10-27 11:06:20 -07:00
Brian La Plume 1d55d690b9 fix(run-with-flags): fail closed for oversized Bash GateGuard input
Fixes #3762. pre:bash:gateguard-fact-force was missing from
FAIL_CLOSED_ON_TRUNCATION_HOOKS, so a Bash payload over the stdin cap
exited 0 while the Edit and PowerShell GateGuard ids blocked. Share one
GateGuard id set for the fail-closed list and the off-switch branch, and
add runner-level tests for all three ids plus each off switch.
2026-10-27 11:03:36 -07:00
Brian La Plume ed2f02dd06 fix(config-protection): check MultiEdit edits[].file_path targets
Fixes #3761. config-protection only read tool_input.file_path, so a MultiEdit
with the config path inside edits[] edited an existing ruff.toml/.eslintrc
without the block. Check every effective target and block if any is an
existing protected config.
2026-10-27 11:03:02 -07:00
Gaurav Dubey dc9bb9f2d9 fix(hooks): keep inline resolver backslash-free so hooks parse on Windows
On native Windows, Claude Code runs each hook as `bash.exe -c "<command>"`
through the Windows command line. That extra unescape layer collapses the
backslashes in the WSL path conversion of the inline plugin-root resolver,
so `.replace(/\\/g,'/')` reaches node as `.replace(/\/g,'/')` and every hook
fails with `SyntaxError: missing ) after argument list`.

Build the backslash separator with String.fromCharCode(92) and split/join
instead of regex escapes, so the resolver contains no backslash. Conversion
behaviour is unchanged. Regenerate every embedded copy (hooks.json,
codex-hooks.json, commands/*.md) and refresh hooks.metadata.json
fingerprints.

Add a test that the resolver and each hook `node -e` program are
backslash-free, and run the shipped SessionStart command through bash with
backslashes collapsed the way Windows does.

Fixes #3746
2026-10-26 18:39:04 +00:00
haelyra b144908df6 fix(types): declare Git utility options 2026-10-25 19:43:37 -04:00
haelyra 0a7a9a718e fix(hooks): use session repository for console warnings 2026-10-25 19:32:16 -04:00
haelyra 605e006137 Integrate L4XB PR #3662 2026-10-25 19:30:50 -04:00
haelyra 9c8a66b696 Integrate L4XB PR #3664 2026-10-25 19:30:50 -04:00
haelyra 0e7588cec5 Integrate L4XB PR #3667 2026-10-25 19:30:50 -04:00
haelyra 6ddc4ea007 Integrate L4XB PR #3666 2026-10-25 19:30:50 -04:00
haelyra f390400944 Merge pull request #3583 from Tivonsico/fix/skill-run-timestamp-type-20261014
fix(skill-tracker): reject non-string execution timestamps
2026-10-25 19:16:34 -04:00
haelyra 7f0b6ce500 fix(install): reject malformed empty-container JSONC commas 2026-10-25 18:20:40 -04:00
haelyra f4e8f6eb3e Merge reviewed OpenCode JSONC fix from #3590 2026-10-25 18:17:10 -04:00
Gaurav Dubey b98bff4a45 fix(observer): keep project context and leases aligned after remote changes
Integrates #3697 on current main. Prefer the observer project ID, retain a sole legacy ID until the new observer folder exists, and release the ending session lease across same-root aliases. Replace the unsafe live merge hint with read-only project inspection, and validate alias IDs before path use. #3711 independently identified the computed-ID selection gap; its early switch without observer data and unchanged SessionEnd path were not adopted.
2026-10-25 17:54:47 -04:00
Gaurav Dubey dcb947a4e1 fix(gateguard): judge exempt globs against real target location
Port #3656 onto current main, preserving both the contributor fix and the unrelated current changelog entry. Includes the follow-up glob normalization from 2c11fd74.
2026-10-25 17:47:30 -04:00
haelyra e3292b0010 Merge pull request #3594 from ketpatil77/fix/managed-hook-config-bom
fix(hooks): honor managed preferences in BOM-prefixed config
2026-10-25 17:44:47 -04:00
haelyra e494799377 Merge pull request #3654 from affaan-m/stewardship/verified-pr-batch-3569-3578-owned
Integrate 34 reviewed ECC fixes with verified follow-up patches
2026-10-25 15:39:22 -04:00
haelyra 108ff18624 feat(ci): limit Issue bursts and open submissions per author (#3723)
Verified with 30 exact-head hosted checks, 31 combined PR and Issue tests, workflow security validation, and a live read-only Issue replay.
2026-10-25 15:16:53 -04:00
4c28a7be9e ci: audit closed-issue delivery claims — cited PRs must actually be merged (#3522)
* ci: audit closed-issue delivery claims — cited PRs must actually be merged

Follow-up to #3223: an issue closed as 'fixed in #N' while #N was closed
without merging (or does not exist) leaves a completion claim that does not
hold. The weekly maintenance workflow now runs a read-only audit over issues
closed in the last 30 days, extracts delivery-claim PR references from issue
bodies and close-window comments, verifies each cited PR's merge state, and
reports findings to the step summary.

Design constraints:
- Read-only: no comments, no closes, no labels; findings are advisory and
  the run always stays green so the weekly audit never blocks maintenance.
- Unverifiable counts as unmerged: a 404 PR or an API failure fails the
  verdict, because an unverifiable claim is exactly the failure mode.
- Pure decision functions are exported for tests; a first live run against
  this repository surfaced one real finding (#3408 cites #3060, which does
  not resolve), included here as the motivating sample.

8 unit/contract tests: extraction, windowing (close comments included),
the #3223 unmerged-citation failure mode, the all-clear summary, workflow
contract, and a no-write guard.

* ci: rework audit evidence contract — claims vs context, four PR states, visible completeness

Revision per the #3522 review (reviewer ran the CLI through 19 controlled
cases plus a bounded live check of #3408):

- Bind findings to asserted delivery claims. Closing wording ('Delivered
  through #N'), claim verbs (fixed/shipped/landed/resolved/...), and bare
  'PR #N' inside closing comments are claims; historical mentions, quoted
  lines, fenced examples, negated claims, and tracking-only references are
  reported as contextual references and never produce findings. On the live
  #3408 the audit now recognizes the closing claim #3500 (merged) instead of
  flagging the historical #3060 text.
- Separate observed states: merged / open-unmerged / closed-unmerged /
  unknown (404, rate limit, transient). Unknown claims are advisory manual-
  verification items, not failed claims; each row carries the claim snippet,
  its source link, and the observation time. Checked claims are listed even
  when passing, so the report is traceable rather than an opaque all-clear.
- Paginate issue and comment collection (--paginate --slurp), bound comment
  requests (200) and PR checks (100), and surface skipped pages, rate limits,
  and retrieval failures as an explicit incomplete audit instead of an empty
  all-clear. A live-run maxBuffer overflow on the paginated issue list was
  caught and fixed (64MB); the audit reported it as incomplete before the fix.
- Scope the job to read access: job-level contents/issues/pull-requests read.

13 contract/unit tests including a CLI fixture (stub gh) that places the
relevant issue on page two and forces a comment-fetch failure.

* ci: report incomplete audit at PR check cap

---------

Co-authored-by: chenhz01 <chenhz01@users.noreply.github.com>
Co-authored-by: haelyra <49814733+haelyra@users.noreply.github.com>
2026-10-25 14:41:22 -04:00
Gaurav DubeyandClaude Opus 5.5 2600c70298 fix(hooks): fail closed on incomplete input in bash-hook-dispatcher
- 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>
2026-10-22 23:18:47 +00:00
Gaurav DubeyandClaude Opus 5.5 943eb826b5 fix(hooks): clamp the stdin idle deadline to the timer maximum
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>
2026-10-22 22:54:14 +00:00