Skip to content

Conversation

@SirTenzin
Copy link
Member

@SirTenzin SirTenzin commented Feb 3, 2026

money moves


Summary by cubic

Shipped atmn v2.1 with a full src migration, new headless customers/products/features/events (list + aggregate), a plan preview UI, global --config, faster/safer push analysis, parallel sandbox nuke (with non‑TTY fallback and a skip‑prompts flag), logout, and disabled the transform layer to align the SDK with upcoming API v2.1.

  • Refactors

    • Removed source/; public compose entrypoint now in src; Bun builds src/cli and src/compose; package.json main/bin updated; dev watcher targets src.
    • Added customers, products, features, and events commands with headless modes (text/json/csv); events supports list and aggregate; new events endpoints and an aggregate test; introduced headless controllers.
    • Preview command renders plan pricing/features from autumn.config.ts; resolveConfigPath applied across pull/push/preview; dotenv precedence is process.env → .env.local → .env and is monorepo‑aware; preview UI adds a titled box.
    • Nuke rewritten with sandbox‑only guard, customer limits, and parallel batching (including plans); legacy non‑TTY nuke; new --dangerously-skip-all-confirmation-prompts still enforces sandbox validation.
    • Synced CLI/package versions; updated init copy; added logout; added ervy for aggregate charts and an atmn-tests workspace; added useCreateSkills and updated SKILLS examples (.agents/skills).
    • Optimized push analyze step using Map lookups; compose schema adds entity_feature_id; updated DSL/templates to match API v2.1 shapes (plan.features → items, granted_balance → included, usage_model → billing_method); disabled API transform layer and updated API type imports.
  • Bug Fixes

    • Made price interval optional in plan feature handling.
    • Fixed CLI copy to reference “atmn login” and a headless exit bug.
    • Centralized env resolution, avoided unnecessary .env rewrites, deduped removed keys, and preserved trailing newline to prevent org mismatches.
    • Push: correctly detects zero‑diff by normalizing remote→SDK and comparing actual content.
    • Push: hardened plan versioning—strips not‑yet‑created features and handles feature_not_found without 404s during analysis.
    • Preview: enforce mutual exclusivity between price amount and tiered pricing; fixed unarchive behavior for plans/features.

Written for commit 2719f5b. Summary will update on new commits.

@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
autumn-ui Error Error Feb 11, 2026 7:59pm

Request Review

@greptile-apps
Copy link

greptile-apps bot commented Feb 3, 2026

Too many files changed for review. (189 files found, 100 file limit)

Copy link

@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.

3 issues found across 189 files

Confidence score: 3/5

  • Type/schema mismatches in atmn/src/compose/models/planModels.ts (e.g., usage_model vs billing_method) can cause validated data to diverge from TypeScript expectations at runtime.
  • Plan type definitions include auto_enable but omit default, and PlanFeature uses included instead of granted_balance, which risks incorrect typing of validated plan data.
  • These are concrete consistency issues that could surface as validation or runtime data handling bugs, so the change carries some user-impacting risk.
  • Pay close attention to atmn/src/compose/models/planModels.ts - align Plan/PlanFeature types with the Zod schema.

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="atmn/src/compose/models/planModels.ts">

<violation number="1" location="atmn/src/compose/models/planModels.ts:119">
P2: Plan feature pricing types don’t match the Zod schema (`usage_model: "pay_per_use"` vs `billing_method: "usage_based"`), so runtime validation and TypeScript expectations can diverge.</violation>

<violation number="2" location="atmn/src/compose/models/planModels.ts:157">
P2: PlanFeature type exposes `included` but the schema validates `granted_balance`, causing a schema/type mismatch for included usage.</violation>

<violation number="3" location="atmn/src/compose/models/planModels.ts:266">
P2: Plan type diverges from PlanSchema: it defines `auto_enable` (not validated) and omits `default` (validated), which can cause incorrect typing for validated plan data.</violation>
</file>

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

add_on?: boolean;

/** Whether to automatically enable this plan for new customers */
auto_enable?: boolean;
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 3, 2026

Choose a reason for hiding this comment

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

P2: Plan type diverges from PlanSchema: it defines auto_enable (not validated) and omits default (validated), which can cause incorrect typing for validated plan data.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At atmn/src/compose/models/planModels.ts, line 266:

<comment>Plan type diverges from PlanSchema: it defines `auto_enable` (not validated) and omits `default` (validated), which can cause incorrect typing for validated plan data.</comment>

<file context>
@@ -0,0 +1,282 @@
+	add_on?: boolean;
+
+	/** Whether to automatically enable this plan for new customers */
+	auto_enable?: boolean;
+
+	/** Base price for the plan */
</file context>
Fix with Cubic

Copy link
Member Author

Choose a reason for hiding this comment

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

stupid clanker

Copy link

Choose a reason for hiding this comment

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

Thanks for the feedback. If there's a specific issue with the comment, please share details so I can improve future reviews.

Copy link

@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.

1 issue found across 41 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="atmn/src/views/react/products/components/ProductSheet.tsx">

<violation number="1" location="atmn/src/views/react/products/components/ProductSheet.tsx:177">
P2: Guard the usage price interval display; feature.price can be valid without price.interval (e.g., when a top-level reset is used), which renders "/undefined" in the UI.</violation>
</file>

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

{feature.price.amount !== undefined
? `$${(feature.price.amount / 100).toFixed(2)}`
: "Tiered"}
/{feature.price.interval}
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 3, 2026

Choose a reason for hiding this comment

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

P2: Guard the usage price interval display; feature.price can be valid without price.interval (e.g., when a top-level reset is used), which renders "/undefined" in the UI.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At atmn/src/views/react/products/components/ProductSheet.tsx, line 177:

<comment>Guard the usage price interval display; feature.price can be valid without price.interval (e.g., when a top-level reset is used), which renders "/undefined" in the UI.</comment>

<file context>
@@ -0,0 +1,209 @@
+										{feature.price.amount !== undefined
+											? `$${(feature.price.amount / 100).toFixed(2)}`
+											: "Tiered"}
+										/{feature.price.interval}
+									</Text>
+								</Text>
</file context>
Fix with Cubic

@kylegrahammatzen
Copy link

switch "atmn auth" to "atmn login" @SirTenzin

SirTenzin and others added 3 commits February 8, 2026 08:53
Only write .env when keys are actually removed, preserve trailing newline,
and use a Set to prevent duplicate key names in output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When local config matches remote (0 diff), push was still sending changes
because featuresToUpdate and plansToUpdate included ALL items that existed
both locally and remotely, regardless of whether values actually differed.

Now featuresToUpdate and plansToUpdate only include items where the content
actually differs. Before comparing, remote API data is transformed to SDK
format and both sides are normalized (stripping default values) to account
for field name mappings: default↔auto_enable, granted_balance↔included,
usage_model↔billing_method, etc.

This allows the "no changes to push" state to correctly appear when configs
match, even if they contain optional fields that come down from the API.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
SirTenzin and others added 2 commits February 8, 2026 09:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add logout command to remove API keys
SirTenzin and others added 6 commits February 8, 2026 10:19
When a plan references a feature that hasn't been created yet,
the getPlanHasCustomers API call would 404. Since features are
always pushed before plans, this resolves itself during the actual
push — just catch and skip during analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of catching and silencing the feature_not_found error,
strip plan features that reference not-yet-created features before
sending to the has_customers API. Features that don't exist upstream
can't affect versioning — the check still runs properly for all
existing features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a plan references a not-yet-created feature, the has_customers
API 404s. Catch that specific error and default willVersion to true —
adding a new feature to a plan with customers can trigger versioning,
so we must still show the prompt. All other errors still throw.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mmand

Allows skipping all confirmation prompts when using the nuke command by passing --dangerously-skip-all-confirmation-prompts. This bypasses the interactive Ink UI and uses the legacy nuke implementation with automatic prompt skipping. Useful for automation and scripting where prompts cannot be interactively confirmed. Sandbox validation is always enforced regardless of the flag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace .find() inside .filter() (O(N²)) with pre-indexed Maps
keyed by id for constant-time lookups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: detect zero-diff changes in push command
Add --dangerously-skip-all-confirmation-prompts flag to nuke
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.

2 participants