Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e3d52e9
0.6.1: three targeted fixes — class-body trailing comments, lambda-bo…
barrycaceres Jul 14, 2026
2ec465b
0.6.1: nested-call wrap, switch brace, tree-sitter 0.26.0, CI corpus …
barrycaceres Aug 12, 2026
763f682
0.6.1: pack-all-or-nothing chains; arguments that wrap get their own …
barrycaceres Aug 12, 2026
be1c04e
0.6.1 docs: state the 'if an argument breaks, the argument list break…
barrycaceres Aug 12, 2026
8b9ba07
0.6.1: address local code review — constructors, docs accuracy, test …
barrycaceres Aug 12, 2026
9c0025c
0.6.1: source-preserve re-anchor + yield to the break rule; keep
barrycaceres Aug 12, 2026
8c072e3
0.6.2 item 1: escalate the whole argument list when any argument cann…
barrycaceres Aug 13, 2026
f0ba014
0.6.2: declarator backs off when a chain RHS escapes its anchor
barrycaceres Aug 13, 2026
d043269
0.6.1: retire source-preserve width fallback + P4-packed + enhanced-f…
barrycaceres Aug 13, 2026
23ce1e7
0.6.1: document priority 3b and enhanced-for wrapping; consolidate CH…
barrycaceres Aug 13, 2026
e6c09df
0.7.0: record headers, parameter name alignment, structural javadoc i…
barrycaceres Aug 14, 2026
9af33d9
0.7.0: address round-3 review — alignment overflow, silent exits, dea…
barrycaceres Aug 14, 2026
f294164
0.7.0: extend 'argument breaks -> list breaks' to priority 3
barrycaceres Aug 14, 2026
b6e74cd
0.7.0: document the priority 3 argument-breaks rule; regenerate goldens
barrycaceres Aug 14, 2026
016f225
0.7.0: address round-4 review — escalation exemptions, retire array p…
barrycaceres Aug 14, 2026
1b163ab
0.7.0: address round-4 SHOULD-FIX and NITs
barrycaceres Aug 14, 2026
ec90ec5
0.7.0: fix cspell failures, correct the idempotency gate, document th…
barrycaceres Aug 14, 2026
1c7811b
Merge branch 'main' into caceres-0.7.0
docktermj Aug 17, 2026
4cbaa0a
formatter: stop corrupting argument lists that contain an inline comment
barrycaceres Aug 18, 2026
c80ce8a
formatter: stop dropping receiver parameters
barrycaceres Aug 18, 2026
4890303
formatter: let field access break before its dot
barrycaceres Aug 18, 2026
9371468
formatter: report a declaration whose semicolon does not fit
barrycaceres Aug 24, 2026
60e7d10
0.7.0: fold in four pre-existing formatter defect fixes
barrycaceres Aug 24, 2026
e511871
0.7.0: document the four folded-in defect fixes
barrycaceres Aug 24, 2026
779c673
Merge origin/caceres-0.7.0: dependabot bumps from main
barrycaceres Aug 24, 2026
fb159c5
0.7.0: expression-bodied lambdas are transparent to nested-call rule 2
barrycaceres Sep 1, 2026
3188aa8
Merge item-1-lambda-embedded: expression-bodied lambdas transparent t…
barrycaceres Sep 1, 2026
ae5338e
0.7.0: javadoc paragraphs of any length distribute, inline tags stay …
barrycaceres Sep 1, 2026
1956d0f
Merge item-2-javadoc-reflow: javadoc distribution at 3+ lines and inl…
barrycaceres Sep 1, 2026
3317462
0.7.0: lay out the declaration semicolon, and stop the receiver reser…
barrycaceres Sep 2, 2026
591d18b
Merge item-3-declaration-semicolon: declaration semicolon layout and …
barrycaceres Sep 2, 2026
3c42636
0.7.0: correct the declaration-semicolon rationale (comments only)
barrycaceres Sep 2, 2026
a3ba863
0.7.0: five of the six second-pass files now settle on the first
barrycaceres Sep 2, 2026
24db5e7
Merge item-4-second-pass: five of six second-pass files now settle on…
barrycaceres Sep 2, 2026
c6f7123
0.7.0: reword prose to satisfy spellcheck (no behavior change)
barrycaceres Sep 2, 2026
efe77a3
0.7.0: rename identifiers and one fixture path for spellcheck
barrycaceres Sep 2, 2026
86e8ebf
0.7.0: honour checkstyle's LineLength exemptions in every advisory
barrycaceres Sep 2, 2026
47fc66e
0.7.0: absorb CI review round 2 (comments, DRY, workflow pin)
barrycaceres Sep 2, 2026
3a0e95c
0.7.0: absorb CI review round 3 (naming, catch-refusal DRY)
barrycaceres Sep 2, 2026
0960c40
0.7.0: absorb CI review round 4 (stale docs, dead clause, version drift)
barrycaceres Sep 2, 2026
b18b041
0.7.0: absorb CI review round 5 — a real for-header bug and 124 dead …
barrycaceres Sep 2, 2026
cd42886
0.7.0: field access advises on every commit; reconcile stale figures
barrycaceres Sep 3, 2026
23e9e3f
0.7.0: reword "unsplittable" again, keeping identifier widths stable
barrycaceres Sep 8, 2026
a3cfda1
0.7.0: multi-declarator statements charge their real suffix
barrycaceres Sep 8, 2026
739a60d
0.7.0: advisories report the width that reaches disk
barrycaceres Sep 9, 2026
bba3888
0.7.0: spellcheck, a stale fixture reference, and two review false po…
barrycaceres Sep 9, 2026
cf8d8c1
0.7.0: pin the checkstyle-exemption equivalence; drop an unused local
barrycaceres Sep 9, 2026
d70c488
0.7.0: absorb CI review round 10 — stale docs, one misnamed helper
barrycaceres Sep 9, 2026
8f12337
0.7.0: collapse a stray triple blank line in the test module
barrycaceres Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .claude/070_REMAINING_SCOPE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# 0.7.0 shape census — decisions and outcomes

