Skip to content

Remove billing period fields from Workspace#42

Merged
BrewingCoder merged 8 commits intomainfrom
issue-30-remove-billing-periods
Mar 20, 2026
Merged

Remove billing period fields from Workspace#42
BrewingCoder merged 8 commits intomainfrom
issue-30-remove-billing-periods

Conversation

@BrewingCoder
Copy link
Owner

Summary

  • Removes BillingPeriodStart, BillingPeriodEnd, NextInvoiceDate from Workspace model
  • Removes billing_period_end and next_invoice_date from GraphQL Workspace type
  • Simplifies getWorkspaceMeterImpl in pricing.go — always uses current calendar month (no billing period logic)
  • Simplifies subscription interval detection — always monthly (no annual billing detection)
  • Updates test fixtures in worker_test.go and public-graph/resolver_test.go
  • Regenerated GraphQL code via gqlgen
  • Adds 5 test functions (30+ subtests) for pricing package: RetentionMultiplier, ProductToBasePriceCents, TypeToMemberLimit, MustUpgradeForClearbit, Worker no-ops

Closes #30

Test plan

  • go build ./... passes
  • go test ./model/ — 206 tests pass
  • go test ./pricing/ — all tests pass (including 30+ new subtests)
  • gofmt clean
  • CI: backend build + lint + test
  • CI: SonarQube + CodeQL

🤖 Agentic: submitted autonomously by Claude Code agent

🤖 Generated with Claude Code

BrewingCoder and others added 4 commits March 19, 2026 19:10
Dead SaaS billing code — HoldFast has no billing periods.
Removes BillingPeriodStart, BillingPeriodEnd, NextInvoiceDate from
Workspace model, resolver field mappings, and GraphQL schema.

Simplifies getWorkspaceMeterImpl in pricing.go to always use
current calendar month boundaries (the else-branch that was
already the fallback). Removes billing period fields from test
fixtures in worker_test.go and public-graph/resolver_test.go.

Adds 5 unit test functions (30+ subtests) for pricing package:
RetentionMultiplier, ProductToBasePriceCents, TypeToMemberLimit,
MustUpgradeForClearbit, Worker no-ops.

Regenerated GraphQL code via gqlgen.

Closes #30

🤖 Agentic: submitted by Claude Code agent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The merge took main's schema which re-added billing_period_end and
next_invoice_date. Removed them again and regenerated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BrewingCoder
Copy link
Owner Author

Closing: needs rebase on top of gqlgen v0.17.88 upgrade (#51). Old generated code causes SIGBUS crashes.

BrewingCoder and others added 2 commits March 20, 2026 14:02
@BrewingCoder BrewingCoder reopened this Mar 20, 2026
BrewingCoder and others added 2 commits March 20, 2026 14:13
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remediation for Go compiler crashes on 88K-line generated file:
- Runner-2 disabled (single runner only)
- Go build cache cleaned on runner
- Go 1.25 already in go.mod (from gqlgen upgrade merge)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BrewingCoder BrewingCoder merged commit 529c2c7 into main Mar 20, 2026
10 checks passed
@BrewingCoder BrewingCoder deleted the issue-30-remove-billing-periods branch March 20, 2026 18:54
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.

Remove Workspace billing period fields

1 participant