Skip to content

fix(build): include parser fork in installable root module - #699

Merged
ss-o merged 3 commits into
mainfrom
bug-653
Oct 16, 2026
Merged

ss-o merged 3 commits into
mainfrom
bug-653

Conversation

@ss-o

@ss-o ss-o commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Restore the documented versioned Go installation path by compiling the retained parser fork as packages of the root module. Keep third_party/mvdan-sh in place, rewrite imports to github.com/z-shell/zsh-lint/third_party/mvdan-sh, and remove the nested module files and local replacement.

The 171 existing Go-file changes are import-namespace rewrites plus Go formatting only. Parser and rule logic, CLI/configuration contracts and the fork's BSD-3-Clause license are unchanged. The root module now owns the fork test dependencies and stringer tool. Fork-refresh documentation, Renovate's obsolete nested-module rule and Go module whitespace handling are updated.

Preserve the previous third-party lint boundary explicitly: the fork was outside root-module lint before this change. Root-level build, vet and tests now include its retained packages, including typedjson. Existing verifier, CI and mutation directory routing still works without modification.

The parser front-end instructions are regenerated from the organization source approved in z-shell/.github#805 (f4ce168, issue z-shell/.github#803), which is reconciled against this packaging and links ADR-0041. The Org Routing caller now references the organization workflow at @main under ADR-0042, so its check reads that approved record from the organization's main branch. main is merged in (#700, documentation only).

Closes #653. The immutable v1.4.0 tag remains affected; the fix is available by this commit and will reach @latest through the next release.

Verification

  • The new packaging and CLI dependency-graph regressions fail before the change and pass afterwards. go mod tidy -diff is clean.
  • Real public installation succeeds with fresh GOPATH, GOMODCACHE, GOCACHE and GOBIN: go install github.com/z-shell/zsh-lint/cmd/zsh-lint@f1c43fac9c8eadfc914a4af89a1beea11afca891. The installed binary records v1.4.1-0.20261015045032-f1c43fac9c8e and analyzes the Zsh heredoc fixture with zero errors or Warnings. An earlier fresh-cache local-module-proxy install also passed and verified that the downloadable zip includes the parser and unchanged license.
  • verify-parser-change.sh passes build, vet, full Go tests, fork tests, lint and both corpus comparisons on the final reviewed source. All 128 parser fixtures and all 2,462 inventory verdicts are unchanged. Existing known gaps and false accepts are not addressed here.
  • Every analyzer diagnostic object is unchanged across the 2,462-file inventory, 242-file organization population and 69-file configured population. The pinned 18-file reference/configured contracts also pass. No precision improvement or newly unlocked parser file is claimed for this packaging change.
  • REQUIRE_SHELLS=1 fork syntax, pattern, expand and typedjson suites pass with native Zsh 5.9.2, Bash 5.3, dash and mksh. Focused race tests, golangci-lint 2.14.0, Trunk, Go formatting and git diff --check pass. Linux arm64, macOS arm64 and Windows amd64 CLI cross-builds pass; these are build checks, not native execution on those platforms.
  • Root gomarkdoc and stringer commands work. Both stringer-generated bodies match the checked-in files, apart from the scratch invocation headers.
  • On head 23c4975: real public installation with fresh GOPATH, GOMODCACHE, GOCACHE and GOBIN succeeds (v1.4.1-0.20261016221917-23c4975b209a), and the CLI exits 0 on the heredoc fixture with Info findings only. org-routing.py check from organization f4ce168 passes; apply there reports AGENTS.md current and changes only the parser instructions. Build, vet and all 19 Go test packages pass, and Trunk (actionlint, markdownlint) passes on both changed files. No Go or module file changed since f1c43fac, so the parser and analyzer results above still hold.
  • Both bounded mutation invocations, --sample 30 --seed 1, generate and test zero mutants because changed production lines are imports. The runner reports those lines as unsupported and exits 3 as inconclusive. Each run has zero timeouts; this is unavailable mutation evidence, not a clean mutation pass. No full or supplemental campaign ran.

Agent handoff

Status: Organization parser guidance is approved and adopted on this head; source checks and fresh public installation pass on 23c4975. The earlier fallback review covers f1c43fac only, so this head needs its own review of record before merge. No tag, release or other consumer repin is included.

Compile the retained parser fork as root-module packages, normalize its import namespace, and remove the nested module and local replacement that block versioned go install. Preserve parser and rule behavior, third-party licensing, upstream-refresh mechanics and the existing lint boundary; add packaging regressions and update module tooling and documentation.

Closes #653
@ss-o ss-o added area:release Release process, versioning, or changelog work. type:bug Something is broken or behaving incorrectly. labels Oct 15, 2026

@ss-o ss-o left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback review under ADR-0026: Copilot request not registered on f1c43fa.

Reviewed the full merge-base diff from e9d1ea1 to f1c43fa under the bundled code-review skill and quality criteria. Classification: class 2 Go CLI/module packaging with retained third-party parser source, not a sourced Zsh plugin. No confirmed CRITICAL or IMPORTANT code defect remains. This author-side fallback is not an independent approval or permission to merge.