Record of the four output shapes the 0.7.0 consumer-trial census found
wrong, the decision taken on each, and what shipped. Census covered 504
files across `senzing-commons-java`, `sz-sdk-java`, `sz-sdk-java-grpc`
and `data-mart-replicator`.

**All four census findings are resolved in 0.7.0**, as are three of
the four items this document originally deferred — see the two
sections at the end for what shipped and what remains.

## 1. Deep orphan — a construct emitted left of the `(` it belongs to

**Decision:** when any argument cannot be laid out without still
overflowing, the whole argument list escalates as if the first argument
had not fit.

**Shipped.** Escalation to priority 4 driven by a per-argument escape
check. One correction during review: the check scanned one row too many.
`Emitter.line_count` excludes the in-progress line, so the scan began on
the row already open when the argument started — for argument 0 that is
the call line, whose indent is always left of the continuation column,
so every wrapping first argument reported a false escape and skipped
priority 3. Fixed by starting one row later; pinned by
`arg_list_wrap/18_arg0_wraps_so_whole_list_breaks`.

Deep orphans across the corpus: **37 → 3**.

## 2. Declaration headers over 80, never wrapped

**Decision:** move `implements` to the next line as the first measure.
Break record components paren-aligned, one per line, if they must also
break.

**Shipped** exactly as decided — this is the spec's existing "Record
Headers" cascade, which had simply never been implemented. Components
emit through the shared parameter cascade with `force_wrap=True`, which
also retires source preservation for them; preservation was replaying an
author's packed layout and producing an 88-column row.

This exposed a second gap: the parameter cascade had never generated the
type/name column alignment the spec always required, so every aligned
list in the corpus was author-written and preserved. Implemented, with
two carve-outs — a single parameter is never padded (no column to form),
and lists containing varargs or receiver parameters are not padded
(their prefix is not a bare type, so one measured width does not model
them). Both are documented in the standards document.

## 3. Enhanced-`for` headers over 80

**Decision:** break before the `:`, with the colon leading the
continuation line, and the opening brace goes Allman because the header
is multi-line.

**Shipped.** A review pass caught that the wrapped path reserved nothing
for its own closing `)`, landing it in column 81 — silently and
idempotently, so no reformat would ever repair it. Now reserves one
character (one, not two, because the Allman brace moves to the next
line).

Over-long enhanced-`for` headers: **25 → 0**.

## 4. Comment orphans

**Decision:** an orphan only counts if its words would have fit on the
previous line without overflowing.

**Partly shipped, partly declined on evidence.**

Shipped: javadoc prose reflow now balances rather than packing greedily
when greedy leaves a trailing fragment of three words or fewer, sharing
one helper with `//` comment reflow, which has balanced since 0.6.0.
Scoped to two-line paragraphs — at three or more the soft-target rebuild
can hand the last line more than greedy did and split an inline
`{@link ...}` tag across rows.

Declined: joining `//` lines the author split. A run of `//` lines gives
no reliable signal for whether it is one wrapped comment or several
adjacent ones. Of 23 candidates, four were commented-out code, one a
tabular legend, and three pairs of independent statements. Merging the
wrong pair silently damages source, which is not a trade worth making
for a cosmetic gain.

Also shipped under this heading, and the more valuable half: an indented
javadoc line now counts as structure rather than prose. That fixed the
last non-converging construct in the corpus — reflow was erasing the
indent that determined paragraph grouping, so each pass regrouped and
reflowed differently.

## Explicitly not defects — do not "fix"

