Skip to content

Road to 1.0: refactoring roadmap from the quality review #350

Open
0 of 25 issues completed
Open

Description

@Blind-Striker

A full quality review of the SDK ran ahead of 1.0. It covered every hand-written slice, the generator, the generated output, the tests and the build, and each finding was verified by two model families. This issue tracks the refactoring that came out of it.

What the work is for

The review measured the codebase against seven goals: reusability, no slop, duplication, maintainability, usability, simplicity and explicitness. The result in short:

Area Where it stands The main structural causes
Tests Duplication and red-test usability are poor: about 8% duplicated lines, and about 430 assertions that print only false on failure (the guard's exact count; the review's sample had found 253) Builders stop at the syntax layer, there is no shared assertion vocabulary, clock seams are partial, and live-test lifecycles are composed by hand
Generator and tools Maintainability is poor: the binders are private-method workflows over shared state, in flat 77- and 89-file folders An under-resolved emit plan, per-operation behaviour emitted as templates, curation rules without a shared row contract, and refresh state without a model
Runtime Mostly sound for consumers. Poor on semantic duplication: two child-process stacks, three clock abstractions, and failure mapping decided per call site Stateful workflows with no owning type; platform knowledge with no single owner

Every epic below closes a named set of verified findings. Each lands together with the mechanical gate that stops its problem from coming back.

How behaviour stays the same

  • Generator refactors keep the generated output byte-identical (generate --verify).
  • The public API changes only in the freeze pass, as a reviewed diff of PublicApi.verified.txt.
  • Tests are strengthened first (order-strict, readable assertions; no real-clock verdicts), and only then are product refactors made.
  • No PR refactors a product area together with its tests.
  • Bug fixes each come with their own red-then-green test.
  • Benchmarks run before and after. The before-set for this round is already archived.

Before the API freeze

During the release candidate

Runtime

Generator and tools

Tests

Sweeps and gates

Progress shows in the PRs: each PR title starts with its epic.

Each unfinished row links its epic issue (sub-issues of this issue); the finding issues each epic closes are that epic's sub-issues.

Activity

  1. added this to the 1.0 milestone on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions