Skip to content

feat(cloudformation): close 82-op conformance gap#707

Merged
vieiralucas merged 4 commits intomainfrom
worktree-worktree-cfn-82ops
Apr 23, 2026
Merged

feat(cloudformation): close 82-op conformance gap#707
vieiralucas merged 4 commits intomainfrom
worktree-worktree-cfn-82ops

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 23, 2026

Summary

  • Implement 82 missing CloudFormation operations: change sets, stack sets/instances/refactors, types, generated templates, resource scans, drift detection, hooks, exports, imports, stack policies, termination protection, validation, organizations access, and various utility ops.
  • Add generic per-account extras store to CloudFormationState so the new categories persist across requests.
  • Wire dispatch + supported_actions to cover the full 90-op surface.
  • Pin all 82 ops to a raw-POST closure conformance test that asserts each route returns success.

Test plan

  • cargo test -p fakecloud-conformance --test cloudformation (7 passing)
  • cargo run -p fakecloud-conformance -- audit (PASS, 1269/1269)
  • cargo clippy --workspace --all-targets -- -D warnings (clean)

Summary by cubic

Closes the CloudFormation conformance gap by adding 82 missing operations and returning real XML with stable IDs, taking CloudFormation to 3420/3420 passed variants and the overall audit to 51193/59954. Dispatch and supported_actions now expose a 90‑op surface.

  • New Features

    • Added 82 CFN ops: change sets, stack sets/instances, types/extensions, generated templates, resource scans, drift detection, hooks, exports/imports, stack policies, termination protection, validation/utilities.
    • Introduced per-account extras store on CloudFormationState to persist new categories across requests.
    • Added a closure conformance test in fakecloud-conformance that exercises all 82 routes (pinned to checksums) and unit tests in fakecloud-cloudformation that sweep all extras handlers.
  • Bug Fixes

    • rand_id now appends an atomic counter to prevent same‑nanosecond collisions from overwriting extras entries.
    • Snapshot writes now run only for ops that mutate state; pass‑through ops that return canned IDs no longer trigger saves.

Written for commit 6b22294. Summary will update on new commits.

- Implement change sets, stack sets, stack instances, refactors, types,
  generated templates, resource scans, drift detection, hooks, exports,
  imports, stack policies, termination protection, and validation ops.
- Persist new state via per-account extras store on CloudFormationState.
- Wire dispatch + supported_actions for the 90-op surface.
- Cover all 82 new ops with a raw-POST closure conformance test pinned
  to checksums.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 84.72012% with 101 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/fakecloud-cloudformation/src/service.rs 1.16% 85 Missing ⚠️
crates/fakecloud-cloudformation/src/extras.rs 97.16% 16 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="crates/fakecloud-cloudformation/src/extras.rs">

<violation number="1" location="crates/fakecloud-cloudformation/src/extras.rs:24">
P2: Timestamp-based ID generation can collide under concurrent/fast requests, causing resource entries to overwrite each other.</violation>
</file>

<file name="crates/fakecloud-cloudformation/src/service.rs">

<violation number="1" location="crates/fakecloud-cloudformation/src/service.rs:705">
P2: The new `mutates` list includes several read/no-op actions, so successful requests trigger unnecessary snapshot writes even when no state changed.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread crates/fakecloud-cloudformation/src/extras.rs
Comment thread crates/fakecloud-cloudformation/src/service.rs Outdated
- rand_id: append atomic counter so concurrent same-nanos requests
  don't collide and overwrite extras entries
- mutates: only trigger snapshot writes for ops whose handlers
  actually modify state; pass-through ops that return canned IDs
  no longer cause unnecessary snapshot writes
Sweeps each new op via handle_extra_action with the minimum required
params and asserts 2xx. Lifts codecov/patch coverage on extras.rs.
…orktree-cfn-82ops

# Conflicts:
#	conformance-baseline.json
@vieiralucas vieiralucas merged commit fe0c64e into main Apr 23, 2026
48 checks passed
@vieiralucas vieiralucas deleted the worktree-worktree-cfn-82ops branch April 23, 2026 07:52
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