Skip to content

quest(m4/go): plan the follow-ups of rust2-go configless - #630

Merged
kixelated merged 3 commits into
mainfrom
quest-plan/go-configless-followups
Nov 7, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest-plan/go-configless-followups

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Plans the follow-ups of moq-dev/rust2#614 (rust2-go configless, quest/m4/go/configless.md) as five m4 quests beside the other Go quests, ranked in quest/m4/go/README.md by what blocks translation first:

  • [M] quest/m4/go/consts.md: export pub constants and statics, associated ones included, instead of refusing them. A static is one Go variable that translated code and Go callers share, so statics get translated too, not only exported.
  • [M] quest/m4/go/runtime-names.md: a crate's pub type Result<T> = Result<T, Error> or own Formatter exports beside the runtime's. Recommends moving the runtime into its own imported Go package, as rust2-ts imports rs, with the module path read from the go.mod above --out.
  • [M] quest/m4/go/enums.md: a Go API for exported enums: an exported tag, variant constants and constructors, and enums passed whole across every root. Includes the OpenAI review's suggestion: an external Go test package that imports the translated items package and constructs and calls its exports, so accessibility is pinned.
  • [M] quest/m4/go/trait-impls.md: export a pub type's trait-impl methods by a naming rule. Recommends rust2-ffi's Go names for std's traits (String(), GoString(), Equal), and leaves the general rule open.
  • [M] quest/m4/go/alias-methods.md: methods reached only through a specialized alias (pub type Byte = Value<u8>): dedupe instances across aliases of one specialization, a wrapper per alias, and impl applicability through rustc's trait solver.

Each quest records "Decided with the maintainer on 2026-11-07: m4 (from #614's follow-ups)" and requires configless.md, since the code it changes lands in #614. quest check --fix drops that link once #614 merges. runtime-names.md and trait-impls.md note that moq-dev/rust2#599 moves rust2-ffi's Go exports toward a Go package per Rust module, which bears on their naming.

Overlap

None found. I searched the quest tree, quests deleted in git history, and open PRs touching quest/. quest/m4/go/coverage.md covers language constructs (Drop, floats, trait objects), not the exported API. rust2-ffi's Go generator (ffi/README.md) already names enums, constants, and std trait impls for its cgo bindings, so the quests cite it as a precedent.

Choices made without asking

  • Not gated on speed. Coverage waits on speed because a failed speed result deletes go/. These quests carry the same risk, but configless itself was planned ungated, so I followed that. If you'd rather gate them, each one can add speed to its Required.
  • Struct form for enums (recommended in enums.md): keep the layout translated code uses and export its parts, instead of rust2-ffi's Go form (an int32 for a plain enum, a sealed interface for one with data). This follows feat(go)!: translate a crate's whole pub API with no go.toml #614's follow-up wording and needs no conversion at a root.
  • Upper-case constants (recommended in consts.md): camel case each word (MaxLen), where feat(go)!: translate a crate's whole pub API with no go.toml #614's rule gives MAXLEN and rust2-ffi's Go keeps LIMIT.
  • Size: each is M. None is mechanical, and the naming and representation choices are most of the work.

Public API

None. This PR changes only quests.

Checks

just check (lint and quest check) passes on 772227e.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, high effort

Review

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, medium effort
  • Session: 01a1b448-9e10-72a1-96d4-e670db6e6683, round 1
  • Head: 772227e
  • Base: origin/main at 9dc8ba1
  • Score: 10/10, The specified diff adds five follow-up quest documents and index links, changes no executable code, and contains no actionable defects under the repository’s review rules.
  • Findings: none

Five quests from #614's follow-ups and its OpenAI review:
pub constants and statics, exported names off the runtime's, a Go API
for exported enums with an external test package, trait-impl methods,
and methods reached only through a specialized alias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Nov 7, 2026

Copy link
Copy Markdown

Pullfrog  | Review this ➔

@kixelated
kixelated marked this pull request as ready for review November 7, 2026 04:34
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cfdb3108-a417-4c4b-93e2-59f2c9ad6e65
Commits

Reviewing files that changed from the base of the PR and between ad6adef and be87798.

Files selected for processing: 6

  • quest/m4/go/README.md
  • quest/m4/go/alias-methods.md
  • quest/m4/go/consts.md
  • quest/m4/go/enums.md
  • quest/m4/go/runtime-names.md
  • quest/m4/go/trait-impls.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed head 772227e against base 9dc8ba1.

No actionable defects found in this planning-only diff. The five quests separate the remaining export gaps, require the configless work that introduces their current refusals, and leave representation/naming choices visible. The specialized-alias plan explicitly covers shared instances and impl applicability, and the enum plan incorporates an external importing Go test rather than checking generated names alone.

Direction for implementation: preserve the distinction between a Rust const's fresh value at each use and a static's shared storage when emitting non-basic constants as Go variables; add mutation/copy cases to the external-package tests. The runtime-package move also needs a collision-safe import name and an actual importing-package build. These are implementation acceptance checks, not blockers to recording the quests. The epic's speed/drop decision remains in force; these documents do not demonstrate that the performance bar has been met.

Limits: GitHub-only review of all six changed documents, the Go epic/configless/speed plans, and the relevant prior #614 review context. No executable code changes, builds, tests, quest context, or quest validation were run. I did not independently verify the claimed exhaustive overlap search or maintainer decisions. This COMMENT is not merge approval.

kixelated and others added 2 commits November 6, 2026 20:44
@kixelated
kixelated added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 2232983 Nov 7, 2026
4 checks passed
@kixelated
kixelated deleted the quest-plan/go-configless-followups branch November 7, 2026 04:48
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