- **`<pre>` ASCII-art diagrams and box drawings.** Preserved verbatim
and correctly so. `package-info.java` in `data-mart-replicator`
carries 112 lines over 80 for this reason, identical before and after
formatting.
- **Javadoc `{@snippet}` / `@highlight` / `@replace` directives.** Half
of all remaining over-80 lines in the corpus. Wrapping them breaks the
region markup they depend on.
- **Long `import` statements and `@ValueSource` annotations.** No
wrappable structure.
- **A single string literal already longer than the limit.** Shortening
it requires splitting the literal, which is a code change and outside
what an AST-preserving formatter may do.

## Folded into 0.7.0 after this census was written

These three were deferred when the census was first written, then
folded into 0.7.0 later in the release. They are recorded here as
resolved so this document does not contradict `CHANGELOG.md`.

- **Shape B via lambda bodies.** `_is_nested_or_chained_call` now
traverses `lambda_expression` when the call is the lambda's body, so
an expression-bodied lambda is transparent to nested-call rule 2.
Block-bodied lambdas stay opaque. 544 argument lists changed
classification, none in the other direction.
- **Javadoc reflow at three or more lines**, including inline-tag
atomicity. A minimum-raggedness pass charging every line — the last
one included — replaced the soft-target rebuild, with 0.7.0's own
layout as the floor so it can improve but not regress. 210
paragraphs improved, zero regressions.
- **Five of the six second-pass files.** Two more layout-reading
decisions were retired: the basic-`for` header now escalates when a
clause wraps rather than only on overflow, and the Tier 1 brace
collapse no longer gates on the SOURCE condition's row span.
Second-pass files 6 to 1.

## Still deferred to 0.8

- The last second-pass file, `AbstractSchedulingService.java`, a
chain-with-lambda that settles on pass 2. It is layout-dependent —
pristine source and pass-1 output share an AST yet format
differently — but the responsible read has NOT been identified. A
predicate trace diverges inside
`_arg_list_takes_source_preserve_path`, yet preservation fires zero
times on that file, so that answer is discarded and cannot be the
cause. Do not assume the chain cascade.
- Optional: surface the 23 line-comment orphan candidates as advisories
through the existing `FormatterWarning` channel, leaving the judgment
to a human.
15 changes: 7 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ updates:
- "senzing-factory/*"
schedule:
interval: "daily"
# One pip entry only. `tooling/scripts/tests/requirements.txt`
# pulls in the runtime pins via `-r ../requirements.txt`, so this
# single directory already covers both files — PR #43 bumped
# pytest in the tests file from here. A second entry for
# `/tooling/scripts/tests` duplicates the same dependency set and
# opens two identical PRs for every bump (#23/#24, #38/#39,
# #43/#44, #46/#47), so do not re-add one.
- package-ecosystem: "pip"
assignees:
- "barrycaceres"
Expand All @@ -23,11 +30,3 @@ updates:
directory: "/tooling/scripts"
schedule:
interval: "daily"
- package-ecosystem: "pip"
assignees:
- "barrycaceres"
cooldown:
default-days: 21
directory: "/tooling/scripts/tests"
schedule:
interval: "daily"
52 changes: 52 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,55 @@ jobs:

- name: Run pytest
run: pytest tooling/scripts/tests/ --verbose

# The fuzz and perf gates need a real-world Java corpus.
# `resolve_java_corpus()` falls back to `<consumer>/src`, which only
# exists when this repo is checked out as a submodule of a consumer
# project — so in the standalone checkout the `pytest` job above uses,
# `test_fuzz_corpus.py` and `test_performance.py` silently skip. That
# left the AST round-trip and idempotency properties not gated in CI.
# This job supplies a corpus so they actually run.
corpus-gate:
name: "Corpus gate: AST round-trip, idempotency, perf"
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10

steps:
- name: Checkout repository
uses: actions/checkout@v7.0.1
with:
persist-credentials: false

# Pinned to a release tag rather than tracking `main` on purpose:
# the corpus is test input, so it must not move underneath this
# repo. Tracking `main` would let an unrelated consumer commit
# turn standards CI red. Bump the tag deliberately when you want
# the gate to cover newer consumer code.
- name: Check out Java corpus (senzing-commons-java 4.0.1)
uses: actions/checkout@v7.0.1
with:
repository: senzing-garage/senzing-commons-java
ref: "4.0.1"
path: .corpus
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v7.0.0
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tooling/scripts/tests/requirements.txt

# Only the corpus-dependent gates; the matrix job above already
# covers the fixture suite across every OS and Python version.
- name: Run corpus gates
env:
SENZING_JAVA_FUZZ_CORPUS: ${{ github.workspace }}/.corpus/src
run: |
pytest tooling/scripts/tests/test_fuzz_corpus.py \
tooling/scripts/tests/test_performance.py --verbose
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"systemstubs",
"temurin",
"Varargs",
"venv",
"virtualenv",
"webcompere",
"wrappable",
Expand Down
Loading