Skip to content

Project Tom Hagen: fold pipeline types without overload ceilings - #26

Merged
cowboyd merged 1 commit into
mainfrom
project-tom-hagen-fold
Sep 23, 2026
Merged

cowboyd merged 1 commit into
mainfrom
project-tom-hagen-fold

Conversation

@cowboyd

@cowboyd cowboyd commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

route(), command(), and extend() relied on large overload towers that imposed arbitrary limits on otherwise composable definitions. Larger applications could exceed those limits, while adding more overloads made the public types brittle and expensive to maintain.

The replacement must preserve exact inference across static elements, reusable extensions, nested routes, and dynamic checkpoints without filling normal hovers with internal type machinery.

Approach

Treat definition construction as a small type-level interpreter. Each built-in combinator carries an operation describing how it changes the current route, and a variadic fold applies those operations from left to right. Static operations are accumulated in bounded groups and materialized as concrete route, model, child, and phase shapes, which keeps compiler work controlled and public hovers readable.

The runtime remains ordinary immutable function composition. Concrete user combinators compose without registration; only generic transformations whose output depends on their input require mark(), because TypeScript cannot otherwise apply that higher-order relationship. Tuple inputs retain exact inference, while widened arrays intentionally fall back to a conservative type instead of pretending to know their sequence.

@pkg-pr-new

pkg-pr-new Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/configliere@26

commit: 21e1d0b

@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch from ef031fb to 064f111 Compare September 5, 2026 14:48
@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch from 064f111 to 6b2572c Compare September 9, 2026 01:21
@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch from 6b2572c to c1d1acb Compare September 9, 2026 01:40
@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch from c1d1acb to 4eb4da5 Compare September 9, 2026 01:54
@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch from 4eb4da5 to c61f11a Compare September 9, 2026 03:23
@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch 3 times, most recently from f2bc48b to 533256c Compare September 23, 2026 01:13
Base automatically changed from project-tom-hagen-env to main September 23, 2026 15:03
Add compiler diagnostics and materialize merged phase models so public hovers expose concrete model shapes.

Co-Authored-By: Jacob Bolda <me@jacobbolda.com>
@cowboyd
cowboyd force-pushed the project-tom-hagen-fold branch from 533256c to 21e1d0b Compare September 23, 2026 15:03
@cowboyd
cowboyd merged commit f619ac7 into main Sep 23, 2026
4 checks passed
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