Skip to content

feat: add pipe.as stage for cross-quirk adaptation - #503

Merged
sini merged 5 commits into
denful:mainfrom
sini:feat/pipe-as-stage
May 10, 2026
Merged

sini merged 5 commits into
denful:mainfrom
sini:feat/pipe-as-stage

Conversation

@sini

@sini sini commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds pipe.as stage that renames pipe output so data from one quirk can be delivered under a different quirk name
  • Enables derived quirks — quirks with no native emitters, populated entirely via collect + transform + rename from other pipes
  • Composes with all existing stages (pipe.collect, pipe.transform, pipe.filter, pipe.to)
  • Self-targeting (pipe.as "same-pipe") throws a clear error

Changes

  • nix/lib/policy-effects.nix: pipe.as stage constructor
  • nix/lib/aspects/fx/assemble-pipes.nix: Assembly logic for untargeted and targeted pipe.as routing, mkCombinedBase helper extraction
  • templates/ci/modules/features/pipe-policy.nix: 6 new tests (basic, transform, collect, pipe.to, no-emitter quirk, self-error)
  • docs/: Updated explanation, guide, and reference docs for pipe.as

Test plan

  • 767/767 CI tests pass
  • 6 new pipe-policy tests cover all pipe.as combinations
  • Existing pipe tests unaffected (no regressions)

@vic vic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice!

@vic vic added the merge-approved Approved, merge yourself when ready label May 10, 2026
@sini
sini merged commit 638d4f2 into denful:main May 10, 2026
38 of 40 checks passed
charlesfire pushed a commit to charlesfire/den that referenced this pull request May 16, 2026
## Summary

- Adds `pipe.as` stage that renames pipe output so data from one quirk
can be delivered under a different quirk name
- Enables derived quirks — quirks with no native emitters, populated
entirely via collect + transform + rename from other pipes
- Composes with all existing stages (`pipe.collect`, `pipe.transform`,
`pipe.filter`, `pipe.to`)
- Self-targeting (`pipe.as "same-pipe"`) throws a clear error

## Changes

- `nix/lib/policy-effects.nix`: `pipe.as` stage constructor
- `nix/lib/aspects/fx/assemble-pipes.nix`: Assembly logic for untargeted
and targeted `pipe.as` routing, `mkCombinedBase` helper extraction
- `templates/ci/modules/features/pipe-policy.nix`: 6 new tests (basic,
transform, collect, pipe.to, no-emitter quirk, self-error)
- `docs/`: Updated explanation, guide, and reference docs for `pipe.as`

## Test plan

- [x] 767/767 CI tests pass
- [x] 6 new pipe-policy tests cover all `pipe.as` combinations
- [x] Existing pipe tests unaffected (no regressions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-approved Approved, merge yourself when ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants