Commit Graph

220 Commits

Author SHA1 Message Date
metaphorics 2c7c7d7b4d style(pi-shell): cargo fmt sweep over review fix commits 2026-06-12 18:48:56 +09:00
metaphorics 376f612ac1 fix(pi-shell): pass glab mr diff through raw
Op: correct
Restores: spec:glab mr diff output passes through unmodified like gh pr diff
2026-06-12 18:48:56 +09:00
metaphorics 64fe4ce0ae fix(pi-shell): mark omitted glab releases past the cap
Op: correct
Restores: spec:truncated glab release list signals the omission count
2026-06-12 18:48:56 +09:00
metaphorics 69cc4648dd test(pi-shell): lift max_capture_bytes in the fixtures harness
Prevent oversized fixtures from silently triggering the size passthrough path
and causing a misleading savings-gate failure instead of a real filter failure.

Op: correct
2026-06-12 18:48:56 +09:00
metaphorics 84df078fc4 fix(pi-shell): pass pip list --format=json through unmodified
The --format=json / --format json flag forms were not recognised by the
machine-readable opt-out; the output was parsed and rewritten as a text summary.
Extend the opt-out to cover both flag forms.

Op: correct
Restores: spec:any pip list --format=<machine-readable> output passes through unchanged
2026-06-12 18:48:56 +09:00
metaphorics 0ff2311c98 fix(pi-shell): require a non-space rule char in is_horizontal_rule
Whitespace-only lines are not markdown horizontal rules. Current callers trim
first so no live bug, but the invariant should be enforced in the function.

Op: correct
2026-06-12 18:48:56 +09:00
metaphorics a8096aadb1 test(pi-shell): cover command_has_ordered_tokens and command_has_any_token
Reversed-order negative, first==second edge case, --flag=value match and
non-match, and substring-of-value non-match.

Op: extend
2026-06-12 18:48:56 +09:00
metaphorics b211824227 fix(pi-shell): rebuild routed ctx for eslint/tsc/biome JS wrappers
Op: correct
Restores: spec:npx eslint -f json and similar formatter flags preserved through JS wrapper
2026-06-12 18:48:56 +09:00
metaphorics 0cce82cfef fix(pi-shell): route attached docker-compose up through the log filter
Op: correct
Restores: spec:docker-compose up attached output is preserved as log output, not stripped as build progress
2026-06-12 18:48:56 +09:00
metaphorics 50fec8a0f9 fix(pi-shell): bypass the worktree condenser for porcelain/null output
Op: correct
Restores: spec:git worktree list --porcelain output passes through unmodified
2026-06-12 18:48:55 +09:00
metaphorics 41789c84b9 fix(pi-shell): keep go -json benchmark rows out of the pass aggregator
Op: correct
Restores: spec:go test -json -bench runs are not collapsed to a package-count summary
2026-06-12 18:48:55 +09:00
metaphorics 3771d285d1 fix(pi-shell): skip option values when classifying jvm build goals/tasks
Op: correct
Restores: spec:detect_phase and detect_task return last recognised lifecycle
goal/task, not the value of a value-taking option like -pl or -p
2026-06-12 18:48:55 +09:00
metaphorics 42d7f1e40c style(pi-shell): cargo fmt sweep over workflow-committed files
Workflow worktree agents committed without running cargo fmt; main
working tree carried the correctly-formatted versions. No functional
change.
2026-06-12 04:59:56 +09:00
metaphorics c81e6d8a42 fix(pi-shell): gate rsync success shortcut on exit 0
The match_output 'ok (synced)' shortcut was not exit-gated: a rsync run
that exits non-zero but happens to emit 'total size is' without the
(?i) unless keywords would silently succeed. Add only_on_exit = [0] at
the filter level so the entire rsync def is bypassed on failure exits,
passing the raw diagnostic output through.

Op: correct
2026-06-12 04:53:51 +09:00
metaphorics 2219269eb4 refactor(pi-shell): hoist shared gh/glab helpers to primitives
Five byte-identical private helpers across gh.rs and glab.rs
(command_has_ordered_tokens, command_has_any_token, head_tail_dedup,
is_markdown_badge_or_image, is_horizontal_rule) are now pub fn in
primitives.rs. Both callers updated to use primitives::.

Op: compress
2026-06-12 04:26:48 +09:00
metaphorics c5e96e24d3 fix(pi-shell): keep JUnit5 assertion messages in gradle failure output
The failure-block parser in the Gradle test filter only kept exception lines
starting with 'java.' or 'kotlin.', silently dropping JUnit5 assertion messages
(org.opentest4j.AssertionFailedError: expected...). Now any non-stack non-blank
line inside a failure block is treated as exception/message and kept.

Op: correct
2026-06-12 04:22:47 +09:00
metaphorics 5404fa3b1e fix(pi-shell): classify jvm build tasks by last recognized goal/task
detect_phase (Maven): was picking the LAST non-flag token, so 'mvn test -pl
module-a' resolved to Passthrough. Now picks the last RECOGNIZED lifecycle goal,
ignoring option-value tokens.

detect_task (Gradle): was picking the LAST non-flag non-clean token, so 'gradle
test --tests FooSpec' resolved to Other (Foo not recognized). Now picks the FIRST
recognized task token, since tasks precede option-values in gradle command lines.

Op: correct
2026-06-12 04:20:59 +09:00
metaphorics 5b4a92b83e merge: P2 fix from worktree-wf_f9215fe7-fca-6 2026-06-12 04:15:58 +09:00
metaphorics 1be477eafa merge: P2 fix from worktree-wf_f9215fe7-fca-5 2026-06-12 04:15:52 +09:00
metaphorics 8452ff2322 merge: P2 fix from worktree-wf_f9215fe7-fca-4 2026-06-12 04:15:47 +09:00
metaphorics 5edc053a34 merge: P2 fix from worktree-wf_f9215fe7-fca-3 2026-06-12 04:15:42 +09:00
metaphorics 435ed354c6 fix(pi-shell): gate def success shortcuts so they don't mask errors
ssh.toml: narrow Welcome-to strip to distro MOTD banners only; the broad
pattern stripped remote command output starting with that phrase.
rsync.toml: make the unless= guard case-insensitive ((?i)) and add
only_on_exit=[0] so the ok-synced shortcut doesn't fire on error exits.
gcloud.toml: delete the WARNING: access strip — combined with on_empty it
silently returned 'gcloud: ok' on auth failures.

Op: correct
2026-06-12 04:15:05 +09:00
metaphorics 576f055f6f fix(pi-shell): stop double-counting package passes in go -json, preserve benchmarks
In -json mode render_go_test_json_line returned Some(ok\t{pkg}) for package-level
pass events, but the Output event already carries that line, causing double counting
in aggregate_go_test_success. Return None for package-level pass events.

Also: route benchmark output (BenchmarkXxx-N lines) through head_tail instead of
the count-only aggregator, so benchmark results are preserved on exit 0.

Op: correct
2026-06-12 04:13:58 +09:00
metaphorics 29aba02770 fix(pi-shell): keep overlay root filesystem rows in df output
df -h in containers shows the root / as an overlay filesystem. The compact_summary
filter unconditionally stripped ALL overlay rows, silently dropping container disk
usage. Now keep overlay/none rows whose mount point is /.

Op: correct
2026-06-12 04:13:55 +09:00
metaphorics 564a8b7763 fix(pi-shell): pass through explicit eslint output formatters
eslint -f json / --format compact etc. produce machine-readable output that
the condenser destroyed. Pass through any explicit non-stylish -f/--format.
Stylish (the default) still goes through the condenser.

Op: correct
2026-06-12 04:13:49 +09:00
metaphorics e01d699186 fix(pi-shell): preserve warnings from non-test rake tasks
is_rake_keep_line dropped warning: lines from rake tasks such as asset
compilation and database migrations. These carry signal (deprecation notices,
compatibility warnings) that users need to see.

Op: correct
2026-06-12 04:13:49 +09:00
metaphorics 253ea54d25 fix(pi-shell): vendor glab fixtures, repoint include_str! off the absent rtk gitlink
rtk/ is absent from disk with no .gitmodules entry, so the four include_str!
calls in glab.rs pointing at rtk/tests/fixtures/ caused a compile failure on
\`--lib --tests\`. Vendor the three integration .raw files into the crate under
src/minimizer/filters/fixtures/glab/ (parallel to the existing fixtures/jvm/
pattern) and repoint all four include_str! paths.

Op: correct
Restores: test:glab_* unit tests compile
2026-06-12 04:10:37 +09:00
metaphorics 8eb59335a5 fix(pi-shell): review fixes — rake word-boundary, unclosed HTML comment cap
Fix P1 findings from code review:

1. ruby.rs is_rake_keep_line: replace substring contains() with
   whole-word matching. "ok" matched "token", "broken", "took";
   "test" matched "fastest", "contest". Now uses split_whitespace
   + exact word match.

2. glab.rs/gh.rs filter_markdown_body_view/filter_markdown_noise:
   unclosed HTML comment (<!-- without -->) silently dropped ALL
   remaining output. Add 50-line safety cap on comment consumption
   to prevent data loss from malformed/truncated markdown.

Op: correct
Restores: invariant:filter-output-never-silently-drops-all-content
2026-06-12 02:34:04 +09:00
metaphorics ffeb5dad0a style(pi-shell): clippy auto-fix sweep (doc backticks, format interpolation)
Op: compress
2026-06-12 02:34:04 +09:00
metaphorics 3c53dd9e01 test(pi-shell): add glab fixtures, tighten release view filter
Port rtk glab fixtures (ci-trace, release-list, release-view) to the
minimizer fixture harness with savings gate.

Tighten release-view filter: also strip ASSETS section (no-assets
noise), View-on-GitLab footer link. Update test assertions.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics 01426b51a8 feat(pi-shell): add glab CLI output filter module
Port glab filtering from rtk donor, adapted for minimizer in-process
architecture (no JSON injection - filters default CLI output).

Claims mr, issue, ci, pipeline, release subcommands. Conservative
passthrough for -F/--output/--json/--web/--comments and api subcommand.

Filter strategies:
- ci trace: strip section markers, bare ANSI bracket codes, runner
  boilerplate (16 prefix patterns), keep build output/errors
- release list: parse tab-separated table to compact name (created)
  format, fall through to head_tail_dedup on no-TAB input
- release view: strip SOURCES block, image lines, HTML comments,
  horizontal rules, collapse multi-blanks
- mr/issue view: filter markdown body noise, respect exit_code
- everything else: head_tail_dedup

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics 072a199f46 fix(pi-shell): anchor ls long-format parsing on the date column
parse_ls_long_line locates the date/time anchor and reads the name as
the text after it and the size as the rightmost integer before it, so
filenames with spaces and year-form dates parse correctly.

compact_summary_output strips tmpfs/devtmpfs/overlay rows from df
output only past the 30-line passthrough threshold, keeping short
listings verbatim.

Op: correct
Restores: spec:rtk/src/cmds/system/ls.rs
2026-06-12 02:34:04 +09:00
metaphorics ef7284bf9c perf(pi-shell): add dotnet build success short-circuit, retire dead def
filter_build_like short-circuits to 'ok (build|restore succeeded)' on
zero warnings and zero errors; the redundant defs/dotnet-build.toml
is removed and its inline tests are ported into dotnet.rs.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics 1f8bf85213 perf(pi-shell): docker batch — frequency-dedup logs, kubectl arms, helm glog strip, compose-legacy dispatch
- filter_docker_logs/filter_logs now collapse repeated lines to order-
  preserving '(×N)' counts via shared compact_log_lines helper.
- kubectl apply|delete|rollout|scale|create|wait|label|annotate now
  route through head_tail_dedup instead of raw passthrough.
- filter_helm strips client-go glog 'W####' warnings and kube-config
  permission warnings before table compaction.
- normalize_program maps standalone 'docker-compose' (v1) to 'docker'
  so it routes through the docker filter with proper subcommand detection.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics b3ceaa44ee test(pi-shell): engine-level regression tests for rails defs and bundle exec re-dispatch
Guards that rails-migrate/rails-routes defs run standalone (not as
overlays) and that bundle exec correctly re-dispatches to wrapped
filters.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics 29015b73bc feat(pi-shell): re-dispatch bundle exec to the wrapped tool filter
'bundle exec rspec|rubocop|rake|rails' now routes to the ruby/lint
filter for the wrapped tool (mirroring the uv wrapper), parsing the
command for the wrapped word since detect yields only 'exec'.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics b7283ac8d7 feat(pi-shell): add rails-migrate and rails-routes defs, scope ruby.rs to avoid overlay
Defs for 'rails/rake db:migrate|rollback' and 'rails routes' run as
standalone primary filters with match_subcommand scope so they never
overlay the minitest filter output. ruby.rs excludes those subcommands
from its generic rake/rails claim.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics 85e6182be1 feat(pi-shell): port rtk/snip ruby filters into ruby.rs — rspec noise strip, minitest routing, rubocop compact, rake condenser
Op: extend
2026-06-12 02:34:04 +09:00
metaphorics fcd985842d feat(pi-shell): cap pytest failure blocks and keep xfail/xpass
filter_pytest renders at most ~10 failure blocks with a '+N more
failures' marker and preserves XFAIL/XPASS short-summary lines (XPASS
is a behavior-change signal), re-derived against default output.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics 17db75541a feat(pi-shell): strip pyright/basedpyright banner noise, retire def
lint.rs now strips the pyright/basedpyright version banner and progress
lines for those programs, and the dead defs/basedpyright.toml (never
fired as primary since the program is Rust-claimed) is removed.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics 77eb8e47a2 refactor(pi-shell): keep bundle completion line in pkg.rs, retire def
bundle install/update now keeps its 'Bundle complete!/updated! … N gems'
summary (scoped to bundle so brew/composer are unaffected) and strips
the 'Use bundle info' hint; the redundant defs/bundle-install.toml
overlay is retired.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics c05c6b144b feat(pi-shell): keep uv install summary and report audited no-ops
uv sync/add/remove success keeps the 'Installed N packages in Xms'
summary and +/- deltas, and an 'Audited N packages' no-op reports
'ok (up to date)' — both scoped to those subcommands so npm/brew and
uv lock output are unaffected.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics ade86297d1 refactor(pi-shell): fold poetry up-to-date short-circuit into pkg.rs
The 'No dependencies to install or update' / 'No changes.' success
collapse now lives in pkg.rs's poetry path instead of an overlay def,
so it is order-independent; defs/poetry-install.toml is retired.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics 8ee000a0f9 perf(pi-shell): strip pip upgrade notice and compact pip list
is_python_package_noise drops pip's '[notice] A new release…' nag, and
pip list/outdated now get the same tabular compaction uv pip list
already receives.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics 66f3ff78f5 style(pi-shell): wrap go.rs test literal at rustfmt boundary
A go build-error test string literal exceeded rustfmt's line width;
reflow it so cargo fmt --check is clean.
2026-06-12 02:34:04 +09:00
metaphorics 8c3f35257e feat(pi-shell): add rustc diagnostic filter def
defs/rustc.toml keeps rustc error/warning headers, source pointers, and
ICE/panic lines while capping output. No on_empty stage — that would
mask a failed compile whose text missed the keep-set; success is left
to the engine's exit-0 OK rewrite.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics b11f5f8d2c fix(pi-shell): strip golangci info/warn logs but keep level=error
is_golangci_noise drops 'level=info'/'level=warn' runner chatter while
preserving 'level=error' lines, which carry config and typecheck
failures that must reach the agent.

Op: correct
Restores: spec:snip/filters/golangci-lint.yaml
2026-06-12 02:34:04 +09:00
metaphorics b83ad73dde feat(pi-shell): recognize more go build/vet error shapes
looks_like_go_error now catches module-load, vendoring, no-go-files,
and undeclared-main errors so they survive minimization; go vet shares
the helper and benefits too.

Op: extend
2026-06-12 02:34:04 +09:00
metaphorics 530e58839f perf(pi-shell): aggregate passing go test output to one line
On exit 0, go test output collapses to a single 'go test: M packages
ok' summary (with no-tests / skipped counts) instead of one line per
package; failure runs keep full detail.

Op: compress
2026-06-12 02:34:04 +09:00
metaphorics 3b9fd420ac perf(pi-shell): drop cargo nextest post-summary recap lines
filter_nextest stops emitting the duplicate FAIL rows and trailing
noise that follow the 'Summary [...]' line, which is itself kept
verbatim.

Op: compress
2026-06-12 02:34:04 +09:00