Repository navigation
fix(install): print each hook summary line once per package - #4395
Merged
Daniel Meppiel (danielmeppiel) merged 5 commits intoNov 20, 2026
Merged
Conversation
…4243) Targets that render one hook identically (Claude and Codex, Claude and Windsurf) each produced a display payload, so '| PreToolUse: runs ... (<file>)' printed once per target. _log_hook_display_payloads now prints each distinct line once; lines that differ (for example Copilot's preToolUse casing) still print. The #4243 strict output cell is retired. Fixes #4336 Fixes #4243 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 16:04
3 of 6 tasks
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the per-package hook-output deduplication change.
No open issues 🎉
What changed in this PR
This PR fixes repeated hook summary lines in APM’s install output by printing each distinct line once per package, addressing #4336 and #4243.
Changes:
- Deduplicates hook summaries and fallback lines while preserving distinct text, including event casing, and leaving verbose JSON output unchanged.
- Adds a regression test for duplicate suppression and preservation of differently cased events.
- Removes the lifecycle oracle exception for the resolved duplicate-output behavior.
| File | Description |
|---|---|
tests/utils/lifecycle_evidence.py |
Removes the known-output exception for repeated per-target hook lines. |
tests/unit/test_install_hook_transparency.py |
Tests that identical lines print once while distinct event casing remains visible. |
src/apm_cli/install/services.py |
Deduplicates summary lines within each package’s payload logging call. |
Review effort: Balanced
…ices.py LOC budget) Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
5 of 10 tasks
# Conflicts: # tests/lifecycle/generator/factors.py # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-t1-hook-summary-once
branch
November 20, 2026 17:11
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4143) Take #4395's hook-summary dedupe and drop the #4243 cell widening it supersedes; generator anchors follow line drift; obligations regenerated. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
5 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4336
Fixes #4243
What
_log_hook_display_payloads(install/services.py) printed one| <Event>: runs <cmd> (<file>)line per target display payload. When several targets render the same hook identically (Claude + Codex, Claude + Windsurf, or a hook file), the identical line repeated within one package block. Each distinct line now prints once per package. Lines that differ, such as Copilot'spreToolUsecasing, still print. Verbose JSON output is unchanged.The #4243 strict output cell (
install-hook-line-per-target) is removed in this PR because the duplicate is gone.Validation
test_log_hook_display_payloads_prints_an_identical_line_once.pytest tests/unit/test_install_hook_transparency.py: 15 passed.tests/integration/test_user_authored_name_collision_lifecycle.py7 passed (includes the identical_user_hook test);tests/integration/test_primitive_target_covering_array.py12 passed (includes claude-codex-hook-narrow).Steward pre-approval (A-C)