Skip to content

Improve verification selection, provider patch input, and formatter policy #143

Closed

Description

@furedea

Scope

Shared-hook improvements across four areas, plus instruction consolidation:

  1. Related-test selection misses: config-only changes (pyproject.toml, uv.lock, package.json, tsconfig, Cargo.toml/lock, rust-toolchain) do not trigger the owning language's broad verification; unmatched source changes are silently ignored when other files have tests; common-lib changes do not select the provider boundary tests that consume them.
  2. Provider patch input: patch body extraction (patch/input/command chains) is duplicated across adapters and consumers with subtly different field selection; guard/lint/scope can disagree on patch targets; a command field can be parsed as a patch without tool-name or format evidence.
  3. Formatter/linter adoption: [tool.ruff] presence alone selects ruff-format; Black format + Ruff lint is rejected as a conflict; execution order runs format before fix; JS/TS applies personal oxfmt regardless of project formatter declarations.
  4. Instructions: herdr-delegation gains dedup/boundary-review policy; Ponytail reuse/minimal-change principles merge into AGENTS.md; tsdd gains root-cause investigation guidance; github-actions-style drops the Blacksmith section.

Acceptance

  • full_suite_triggers per language in related_test_defaults.json; config-only, mixed, deletion, and invalid-input cases covered by tests.
  • Unresolved source changes escalate to the owning project's broad verification; docs-only changes do not.
  • related_test_extensions.json maps shared lib changes to the provider boundary tests that consume them (devin/codex/hermes/pi).
  • hook_input.py owns patch-body extraction and target selection; conflicting fields and malformed input are errors, not silent empty results.
  • Formatter and linter adoption are independent; ruff runs fix → format → lint; Black+Ruff-lint is a supported combination; declared-but-unsupported formatters suppress personal defaults without blocking independent linters.
  • New review/ponytail skills are NOT created; Blacksmith section removed without replacement.

Generated with Devin

Activity

  1. furedea commented on Sep 19, 2026

    @furedea
    OwnerAuthor

    Implementation complete — feat/hook-verification-selection

    1. Related-test selection (check_selection.py, related_test_defaults.json, related_test_extensions.json)

    • Added optional full_suite_triggers (glob arrays) per language. Config-only changes now select a language-wide suite instead of silently narrowing to partial tests:
      • Python: pyproject.toml, uv.lock, pytest.ini, conftest.py (root and nested)
      • JS/TS: package.json, lockfiles, tsconfig.json/tsconfig.*.json, Jest/Vitest configs
      • Rust: Cargo.toml, Cargo.lock, rust-toolchain, rust-toolchain.toml
    • Source files whose tests cannot be resolved now escalate to the project's broad verification rather than being dropped when other files resolved. Mixed resolved/unresolved changes never collapse into a partial run.
    • verification_reuse tracks the full check set so a prior narrow result is not reused as proof of broader verification.
    • Updated related_test_extensions.json so shared hook module changes select the provider boundary tests that actually consume them (devin/codex adapters, hook boundary, verification session, hook generation).

    2. Unified patch input (hook_input.py, patch_input.py, adapters, verification_session.py, hooks.json)

    • hook_input.patch_body() is now the single contract for patch/input/command carriers. A carrier counts as patch input only for apply_patch tools or when the content carries patch markers (patch_input.is_patch), so plain shell commands are never treated as patches.
    • Conflicting non-identical carriers and non-object tool_input fail closed (ValueError) instead of silently passing with zero targets.
    • Devin, Codex, Hermes, and pi adapters plus verification_session.check_scope() all route through the shared contract — no adapter keeps its own "patch or input or command" fallback.
    • Added multi_edit to the generated Devin PreToolUse/PostToolUse matchers so every canonical edit tool reaches the boundary hooks.

    3. Formatter/linter separation (formatter_policy.py, lint_engine.py, lint_format.py)

    • Formatter and linter adoption are detected independently. [tool.ruff]/dependency alone adopts the linter only; the formatter requires [tool.ruff.format] or a static format hook command. Black format + ruff lint is a valid combination, not a conflict.
    • Adopted-but-unsupported formatters (prettier, biome, yapf, ...) are reported without substituting personal defaults. Unknown/conflicting declarations skip formatting but keep independently adopted read-only lint with a visible skip reason.
    • Mutating steps run fix -> format -> lint only for an adopted formatter; plan()/check_file() accept readonly=True to drop all mutating steps.
    • JS/TS: oxfmt no longer applied unconditionally — package.json deps and existing config files decide; oxlint checks keep running regardless.

    4. herdr-delegation skill

    • Self-contained briefs now require the request/acceptance criteria version, repository/worktree, base/HEAD or stable diff snapshot, and review scope — same HEAD with different inputs is a different review.
    • Added boundary-review guidance for multi-component changes (provider input -> adapter -> shared guard/lint -> output).
    • Reconcile rules: don't re-review identical completed inputs, retry vs. re-review distinction, findings classified confirmed/refuted/insufficient-evidence, stop unproductive re-review loops.

    5. Coding principles (agents/AGENTS.md, tsdd/SKILL.md)

    • Prefer existing code / stdlib / platform features / installed deps before adding code; line/file-size numbers are heuristics, not goals; never trade safety, compatibility, accessibility, or required verification for simplicity. Integrated into the existing bullets rather than a new list.
    • TSDD Red eligibility: defects should be traced through callers and processing paths to the responsible shared contract, not patched at the symptom site, when safe.

    6. Blacksmith section removed (github-actions-style/SKILL.md)

    • ## 8. Runner: Blacksmith removed in full; no substitute vendor section added. Other workflow guidance unchanged.

    Verification

    • pytest: 1325 passed (31s)
    • ruff format --check, ruff check, ty check: all clean
    • lefthook run pre-commit: all staged-file checks pass per commit (shfmt, stylua, autocorrect, dprint, ruff-format, ruff-check, ty, actionlint, shellcheck, ls-lint)
    • Note: real-provider payload compatibility is verified at local-fixture level only; no live Devin/Codex/Hermes session was exercised.

    Not implemented (per scope)

    • Issue-triggered unattended runner — not implemented.
    • No new review/ponytail skill.
    • No measured token/speed claims.
  2. furedea-agent commented on Oct 18, 2026

    @furedea-agent
    Contributor

    Implemented by #144 (merged 2026-09-19); the implementation summary is in the comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions