Repository navigation
feat(format): run the generated apps' autocorrecting formatters after the rename - #153
Merged
Merged
Conversation
… the rename The rename changes identifier lengths and alphabetical order, which the substrates' lint configs flag although the builds pass: RuboCop Layout/HashAlignment after shopkeeper_auth -> teammate_auth, ktlint import ordering after ShopkeeperLocaleUpdate -> TeammateLocaleUpdate. Each worker now runs, after rename.rb: - rails: bin/rubocop -a (mise exec when available, bundle install first if bundle check fails) - android: ./gradlew spotlessApply --no-daemon - ios: swiftformat <Product> (the app sources, as the template's make format does), skipped when swiftformat isn't on PATH A shared runStep helper captures output with a timeout and the scrubbed env and never throws. Results land in WorkerResult/PlatformDetail.format, report.json, a "Formatters" section of the HTML report and the platform trace. They are reported, not gated. NATIVEAPPTEMPLATE_FORMAT=off skips them. Closes #149 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
dadachi
force-pushed
the
feat/autoformat-after-rename
branch
from
October 18, 2026 00:19
5ab2ec3 to
5102367
Compare
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.
Closes #149
What
After
rename.rb, each worker runs the substrate's autocorrecting formatter on its generated project and records what's left:bin/rubocop -amise exec --when mise is on PATH (same rule as Layer 2);bundle check→bundle installfirst. Exit ≠ 0 = offenses left./gradlew spotlessApply --no-daemonswiftformat <Product>swiftformatisn't on PATHsrc/validation/run-step.ts: small runner (pipe, interleaved stdout+stderr, timeout,scrubbedEnv()so ANTHROPIC keys are stripped, never throws: a missing binary, crash or timeout becomes a failed result). The opt-in test suites in SPEC Operation 3: test suites aren't run #150 reuse it.src/validation/autoformat.ts: the three formatters. Result typeStepResult(pass/fail/skipped+ command, exit, duration, output tail, note).WorkerResult.format→PlatformDetail.format→report.json, new "Formatters" section in the HTML report (shown only when present), a trace line intmp/trace/<platform>.log(output tail on failure) and in the judge's per-platform line.NATIVEAPPTEMPLATE_FORMAT=offskips the formatters. README, SPEC §4,docs/validation-report.md,docs/OUTPUT-CHECKLIST.md§3 updated.Design decisions (please check)
overallPass/verdict. It isn't one of the three layers, and gating would fail runs whose builds and UI pass. Easy to flip later if you want it to gate.<Product>/, not.: the template'smake formatisswiftformat NativeAppTemplate, and its test targets aren't SwiftFormat-clean (swiftformat --lint .on the paid substrate reports 39/348 files, almost all inNativeAppTemplateTests).swiftformat .would rewrite dozens of test files the rename never touched. Falls back to.when there's no<Product>/next to the.xcodeproj.Tests
bin/rubocop/gradlew/swiftformatscripts: the right args,failwith the offense inoutputTailon exit 1,passon 0, iOS targets the app dir,skippedwhen swiftformat isn't on PATH or the tool is missing,NATIVEAPPTEMPLATE_FORMAT=offdoesn't run the tool,runStepwith a missing command or timeout doesn't throw. Report renders the section only when present..target, flag ignored, section removed).mise exec -- bin/rubocop -a→ pass (277 files, no offenses),./gradlew spotlessApply→ pass,swiftformat BarbershopQueueon an older generated app → pass, 1/201 files formatted.npm run ci: 165/165 pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr