Skip to content

Advance solargraph pin, re-include gemspec in typecheck - #482

Merged
apiology merged 5 commits into
mainfrom
worktree-sg-ignore-audit
Aug 29, 2026
Merged

apiology merged 5 commits into
mainfrom
worktree-sg-ignore-audit

Conversation

@apiology

Copy link
Copy Markdown
Owner

Problem:

The solargraph pin (62eb9b63) was several commits behind apiology/solargraph's 2026-08-04 branch, and separately checkoff.gemspec has been silently excluded from strong typecheck since apiology/checkoff#450 — every @sg-ignore comment inside it was inert, hiding that all 19 Gem::Specification.new setter calls were actually unresolved.

Gem::Specification.new do |spec|
  # @sg-ignore
  spec.name = 'checkoff'  # never actually typechecked

Left as-is, the pin drifts further from upstream fixes and the gemspec's ignores keep accumulating with no real signal behind them.

Solution:

Advanced the pin to 8afa152f5 (stopping short of castwide/solargraph#1310's still-open regression), re-included *.gemspec in typecheck, and added config/annotations_rubygems.rb typing Gem::Specification.new's block-yield param — the actual gap, since the individual setters were already signed — which cleared all 19 markers.

apiology and others added 5 commits August 28, 2026 09:44
Advances apiology/solargraph on the 2026-08-04 branch from 62eb9b63
to dd2bc51 (current tip, 12 commits), regenerating
rbs_collection.lock.yaml against the newer upstream
ruby/gem_rbs_collection revision (gem count unchanged, 69).

Two strong-typecheck findings surfaced and were triaged:

- test/unit/test_tasks.rb#projects had a stale @return [void] tag
  (Checkoff::Projects.new is memoized there); corrected the tag,
  which resolves both call sites that chained .expects on the
  result.
- lib/checkoff/task_searches.rb:163 (Kernel.loop) newly reports
  unresolved on Module<Kernel>, tagged
  tool-limitation:module-function-explicit-receiver-unresolved.
  Tracked in Asana task 1217949394990907, not yet filed upstream.

Strong typecheck clean (0 problems), 332/332 tests pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Evcn8ABJk8ZhNmiDxJ28Th
Reverts apiology/solargraph on the 2026-08-04 branch from dd2bc51
back to 8afa152f5, the last mainline commit before c532d8315 merged
in castwide/solargraph#1310 (still open upstream). That merge
introduced a regression where Kernel.loop inside a method body
fails strong typecheck with Unresolved call to loop on
Module<Kernel>, tracked in Asana task 1217949394990907 and being
fixed upstream on branch fix-module-function-explicit-receiver.

Removes the tool-limitation:module-function-explicit-receiver-
unresolved suppression on task_searches.rb, no longer needed at
this revision. Re-pin forward once the upstream fix lands.

Strong typecheck clean (0 problems), 332/332 tests pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Evcn8ABJk8ZhNmiDxJ28Th
checkoff.gemspec is excluded from Solargraph typecheck via '*.gemspec'
in .solargraph.yml, so its 19 @sg-ignore comments (18 bare, one with
a one-line reason) never take effect. sg-ignore-audit's census left
them untagged; label them likely-stale and record why, matching the
already-tagged 8 markers elsewhere in this repo (6
deliberate:wrong-argument-type, 1 deliberate:fabricated-accessor, 1
tool-limitation:pr-72).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018uJxB2PHBmGGXBkQexN795
checkoff.gemspec was excluded from typecheck since PR #450 (2026-05-25,
a cookiecutter sync that moved '*.gemspec' from include: to exclude:).
Re-including it revealed the 19 @sg-ignore comments tagged likely-stale
in the previous commit are not stale at all -- they suppress genuine
Unresolved-call errors on every Gem::Specification.new block-param
setter, because rbs's bundled core/rubygems/specification.rbs declares
Gem::Specification (and Gem::BasicSpecification) with zero method
signatures. Retagged all 19 to upstream-type-annotation:rubygems-
specification-rbs-gap with the literal error text.

The 20th marker, on $LOAD_PATH.unshift, checked out as genuinely
unneeded once typechecked and was removed.

Verified: strong typecheck 0/135 files, rubocop clean, 332/332 tests
pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018uJxB2PHBmGGXBkQexN795
The 19 upstream-type-annotation:rubygems-specification-rbs-gap markers
were not caused by missing signatures on Gem::Specification's setters
-- solargraph pin confirms those already resolve correctly via rbs's
core fills. The actual gap is Gem::Specification.new's own block-yield
type, which rbs declares untyped, so the spec block param in
`Gem::Specification.new do |spec| ... end` never gets typed as
Gem::Specification and every call on it was unresolved regardless.

Added config/annotations_rubygems.rb overriding .new's block-yield
type to Gem::Specification. Verified against real method signatures in
Ruby 3.3.12's own lib/ruby/3.3.0/rubygems/specification.rb (name,
email, homepage, metadata, bindir are attr_accessor; version=,
authors=, files=, executables=, required_ruby_version=, add_dependency
are custom methods) before writing it, and confirmed with an isolated
strip/typecheck/restore cycle that the errors persist without the
annotation and clear with it -- not caused by a stale cache.

All 19 markers are now genuinely unneeded and removed; census drops
from 27 to 8. Verified: strong typecheck 0/136 files, rubocop clean,
332/332 tests pass, `gem build checkoff.gemspec` still succeeds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018uJxB2PHBmGGXBkQexN795
@apiology
apiology marked this pull request as ready for review August 29, 2026 13:59
@apiology
apiology merged commit 53d9f23 into main Aug 29, 2026
2 checks passed
@apiology
apiology deleted the worktree-sg-ignore-audit branch August 29, 2026 13:59
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.

1 participant