Contract and compatibility: the documented versioned installation failure is reproduced on v1.4.0 and the baseline. The new module/dependency regressions fail before the fix and pass afterwards. The root Go 1.27.0 requirement, CLI/configuration contracts and parser/rule behavior are unchanged. All 171 existing Go-file edits were checked against the baseline as namespace substitution plus Go formatting only. The module zip contains the fork and byte-identical BSD-3-Clause license, without a nested module. Root-owned stringer/gomarkdoc commands work, generator bodies match, and no local replacement remains.

Correctness and maintenance: fresh public go install github.com/z-shell/zsh-lint/cmd/zsh-lint@f1c43fac9c8eadfc914a4af89a1beea11afca891 succeeds with isolated empty caches; the resulting binary records the matching pseudo-version and passes the heredoc smoke. Root build/vet/full tests now cover retained fork packages; required-shell suites, targeted race checks and three CLI cross-builds pass. Verifier/mutation commands still resolve the root module from the fork directory. Renovate tidies the root module rather than a nonexistent nested module. The explicit fork lint exclusion retains the former boundary instead of changing upstream source to satisfy newly visible first-party lint findings; vet and fork tests still execute. Go module tabs retain a path-scoped whitespace exception, not a global policy change.

Regression evidence: the final verifier, golangci-lint 2.14.0, changed-file Trunk checks and Git whitespace checks pass. Parser-fixture and native-judged inventory results are unchanged, as are analyzer diagnostic objects across the inventory, organization, configured and pinned populations described in the PR. All 17 currently reported hosted checks pass, including build-test, generation, three corpus checks, parse cost, routing, policy, Trunk and CodeQL. Existing review threads are empty.

Limits and remaining dependency: both bounded mutation invocations test zero supported mutants because the changed production lines are imports, with zero timeouts and exit 3/inconclusive; no mutation-score claim is supported. Cross-builds do not establish native macOS/Windows/arm64 runtime behavior. The immutable release tag is not repaired by this PR. ADR-0030's local-replacement packaging clause and its organization-owned parser-guidance sentence require the separate policy reconciliation before merge; the generated consumer has deliberately not been edited independently.

The explicit Copilot request returned an empty reviewer list and produced neither a new Copilot review-request timeline event nor a review. Its cause is unconfirmed; no billing or quota diagnosis is claimed. The maintainer elected this conditional fallback before the request. This record is valid only for the reviewed head; any subsequent source push requires a new current-head review.

ss-o added 2 commits October 16, 2026 23:18
)

Regenerate .github/instructions/parser-front-end.instructions.md from
the organization source approved in z-shell/.github f4ce168 (#803),
which is reconciled against this branch's root-module packaging: the
import prefix comes from go.mod and FORK.md, ADR-0041 is linked, and the
contract link stays local.

Reference the organization Org Routing workflow at @main under
ADR-0042, so the check reads the approved record from the organization's
main branch.
Comment thread .github/workflows/org-routing.yml Dismissed

@ss-o ss-o left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback review under ADR-0026: maintainer elected after the Copilot request did not register, on 23c4975

Findings

No actionable findings. This re-review covers the delta from f1c43fa, the head of the earlier review of record 5528315189, to 23c4975: signed commit 310b156 and a signed merge of main at a099f73. The source packaging change reviewed there is unchanged.

Note

This is an author-side review of record, not independent human approval. Merging, a v1.5.0 release and consumer rollouts remain separate decisions.

Checklist verdicts

  • Generated parser instructions: pass. .github/instructions/parser-front-end.instructions.md is regenerated, not hand-edited, from the record approved in z-shell/.github#805 (f4ce1685). org-routing.py check from that revision passes on this head, and apply reports AGENTS.md current and changes only this file. The five changed lines are the provenance comment, the namespace-neutral fork and import-prefix wording with the ADR-0041 link, and two ADR links pinned at f7ec572d. The contract link stays local and resolves.
  • Org Routing caller: pass. The reusable workflow is referenced at @main as ADR-0042 decides; permissions stay contents: read, there is still no caller concurrency block, and the comment now describes the @main reference. No other workflow or pin changes. The CodeQL actions/unpinned-tag thread on this line is answered with the ADR-0042 reason and resolved, and alert 16 is dismissed as won't fix.
  • Main merge: pass. It brings in only docs/project/rule-policy.md from #700, byte-identical to main; commit lint skips merge commits.
  • Behavior: pass. No Go, module or test file changed since f1c43fac, so the earlier parser, analyzer, corpus and cross-build evidence still applies to this head.
  • Verification: pass. Fresh-cache public installation from 23c4975 succeeds as v1.4.1-0.20261016221917-23c4975b209a, and the installed CLI exits 0 on the heredoc fixture with Info findings only. Build, vet and all 19 Go test packages pass locally; Trunk passes on both changed files. All 17 hosted checks pass on this head, and both new commits have verified signatures.

Limits and follow-up

Mutation evidence is unchanged: import-only lines are unsupported, so the bounded runs remain inconclusive with zero timeouts. The CodeQL alert raised by @main references applies to every caller that adopts ADR-0042; its organization-wide handling is outside this pull request. Native runtime discovery of the regenerated instructions was not exercised. Review threads and comments were checked before publication; none remains unresolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:release Release process, versioning, or changelog work. type:bug Something is broken or behaving incorrectly.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

go install ...@v1.4.0 fails: go.mod contains a replace directive

2 participants