Skip to content

feat(plot-cli): reference lines and labels (--hline/--vline/--abline, --title/--xlab/--ylab) - #7105

Merged
paiml-fleet[bot] merged 5 commits into
mainfrom
R075e-7082b
Nov 15, 2026
Merged

paiml-fleet[bot] merged 5 commits into
mainfrom
R075e-7082b

Conversation

@noahgift

@noahgift noahgift commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What

  • The plot CLI in crates/aprender-viz accepts --hline <y>, --vline <x>, --abline <slope,intercept>, --title, --xlab, --ylab (two files, +194/-3). A malformed or non-finite value is refused.

Measured (lambda, 2026-11-15, head 9b2160c = 5dd4dcd + review fix)

  • Review fix at 9b2160c: --hline widens the y scale and --vline the x scale, so a line outside the data range is drawn inside the panel. New test reference_lines_outside_the_data_widen_their_own_scale (hline 10 and vline -5 over data 1..3; a swap fails it). Cop run: lib 844 passed, full crate 965 passed, clippy rc 0, fmt rc 0.
  • PRE-FLIGHT: mutants 6/0 survived, checklist done, +176/-2 @c77802c (cop run: hline/vline swapped each way, abline pair swapped, each label sent to another setter; new test decorations_reach_the_right_geom_and_label fails on all six).
  • cargo test -p aprender-viz --features plot-cli --lib: 843 passed, 0 failed at 5dd4dcd (844 at 9b2160c) (cop run); fmt rc 0; clippy -D warnings rc 0. Three new tests: flag mapping, refusals, lines and labels reach the SVG.

Known limits

  • Only the SVG output is tested for these flags; the terminal output is not.
  • The flags follow the grammar (Geom::hline/vline/abline), not a line-by-line port of the older plot.rs; the CLI surface registry and docs are not updated.

ont-delta: none
Closes #7104
Refs #7082
keep-open: #7082 this PR ports the decoration arguments only; geoms, the --spec file and exit codes are other slices

🤖 Generated with Claude Code

noahgift and others added 3 commits November 15, 2026 18:17
…ab/--ylab labels (PMAT-7082)

Pmat-Ticket: PMAT-7082
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review finding on #7105: swapping hline/vline, the abline pair, or the label setters survived the SVG tests.

Pmat-Ticket: PMAT-7104

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts:
#	crates/aprender-viz/src/plot_cli/cli.rs
@paiml-fleet
paiml-fleet Bot marked this pull request as ready for review November 15, 2026 18:04
@paiml-fleet

paiml-fleet Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Non-author review: PASS at head 5dd4dcd75efe095ba92e5ca731ace058b2178ef7

Lane: agy, claude-opus-5-5-high (agy gemini-4-hydrogen-high hit quota 429 first; errored lane not counted).
Reviewer: plot-cop worker; not the author. Not armed by me.

Blocking findings: none. Acceptance (per-flag unit tests, malformed --abline refusal) is covered by the three new cli.rs tests and the mod.rs decorations test.

Follow-ups (non-blocking):

  1. mod.rs add_decorations: as f32 narrowing turns finite 1e300 into inf; refuse out-of-f32-range values or document.
  2. build_plot trains axes on data only, so --hline 100 on data 1..3 is invisible (ggplot2 widens axes).
  3. PlotArgs lost Eq; CI compile confirms nothing needs it.
  4. Confirm title/xlab/ylab are escaped by the SVG writer.
  5. lines_and_labels_reach_the_svg leaks its temp dir on assertion failure.
  6. Terminal rendering of decorations is untested (out of slice).

CI at review time: ci / gate, gate, workspace-test SUCCESS; pr-light IN_PROGRESS; mg-reuse-self-test and runner-smells QUEUED.
Receipt: /mnt/nvme-raid0/cop-inbox/handoff/agy/review-aprender-7105-5dd4dcd-agy.md

@paiml-fleet
paiml-fleet Bot enabled auto-merge (squash) November 15, 2026 18:13
A reference line outside the data range fell outside the panel because trained_on used the data domains only.

Pmat-Ticket: PMAT-7104

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=7105 head=253954c2edafae3101ead5ad92ab2c4563975e42 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

# Conflicts:
#	crates/aprender-viz/src/plot_cli/cli.rs
@paiml-fleet

paiml-fleet Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

NON-AUTHOR REVIEW: PASS @253954c2edafae3101ead5ad92ab2c4563975e42

Lane: agy, claude-opus-5-5-high (gemini-4-hydrogen-high hit 429 quota). Diff-only review, nothing built or run. Zero blockers. The earlier PASS at 5dd4dcd no longer counts; this is the full diff at the new head.
Changed since 5dd4dcd: (1) review fix, new trained_domains (mod.rs:293) widening x by --vline and y by --hline, plus test reference_lines_outside_the_data_widen_their_own_scale; (2) merge of main brought PlotError{Usage,Failed}, exit codes 2/1, adapted tests and two exit-code tests (not this PR's code).

Should-fix (reviewer-reported; #1 partly visible in diff, "as f32" casts at mod.rs ~222-228 after finite() on f64; rest unconfirmed):

  1. mod.rs:301-307 - 1e39 passes finite() then casts to inf f32.
  2. mod.rs:287 - no test that build_plot uses trained_domains (SVG test uses in-data values).
  3. cli.rs:501 - hline/vline/abline asserts only s != plain.
  4. Body "Measured" numbers are at 9b2160c, not re-run at head 253954c.
  5. Terminal (default) output path for the new layers is untested.
    Nits: hline/vline/abline skip the GEOMS check; allow_hyphen_values on --abline; PlotArgs loses Eq; map_or(true) clippy; far-off hline reports exit 1 not 2; test count says three, actual five.

Receipt: /mnt/nvme-raid0/cop-inbox/handoff/agy/review-aprender-7105-253954c-agy.md

@paiml-fleet
paiml-fleet Bot merged commit 704efd2 into main Nov 15, 2026
14 checks passed
@paiml-fleet
paiml-fleet Bot deleted the R075e-7082b branch November 15, 2026 20:17
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.

plot_cli: --hline/--vline/--abline and --title/--xlab/--ylab (#7082 slice b)

1 participant