Skip to content

added an editorconfig recording the existing formatting conventions - #18

Open
dmccoystephenson wants to merge 1 commit into
mainfrom
feature/editorconfig
Open

added an editorconfig recording the existing formatting conventions#18
dmccoystephenson wants to merge 1 commit into
mainfrom
feature/editorconfig

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • An .editorconfig is added at the repository root, recording the formatting conventions the ten tracked files already follow rather than imposing new ones.
  • end_of_line = lf and charset = utf-8 are applied to all files; indent_style = space, indent_size = 4, and trim_trailing_whitespace = true are scoped to *.java.
  • trim_trailing_whitespace is scoped rather than global because LICENSE carries trailing whitespace on three lines. insert_final_newline is left unset entirely because the seven .java files end without a final newline while README.md, LICENSE, and .gitignore end with one. Both decisions are explained in a comment inside the file, so that a later reader does not "complete" the config and silently rewrite files this change was not meant to touch.
  • No source file is modified. No dependency, build file, or top-level directory is introduced.

Closes #16

Test plan

What was verified

Every rule the new file states was checked against every tracked file, byte by byte, in this session. The command below was run at the PR head and its real output is pasted:

$ python3 -c "<per-file byte inspection of all tracked files>"
src/SimpleServer/Message.java          crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
src/SimpleServer/client/Client.java    crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
src/SimpleServer/client/ClientApp.java crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
src/SimpleServer/server/MSThread.java  crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
src/SimpleServer/server/MultiServer.java crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
src/SimpleServer/server/Protocol.java  crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
src/SimpleServer/server/ServerApp.java crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
README.md                              crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
LICENSE                                crlf=0 tabs=0 trailWS=3 nonAscii=True  badIndent=none
.gitignore                             crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none
.editorconfig                          crlf=0 tabs=0 trailWS=0 nonAscii=False badIndent=none

Every .java file therefore satisfies each rule in the [*.java] section, and every tracked file satisfies the [*] section. The single trailWS=3 on LICENSE is precisely the reason trim_trailing_whitespace was not applied globally.

$ git status --porcelain
$ git diff --stat origin/main
 .editorconfig | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

No build output, no .class file, and no scratch file is staged.

What was not verified, and why

The compile and socket gates were UNVERIFIED in this session. javac and java are present on PATH, but every invocation of either is denied by this dispatch's command classifier, including the bare javac -version and java --version probes. This reproduces the block recorded on #9 on 2026-08-26.

That gate is recorded as UNVERIFIED-not-applicable for this pull request: nothing under src/ is touched, no check script exists or is added, and this change quotes no build or run command and claims no program output. A conforming editor reading .editorconfig cannot alter a .java file's compiled behaviour, and the diff is a single new configuration file.

Deferred backlog, and why

Every other open issue was deferred for one shared reason: the JDK is not invocable in this dispatch, so none of them can be implemented or validated here. The reason is recorded once, in this pull request, rather than being commented onto six issues individually.

Issue #16, implemented here, was selected precisely because it is the one open item whose evidence is byte-level file inspection rather than program behaviour.


This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

drafted by Claude on behalf of Daniel Stephenson

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review

The full diff was read at the PR head before scoring. Each item below is scored against the diff or against a command whose output was observed this session, not against judgement alone.

Universal rubric

  • Scope: PASS — the diff is one new file, 16 insertions, zero deletions, and every line of it is the configuration No .editorconfig records the formatting conventions the sources already follow #16 asks for. No unrelated formatting, rename, or comment churn is present.
  • Tests-new: PASS (adapted) — no public method is added, so the usual reading does not apply. The substitute is that every rule the file states was checked against every file the rule governs, by a byte-level inspection run this session whose output is pasted in the PR body.
  • Tests-fix: no signalNo .editorconfig records the formatting conventions the sources already follow #16 is a missing-file gap, not a bug fix. No incorrect behaviour is being corrected, so there is no FAIL-to-PASS transition to demonstrate and the fallback ladder does not apply.
  • Sibling structure: PASS — the only sibling is .gitignore, which is likewise a root-level, comment-headed, LF-terminated dotfile ending in a final newline. The new file matches that shape.
  • Sibling renames: no signal — no identifier is renamed.
  • Docs: PASS — the Phase 7 sources of truth were re-checked. The README.md sentence, the GitHub repository description, Protocol.java, Message.java, the @author headers, and LICENSE are all untouched and none of them describes formatting. No check.sh exists. The .gitignore row is unaffected, since .editorconfig is tracked rather than generated.
  • Issue resolution: PASSNo .editorconfig records the formatting conventions the sources already follow #16's proposed change is implemented exactly as specified, including both narrow-scoping decisions it called for, and nothing in it is left partially done.
  • Manual validation: UNVERIFIED, scope-gated — see below.

Repo-specific rubric

  • Compiled, not read: PASS — no syntax or behavioural claim is made anywhere in the diff or the PR body. The one empirical claim, concerning the formatting properties of the tracked files, was produced by a command actually run this session, and its real output is pasted rather than described.
  • Response lines are observed, not asserted: PASS — no success=, reason=, or answer= string appears in the diff or the PR body. Nothing was quoted that was not seen.
  • No build output staged: PASSgit status --porcelain printed nothing after the commit, and gh pr diff 18 shows .editorconfig as the sole path. No .class file, no .build/, no out/, no .claude/ entry, and no scratch file was staged.
  • Package/path agreement, Author header, Both ends of the protocol, Resources closed, No new swallowed failure: no signal — no source file is added or modified.
  • JDK-only: PASS — no import, no vendored jar, no new top-level directory, and no build or dependency file. .editorconfig is consumed by editors and is not an input to javac.
  • Server left running: PASS — no server was started, the JDK being uninvocable here.

Manual validation

The compile and socket gates are UNVERIFIED in this session. javac and java are both present on PATH, but every invocation is refused by this dispatch's command classifier, down to the bare javac -version and java --version probes. This reproduces exactly the block recorded on #9 on 2026-08-26, so it is a standing property of the dispatch rather than a transient failure.

The gate is recorded as UNVERIFIED-not-applicable under the scope rule: nothing under src/ is touched, no check script is added, and no build command or program output is quoted. A conforming editor reading this file cannot change what any .java file compiles to.

This is nonetheless not a claim that the change is verified by compilation, and the pull request is not proposed for an autonomous merge.

Findings

The rubric produced one finding that is a judgement call rather than a mechanical fix, so it is recorded here instead of being applied.

.editorconfig:6 — end_of_line = lf is asserted to editors while no .gitattributes asserts it to git. On a checkout made with core.autocrlf=true, git would materialise CRLF in the working tree while this file instructs the editor to write LF. The two would disagree, and a single save could produce a whole-file line-ending diff — the opposite of what this change is for. Every tracked file was confirmed to contain zero CRLF sequences today, so no file is currently affected, and adding .gitattributes would change how checkouts are materialised and therefore belongs in its own change rather than being folded in here. The gap is flagged for the repository owner's decision.

Two further observations are recorded without being acted on. insert_final_newline is left unset because the seven .java files end without a final newline; the better end state is that those files gain one and the property is then set to true, but that is a whitespace change across all seven sources, which needs the compile gate this dispatch cannot run. And the LICENSE trailing whitespace on three lines, which is why trim_trailing_whitespace is scoped to *.java, is left alone deliberately, LICENSE being on the do-not-auto-merge list.


This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

drafted by Claude on behalf of Daniel Stephenson

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.

No .editorconfig records the formatting conventions the sources already follow

1 participant