You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Non-urgent maintainability observation from the review. The emulator/ package is large and flat (core, plugins, CFN/Betty, pricing, faults, eventstore, tests in one namespace). Not a current defect, but navigation/ownership cost grows with plugin count.
Options (least invasive first):
Reorganize files into documented functional groups within the package; generate the service registry rather than accumulating registration by hand.
Split the single large E2E test file by behavior (protocol compat, CFN, replay, faults, state isolation, cost).
Only if warranted later: sub-packages (core/, controlplane/, services/<svc>/, cloudformation/, …) — requires the "sub-package needs an issue discussion first" rule per CLAUDE.md.
Discussion issue — no code until a direction is agreed. Part of v0.76.0 (stretch).
emulator/ holds 174 non-test + 115 test .go files, ~136k LOC total, all in package emulator.
Largest units are single-service plugins: ec2_plugin.go (4.3k), dynamodb_plugin.go (3.6k), betty_cfn.go (3.4k), iam_plugin.go (2.6k), s3_plugin.go (2.6k).
Blast radius: moving 174 files into sub-packages would touch nearly every symbol reference and every emulator_test file, produce a huge diff, and risk churn for months of git blame — for a maintainability gain, not a functional one.
When a real pain point appears: split tests before source — e.g. group the largest plugin test files, or split any future large E2E file by behaviour. Tests move with zero API impact.
Defer sub-packages (core/, services/<svc>/, cloudformation/, …) until there's a concrete trigger (a genuine circular-dependency problem, a second consumer needing a subset, or a plugin count that makes the flat dir unworkable). Revisit then with a dedicated migration issue and a codemod, not by hand.
Proposed disposition
Close this as "documented, no structural change now": the naming convention + generated reference + contributor guide address the legibility concern at ~1% of the cost of a package split, and the split can be reopened with a concrete trigger. Leaving it open as a standing "revisit if X" marker is also fine — happy to go either way.
Disposition: keeping this open as a standing "revisit if" marker. No structural change now — the file-naming convention + registry-generated service reference (#364) + contributor guide (#368) address the legibility concern at a fraction of a package-split's cost. Reconsider sub-packages (core/, services/<svc>/, cloudformation/, …) when a concrete trigger appears: a genuine circular-dependency problem, a second consumer needing a subset of the package, or a plugin count that makes the flat directory unworkable. At that point, reopen with a dedicated migration issue and a codemod rather than a hand edit.
Standing-marker check-in, since this issue's whole purpose is to be revisited against a trigger rather than acted on.
The metrics moved but the shape didn't. Since the July assessment (174 non-test / 115 test files, ~136k LOC):
Jul 26
now
non-test .go
174
190
test .go
115
127
total LOC
~136k
~150k
largest
ec2_plugin.go 4.3k
ec2_plugin.go 4.6k
Growth is ~10% over five releases and it is all in the pattern the disposition predicted — new {service}_*.go and *_control.go files, not new cross-cutting ones. The convention absorbed it: v0.81.0's SQS work landed as sqs_control.go + sqs_consistency_test.go, v0.82.0's Fleet work as ec2_fleet.go. Nothing needed to know where to go.
None of the three triggers has fired. No circular-dependency problem (the package is flat, so the class doesn't exist yet). No second consumer needing a subset — the downstream projects filing issues (objectfs, spore-host/spawn, parsl-ephemeral-aws) all consume the server over HTTP, not the Go package, so a package split would buy them nothing. And 190 files is larger but not unworkable, since the naming convention makes the directory listing itself the index.
One weak counter-signal worth recording:ec2_plugin.go is at 4.6k lines and ec2_plugin_test.go at 4.0k, and EC2 keeps attracting work (#387 Fleet, #391 explicit-ID lookups, #412 ImageId validation, #431 open). Fleet went into its own ec2_fleet.go rather than growing the plugin further, which is the test-and-file-level relief the disposition recommends — split files before packages. If EC2 keeps growing, the next step is more ec2_*.go extractions, still with no API impact and no sub-package.
Still leaving this open as the marker. Nothing here changes the recommendation; recording the numbers so the next check-in has a trend rather than a single data point.
Milestone removed (was v0.77.0), and that milestone is now closed. No status change — this remains the standing "revisit if" marker its disposition made it.
Why the milestone went: v0.77.0 is a phantom version. No such tag was ever cut (tags went v0.76.0 → v0.80.0), its closed issues actually shipped in v0.80.0 and v0.82.0, and per the release rules in CLAUDE.md a version must be strictly greater than the latest tag — so a v0.77.0 release can never exist to carry this. Holding the issue against it implied a target that cannot arrive. Unattached is the honest state for a trigger-driven issue, and nothing about the analysis below changes.
Standing-marker check-in
Measured on main at v0.95.0:
Jul 26
Aug 1
now (Aug 9)
non-test .go
174
190
216
test .go
115
127
178
total LOC
~136k
~150k
~200k
largest
ec2_plugin.go 4.3k
ec2_plugin.go 4.6k
cfn_deployer.go 5.6k
Growth accelerated — ~33% LOC in eight days, faster than the ~10%-over-five-releases the last check-in recorded. The shape still holds, but one number changed character.
ec2_plugin.go is no longer the largest file; cfn_deployer.go is, at 5.6k. That matters more than the raw count, because the two are different kinds of large. ec2_plugin.go is a service plugin, which is exactly the unit the naming convention is built around — it grows by adding operations that belong together, and a reader looking for EC2 behaviour knows where to go. cfn_deployer.go is cross-cutting: it dispatches to every service's resources, and the CFN work of the last few releases (#560 physical names, #581 instance-profile deletion, #501 events) all landed against it or beside it. The disposition's stated trigger is "a genuine circular-dependency problem, a second consumer needing a subset, or a plugin count that makes the flat directory unworkable." A single cross-cutting file becoming the largest unit is not on that list, but it is closer to the spirit of it than another plugin growing would be.
Not proposing action. Two observations for whoever revisits:
CFN is already de-facto grouped — cfn_deployer.go, cfn_rollback.go, cfn_events.go, cfn_resources_v*.go, cloudformation_plugin.go. The convention absorbed CloudFormation: DescribeStackEvents has no backing event model #501's new file (cfn_events.go) with no ambiguity about where it went, which is the convention working as designed. If a first split is ever taken, this cluster is the obvious candidate precisely because its boundary is already visible in the filenames.
Left unmilestoned deliberately in the roadmap pass that assigned the other 84 open issues to v0.121.0–v0.127.0.
This issue is the design discussion itself, not a deliverable: CLAUDE.md requires that the sub-package question be settled in an issue before any package is added, and this is that issue. Giving it a release slot would commit a version to an outcome that has not been chosen yet — flat-with-file-grouping, an E2E split, and real sub-packages are three different amounts of work.
It gets a milestone once a direction is agreed here. Nothing in v0.121.0–v0.127.0 depends on it; those releases are all behavioural fidelity within the existing layout.
Re-triaged 2026-11-14 and left without a milestone, by decision. This is still the sub-package design discussion that CLAUDE.md requires before any package is added. Nothing scheduled depends on it.
For when it's picked up, the size today: 68 plugins, 1,098 routed operations, all in emulator/. docs/contributing.md now lists each per-plugin bookkeeping table a new plugin touches, so the cost of the flat layout is easy to see.
Activity
scttfrdmn commentedon Jul 26, 2026
Grounding (current state)
emulator/holds 174 non-test + 115 test.gofiles, ~136k LOC total, all inpackage emulator.ec2_plugin.go(4.3k),dynamodb_plugin.go(3.6k),betty_cfn.go(3.4k),iam_plugin.go(2.6k),s3_plugin.go(2.6k).test/e2e/e2e_test.gois only 324 lines, and examples: add end-to-end journeys (Terraform, CDK, pytest, throttling, replay, cost gate, time-travel) #367 already split new coverage into separatejourney_*_test.gofiles.Assessment
The flat package is a navigability/ownership cost, not a correctness problem. Two forces argue against an aggressive split right now:
package emulator.emulator_testfile, produce a huge diff, and risk churn for months ofgit blame— for a maintainability gain, not a functional one.Recommendation (least-invasive first)
{service}_plugin.go+{service}_plugin_test.go,betty_*.gofor CFN,*_control.gofor seed endpoints). Document it in the contributor guide (added in docs: contributor guide (how to add a service plugin) + compatibility/fidelity policy #368) so the flat layout stays legible. Thegen-service-referencegenerator (docs: generate service reference (and counts) from the plugin registry + CI drift guard #364) already removes the biggest ownership hazard — undocumented drift.core/,services/<svc>/,cloudformation/, …) until there's a concrete trigger (a genuine circular-dependency problem, a second consumer needing a subset, or a plugin count that makes the flat dir unworkable). Revisit then with a dedicated migration issue and a codemod, not by hand.Proposed disposition
Close this as "documented, no structural change now": the naming convention + generated reference + contributor guide address the legibility concern at ~1% of the cost of a package split, and the split can be reopened with a concrete trigger. Leaving it open as a standing "revisit if X" marker is also fine — happy to go either way.
scttfrdmn commentedon Jul 26, 2026
Disposition: keeping this open as a standing "revisit if" marker. No structural change now — the file-naming convention + registry-generated service reference (#364) + contributor guide (#368) address the legibility concern at a fraction of a package-split's cost. Reconsider sub-packages (
core/,services/<svc>/,cloudformation/, …) when a concrete trigger appears: a genuine circular-dependency problem, a second consumer needing a subset of the package, or a plugin count that makes the flat directory unworkable. At that point, reopen with a dedicated migration issue and a codemod rather than a hand edit.scttfrdmn commentedon Aug 1, 2026
Standing-marker check-in, since this issue's whole purpose is to be revisited against a trigger rather than acted on.
The metrics moved but the shape didn't. Since the July assessment (174 non-test / 115 test files, ~136k LOC):
.go.goec2_plugin.go4.3kec2_plugin.go4.6kGrowth is ~10% over five releases and it is all in the pattern the disposition predicted — new
{service}_*.goand*_control.gofiles, not new cross-cutting ones. The convention absorbed it: v0.81.0's SQS work landed assqs_control.go+sqs_consistency_test.go, v0.82.0's Fleet work asec2_fleet.go. Nothing needed to know where to go.None of the three triggers has fired. No circular-dependency problem (the package is flat, so the class doesn't exist yet). No second consumer needing a subset — the downstream projects filing issues (
objectfs,spore-host/spawn,parsl-ephemeral-aws) all consume the server over HTTP, not the Go package, so a package split would buy them nothing. And 190 files is larger but not unworkable, since the naming convention makes the directory listing itself the index.One weak counter-signal worth recording:
ec2_plugin.gois at 4.6k lines andec2_plugin_test.goat 4.0k, and EC2 keeps attracting work (#387 Fleet, #391 explicit-ID lookups, #412 ImageId validation, #431 open). Fleet went into its ownec2_fleet.gorather than growing the plugin further, which is the test-and-file-level relief the disposition recommends — split files before packages. If EC2 keeps growing, the next step is moreec2_*.goextractions, still with no API impact and no sub-package.Still leaving this open as the marker. Nothing here changes the recommendation; recording the numbers so the next check-in has a trend rather than a single data point.
scttfrdmn commentedon Aug 9, 2026
Milestone removed (was
v0.77.0), and that milestone is now closed. No status change — this remains the standing "revisit if" marker its disposition made it.Why the milestone went:
v0.77.0is a phantom version. No such tag was ever cut (tags went v0.76.0 → v0.80.0), its closed issues actually shipped in v0.80.0 and v0.82.0, and per the release rules inCLAUDE.mda version must be strictly greater than the latest tag — so av0.77.0release can never exist to carry this. Holding the issue against it implied a target that cannot arrive. Unattached is the honest state for a trigger-driven issue, and nothing about the analysis below changes.Standing-marker check-in
Measured on
mainat v0.95.0:.go.goec2_plugin.go4.3kec2_plugin.go4.6kcfn_deployer.go5.6kGrowth accelerated — ~33% LOC in eight days, faster than the ~10%-over-five-releases the last check-in recorded. The shape still holds, but one number changed character.
ec2_plugin.gois no longer the largest file;cfn_deployer.gois, at 5.6k. That matters more than the raw count, because the two are different kinds of large.ec2_plugin.gois a service plugin, which is exactly the unit the naming convention is built around — it grows by adding operations that belong together, and a reader looking for EC2 behaviour knows where to go.cfn_deployer.gois cross-cutting: it dispatches to every service's resources, and the CFN work of the last few releases (#560 physical names, #581 instance-profile deletion, #501 events) all landed against it or beside it. The disposition's stated trigger is "a genuine circular-dependency problem, a second consumer needing a subset, or a plugin count that makes the flat directory unworkable." A single cross-cutting file becoming the largest unit is not on that list, but it is closer to the spirit of it than another plugin growing would be.Not proposing action. Two observations for whoever revisits:
cfn_deployer.go,cfn_rollback.go,cfn_events.go,cfn_resources_v*.go,cloudformation_plugin.go. The convention absorbed CloudFormation: DescribeStackEvents has no backing event model #501's new file (cfn_events.go) with no ambiguity about where it went, which is the convention working as designed. If a first split is ever taken, this cluster is the obvious candidate precisely because its boundary is already visible in the filenames.betty_*.gofiles named in the July grounding are gone, renamed tocfn_*in refactor: remove the Betty naming, which refers to an unrelated project #549/v0.90.0. So one item in the original assessment has resolved itself, and the CFN cluster reads as a cluster now rather than as an unrelated prefix.scttfrdmn commentedon Sep 20, 2026
Left unmilestoned deliberately in the roadmap pass that assigned the other 84 open issues to v0.121.0–v0.127.0.
This issue is the design discussion itself, not a deliverable:
CLAUDE.mdrequires that the sub-package question be settled in an issue before any package is added, and this is that issue. Giving it a release slot would commit a version to an outcome that has not been chosen yet — flat-with-file-grouping, an E2E split, and real sub-packages are three different amounts of work.It gets a milestone once a direction is agreed here. Nothing in v0.121.0–v0.127.0 depends on it; those releases are all behavioural fidelity within the existing layout.
scttfrdmn commentedon Nov 15, 2026
Re-triaged 2026-11-14 and left without a milestone, by decision. This is still the sub-package design discussion that
CLAUDE.mdrequires before any package is added. Nothing scheduled depends on it.For when it's picked up, the size today: 68 plugins, 1,098 routed operations, all in
emulator/.docs/contributing.mdnow lists each per-plugin bookkeeping table a new plugin touches, so the cost of the flat layout is easy to see.