Repository navigation
Description
Design and tracking. Nothing here starts a build. It records the contract and splits the work into 6 milestones.
What
plunge is a fork of Pulumi with its state engine split into a new backend:
records per resource with conditional writes, ownership in marker tags. It's
the same size of rewrite choudoufu was for OpenTofu. A team can back out to
stock Pulumi. Backing out leaves one kind of change, removing the marker tags.
Milestones
- multi-engine plunge P-L0: fork and baseline #3 P-L0, fork and baseline
- multi-engine plunge P-L1: a Pulumi corpus #4 P-L1, a Pulumi corpus
- multi-engine plunge P-L2: protocol tracking #5 P-L2, protocol tracking
- multi-engine plunge P-L3: the per-resource state backend #6 P-L3, the per-resource state backend
- multi-engine plunge P-L4: markers and adoption #7 P-L4, markers and adoption
- multi-engine plunge P-L5: per-resource drift #1 P-L5, per-resource drift
P-L0 and P-L1 can start now. P-L2 follows P-L0. P-L3 is the long pole. P-L4
needs P-L3 and choudoufu H1 (INTENTIUS/choudoufu#2244). P-L5 follows P-L3.
Cross-cutting research (2026-10-25):
-
The hook is engine-wide. A native Go stack transform prepended when the
resource monitor is built (pkg/resource/deploy/source_eval.go:2636-2659)
sees every resource's type and inputs beforeCheck, and can set markers,
importandignore_changesat once. A wrapper at the single provider-load
point (pkg/resource/deploy/providers/registry.go:387,418) covers every
provider's Read, Create and List. OpenTofu had neither, so choudoufu added
its own seams. -
What goes into the hook stays per family or per type, as in choudoufu.
Pulumi's schema has no "taggable" concept. Marker placement is per family,
schema-driven (bridged providers expose the Terraform schema through
GetMapping). Import IDs are per type for bridged providers (the same
Terraform importer strings) and one rule per family for native ones
(aws-nativeprimaryIdentifier, azure-native ARM ids, Kubernetes
ns/name). -
Policy remediations run after
Check, too late for pulumi-aws'stagsAll.
Resource hooks can't modify inputs. -
Rough reuse of choudoufu's generated tables: about 90% for bridged
providers, keyed throughGetMapping; aws-native reuses the CloudFormation
evidence directly.
Verification (2026-10-25, pulumi 7e12743, bridge e21841e, pulumi-aws
862029f, aws-native v1.83.1; one offline experiment against the
pulumi-aws v7.43.0 plugin with stubbed endpoints, never applied): -
tagsAlltiming: PARTLY. A marker added after Check still reaches AWS,
because the bridge re-diffs before Apply and upstream recomputestags_all
fromtagsplusdefault_tags; the next Diff isDIFF_NONEeither way.
Injecting before Check is still the right choice: it gets validation, a
consistent storedtagsAlland a predictable diff. It covers map-style
tagsonly. Other tag shapes need per-type handling. -
Component children: VERIFIED. In-language components, multi-language
components (Constructuses the same monitor address, no proxy) andCall
all pass through stack transforms. Default providers skip them,
ReadResource/.get()never reach them, explicit provider resources and
component resources do, so plunge filters on custom, non-provider resources.
During preview with unknown provider config, a component's children only
appear atup. -
aws-native metadata: PARTLY. Not available over the wire (
GetSchemahas
no tag style or primary identifier, and there's noGetMapping). It's
embedded in the binary and committed as
provider/cmd/pulumi-resource-aws-native/metadata.jsonat every release
tag: 1,682 types, 1,198 withtagsProperty, all withprimaryIdentifier.
plunge reads that file at the tag matching the provider version, with the
CloudFormation schemas as a cross-check.
New risks for P-L4:
- Run plunge's injection after the stack-transform loop, not prepended, so a
user's own stack transforms can't strip or rewrite the markers. - A provider
ignoreTagsconfig matching the marker prefix drops the markers
silently. plunge must detect and refuse it. - If
tagsis unknown during preview, the transform can't merge into it. - 484 aws-native types have no tags property, so markers can't land on them.
They need record-carried ownership, as choudoufu does for untaggable types. - 53 aws-native types have tags as create-only (
tagUpdatable: false, for
example apprunner:Service). Adding a marker to an existing one probably
forces replacement. Adoption must refuse those, never replace.
The demo and the order across repos
The demo: behold/example-three-cloud with one cloud's site on choudoufu, one
on Pulumi, dns staying chant. Default assignment: Azure site to choudoufu,
AWS site to Pulumi, GCP stays chant. Every member is in the engine tier:
ownership colours, per-resource drift, one shared change set.
Order across repos:
- chant: the drift record (C1) and
rootReadsin the graph IR (C2) come
first, because behold's colour work reads them. - behold milestones B1 to B4 and chant C3 (multi-engine C3: the pulumi lexicon chant#4453) to C6 then run in parallel.
- choudoufu H1 (multi-engine H1:
pkg/identitychoudoufu#2244) (pkg/identity) runs any time. H2 (single-resource plan path)
runs any time and unlocks per-resource drift for choudoufu members. - plunge is the long pole. Its state backend (P-L3) decides when the Pulumi
member reaches the engine tier. Until then it shows in the stock tier.
Acceptance conventions for every sub-issue: verdict lines and recorded
artifacts, never exit codes alone. Anything needing an emulator corpus, an
estate run or a real cloud is run by the maintainer by hand. Red-first only for
new guards.
What plunge brings
Stock Pulumi has no way to find a live resource by its marker. That isn't a gap in plunge. It's the core of what plunge adds, the same way choudoufu added marker discovery that stock OpenTofu never had. plunge's own work list for the concurrency claims (see the parity table in the comments):
- Marker lookup: bind a planned create to the live object carrying its marker, and refuse when two objects carry it. This is the biggest item.
- Deterministic autonames, so a uniqueness constraint settles two creates of one resource.
- Splitting out per-stack state (Stack outputs, provider IDs, secrets config, pending operations) into per-resource records.
Where the marker listings come from:
- Not from Pulumi providers.
Listis unimplemented for SDKv2-bridged types (pkg/tfbridge/provider.go:2065-2072), and aws-native's Cloud Control listing has no tag filter. plunge calls the clouds directly, as choudoufu does: the AWS tagging API, Cloud Control, and the GCP, Azure and Kubernetes sweeps. - Most of that code lifts from choudoufu.
internal/live/cloudcontrol,azsweep,gcpsweepandkubesweephave no OpenTofu-specific imports.discoveryandlistclientare tied to OpenTofu types and get ported, not reused. - Binding uses strongly consistent per-type listings, as choudoufu's does. The estate-wide tagging sweep is eventually consistent and can miss a duplicate for a run, so it can't carry the collision claim alone.
Sibling epics
- chant: design: one drift record and a Pulumi lexicon - every engine's drift in one shape, Pulumi plans in the change set, engine outputs into chant parameters chant#4450
- choudoufu: design: choudoufu in the multi-engine demo - single-resource drift and a shared identity package choudoufu#2243
- behold: design: a multi-engine estate - chant, choudoufu and Pulumi members rendered together, projecting drift together, under one change set behold#993
Activity
lex00 commentedon Oct 25, 2026
Concurrency claim parity with choudoufu (vetted 2026-10-25)
The goal is for plunge to make the same resource-level concurrency claims choudoufu makes (
live/CONCURRENCY.md). Each claim was checked against stock Pulumi source (pulumi 7e12743, bridge e21841e). This is a read of the source; nothing was run. plunge can reach parity on all six claims. None of them comes free.pkg/resource/autonaming/strategy.go:243-262, seeded per run atdeploy/step_generator.go:1172-1187), so the creates never collide; no bind step, so the loser retries foreverpulumi:autonamingpattern (no${hex}), plus a marker-bind phase before step generationcollisionProblemrefuses naming both IDsList(bridge/pkg/tfbridge/provider.go:2065-2072)step_generator.go:1446-1449), so a moved value isn't refusedstaterecord:If-None-Match/If-Matchper record; only changed records are written; one record per outputpkg/backend/diy/lock.go:130-154). gocloud.dev has noIf-Matchstaterecord(plain Go, MPL-2.0 file-level, fine in an Apache-2.0 tree)Shared per-stack state that has to be designed out:
projection/rootoutput.godoes.deploy/providers/registry.go:957-965). Two runs creating the default provider leave danglingURN::IDreferences, andVerifyIntegrityfails (deploy/snapshot.go:680-718). Provider IDs must be deterministic, or created with put-if-absent.Coverage-only (these shrink which types the claims cover, as choudoufu's readiness table does): untaggable types,
tag_on_create: falsetypes (choudoufu carves out the same window), non-map tag shapes, andignoreTags/defaultTagsthat hide markers (refused by name).Outside the claims, as in choudoufu: deletes from a run on an older commit. choudoufu's "Serialize applies against one estate in CI anyway" (
CONCURRENCY.md:57-59) is advice, not a claim, and plunge copies the sentence word for word.Decisions before P-L3 and P-L4 can promise parity
cloudcontroland the sweeps (no tofu-specific imports).discovery/listclientwould be a port. Decide what covers SDKv2 types.staterecord, with the stack lock removed.Proofs to mirror: choudoufu's claim 2 (
no-self-managed-locks,two-writers-one-record,cas-holds-under-every-sse-flavour), claim 5 (recovery-is-a-rerun), claim 15 (saved-plan refusal). choudoufu's own gaps worth knowing: no smoke scenario for C2, and the disjoint half of C5 is unit-tested only (#1938, INTENTIUS/choudoufu#1944).Merge unit/fix-epic2-reds: #2 fix path 2's plunge test reds
lex00 commentedon Oct 25, 2026
Path 2 plunge reds fixed. Merge commit 87bd15d on integration/pulumi-engine (unit/fix-epic2-reds; tested at b379516, merged over 6745532, which added only corpus data).
Per failure, and whether the code or the test was wrong:
sg.deployment.Target().Markersetc. with no nil check, and this test builds a step generator with no target. A nil target now means no seam, the same as the delete guard already did (step_generator.go:2715)."pulumi" + TrimPrefix(cmd.CommandPath(), cmd.Root().Name())turned a command with no parent (Use "version") into "pulumi". Now only a root named plunge.BinaryName gets mapped to "pulumi"; every other root keeps its own path, as upstream does (pulumi.go:716).Final runs, all from the unit branch:
go test ./backend/plunge/... ./cmd/pulumi/... ./engine/lifecycletest/ ./resource/deploy/... ./resource/autonaming/ ./plunge/...three times in a row with -count=1: every package ok each time.go test ./backend/plunge/... -count=50: ok.go test -race ./backend/plunge/ -count=3: ok, with no race reports.go test ./backend/diy/... ./backend/httpstate/... ./engine/...: ok for backend/diy, diy/unauthenticatedregistry, httpstate, httpstate/client, httpstate/journal, engine, engine/encryptedlog and engine/lifecycletest.Still open: nothing in this list. The choudoufu copy of LocalStore.PutIfAbsent needs the same fix in that repo.
Merge integration/pulumi-engine: the plunge engine tier, path 2 (mult…
Merge integration/pulumi-engine: the plunge engine tier, path 2 (mult…
lex00 commentedon Oct 25, 2026
Path 2 of the multi-engine engine tier is on main: plunge d6db28a, chant 867a12c65, behold 9f7066ee (merge commits of integration/pulumi-engine, trees identical to the tested tips; path 1 was already on main). Units: P-L1, P-L2, P-L5 closed; P-L0, P-L3, P-L4 ready for the maintainer (see each). Concurrency races C1 to C6 on floci are the maintainer's to run.
lex00 commentedon Oct 27, 2026
Design record update (plunge#37, merged into integration/consolidation-graph at 3cad609): plunge keeps per-resource records holding the full state. Ownership markers bind creates and now also vet deletes. Before any delete,
destroyincluded, the live object must carry this stack's markers. A marker naming another stack, or a missing marker on a type that takes one, refuses the run (ruled 2026-10-26, "refuse, like choudoufu"). Types that carry no marker are record-owned and delete on the record's word. docs/plunge/CONCURRENCY.md, section "Deletes: the marker decides", has the details.