Commit Graph
109 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 81f291b81e fix(telemetry): db.system on SQL spans for SigNoz's service map
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 25m2s
ci / image (pull_request) Skipped
The service map draws database nodes from the pre-1.26 db.system key
(dependency_graph_minutes_db_calls_mv_v2); the spans set only
db.system.name, so the registry's Postgres never appeared on the map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-29 10:54:35 +01:00
sharang 7d3e4a656d Merge pull request 'feat(telemetry): traces to SigNoz for requests, outbound calls and SQL' (#102) from feat/otel-tracing into main
ci / shared (push) Successful in 12s
ci / test (push) Successful in 24m58s
ci / image (push) Successful in 38s
2026-10-28 22:10:25 +00:00
Sharang ParnerkarandClaude Opus 5.5 2aa9d8022d test(telemetry): errcheck and Value.String for golangci-lint
ci / shared (pull_request) Successful in 14s
ci / test (pull_request) Successful in 27m1s
ci / image (pull_request) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-28 22:43:00 +01:00
Sharang ParnerkarandClaude Opus 5.5 2f3749d1c0 fix(deps): otel 1.47.0 and grpc 1.83.2 for trivy
ci / test (pull_request) Failing after 15m21s
ci / image (pull_request) Skipped
ci / shared (pull_request) Successful in 12s
trivy on the PR: otel/sdk v1.41.0 CVE-2026-39883 (fixed 1.43.0); grpc
v1.79.1 CVE-2026-33186 (critical), CVE-2026-84304, CVE-2026-84445 and
GHSA-hrxh-6v49-42gf (fixed by 1.83.2). jsonpointer 1.0.0 comes with the
otel bump; kin-openapi (contract test only) passes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-28 22:25:49 +01:00
Sharang ParnerkarandClaude Opus 5.5 65ad1b52f6 feat(telemetry): traces to SigNoz for requests, outbound calls and SQL
ci / shared (pull_request) Failing after 12s
ci / test (pull_request) Failing after 15m24s
ci / image (pull_request) Skipped
internal/telemetry: OTLP/HTTP tracer provider from the OTEL_* env
(already set on stage and prod; unset = off), W3C propagation, one server
span per request named after the ServeMux pattern, client spans on the
default transport (Keycloak, ERP, LiteLLM, OIDC) and a pgx QueryTracer.
Client and DB spans only inside a request, so the background loops add
no traces. No raw paths, query strings, bodies, SQL parameters or client
addresses in spans; outbound spans carry the host only.

slog lines logged with a request context get trace_id/span_id; the
access log names the route instead of the raw path (slugs are names).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-28 22:24:34 +01:00
sharangandClaude Opus 5.5 5fff4dd581 fix(roles): first releases are management's; external-only decides nothing (#101)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 24m30s
ci / image (push) Successful in 38s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-28 16:13:09 +00:00
sharangandClaude Opus 5.5 cb173104b6 fix(roles): check the right to save before the revision (#100)
ci / shared (push) Successful in 15s
ci / test (push) Successful in 26m43s
ci / image (push) Successful in 33s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-28 12:00:46 +00:00
sharang 0f536fc955 Merge pull request 'fix(erpsetup): quote overage price, portal doc basis, USt-IdNr. glyph' (#99) from fix/erpsetup-quote-terms-overage into main
ci / shared (push) Successful in 12s
ci / test (push) Successful in 26m36s
ci / image (push) Successful in 37s
2026-10-28 08:40:06 +00:00
Sharang ParnerkarandClaude Opus 5.5 b96f319380 fix(erpsetup): quote overage price, portal doc basis, USt-IdNr. glyph
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 24m54s
ci / image (pull_request) Skipped
- Mehrverbrauch: only on quotes with Prüfwerk, priced from the
  CRA-CSA-CLD-SCAN Item Price (falls back to the price list).
- Vertragsgrundlagen default no longer cites a missing Anlage: documents
  on request beforehand, in the customer portal after signing.
- USt-IdNr.: NimbusSans sets "Nr." as one № glyph; a ZWNJ keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-28 09:33:25 +01:00
sharang 04e52efe0f Merge pull request 'erpsetup: top room for the Vertragsbedingungen block on page 2' (#97) from fix/erpsetup-quotation-page2-top into main
ci / shared (push) Successful in 13s
ci / test (push) Successful in 24m36s
ci / image (push) Successful in 39s
2026-10-28 08:26:55 +00:00
Sharang ParnerkarandClaude Opus 5.5 212b1b30d0 fix(erpsetup): top room for the Vertragsbedingungen block on page 2
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 24m38s
ci / image (pull_request) Skipped
With page-break-inside: avoid (#96) the block moves whole to page 2, which
has no letter head, so it sat flush against the top edge. Give the wrapper
28px top padding. Padding rather than margin: wkhtmltopdf drops a margin at
a page break. When the block fits on page 1 it only widens the gap after
the totals a little.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-28 09:22:09 +01:00
sharang 950e81c43e Merge pull request 'fix(deps): bump go-jose to v4.1.6 (CVE-2026-116587)' (#98) from fix/deps-go-jose-4.1.6 into main
ci / shared (push) Successful in 16s
ci / test (push) Successful in 26m55s
ci / image (push) Successful in 50s
2026-10-28 08:22:01 +00:00
Sharang ParnerkarandClaude Opus 5.5 39eaa30e17 fix(deps): bump go-jose to v4.1.6 (CVE-2026-116587)
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 24m47s
ci / image (pull_request) Skipped
trivy fails the shared job on every PR and push to main: go-jose v4.1.4
has a DoS when parsing JWKs that contain RSA keys (fixed in 4.1.6). Used
by the licence signer and the authn JWKS path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-28 09:13:40 +01:00
sharang 07213016d7 Merge pull request 'erpsetup: state the permanent discount when it is a negative line' (#96) from fix/erpsetup-quotation-discount-sentence into main
ci / shared (push) Failing after 12s
ci / test (push) Successful in 24m34s
ci / image (push) Skipped
2026-10-28 07:17:56 +00:00
Sharang ParnerkarandClaude Opus 5.5 01a1b5b8fd fix(erpsetup): state the permanent discount when it is a negative line
ci / test (pull_request) Successful in 24m42s
ci / image (pull_request) Skipped
ci / shared (pull_request) Successful in 14s
The Vertragsbedingungen block (#95) only stated the permanent discount for a
document-level discount (total - net_total). The K-00001 Pilotrabatt is a
negative line item, by design, because eu_einvoice cannot carry a
document-level discount, so the sentence never rendered and the Rabattdauer
(one of the reviewer's required terms) was missing from the PDF.

Count negative lines (rate < 0) as well, and say the discount is already
contained in the stated net amount. Keep the block on one page
(page-break-inside: avoid); it split across pages 1-2.

Rendered against mocks: line-item discount, document-level discount and no
discount all produce the expected text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-27 17:12:15 +01:00
sharang d14f381164 Merge pull request 'erpsetup: Vertragsbedingungen block on the Quotation print format' (#95) from feat/erpsetup-quotation-vertragsbedingungen into main
ci / shared (push) Successful in 11s
ci / test (push) Successful in 24m45s
ci / image (push) Successful in 39s
2026-10-27 14:32:53 +00:00
Sharang ParnerkarandClaude Opus 4.8 276670d0eb feat(erpsetup): Vertragsbedingungen block on the Quotation print format
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 24m47s
ci / image (pull_request) Skipped
Angebot review (§3/§5/§6): the Quotation PDF lacked the contractual terms a
B2B-SaaS offer needs. Add a Quotation-GUARDED Vertragsbedingungen block to the
shared documentHTML (Vertragsart, Vertragsbeginn, Laufzeit/Kündigung, Abrechnung,
monatliche Vergütung + Rabattdauer, Mehrverbrauch, Vertragsgrundlagen, Annahme),
the 14-day SEPA Vorabinformation on the non-invoice Zahlungsart line, and a
"Monatlicher Gesamtbetrag" label so the recurring nature is unambiguous (the
"1 Monat" misread). Every new block is doc.doctype == "Quotation" (or the
not-is_inv branch), so the GoBD Sales Invoices are untouched.

Terms per the owner's decisions 2026-10-27: no minimum term (monthly cancellable,
1 month to month-end), permanent discount incl. renewals, SEPA-Lastschrift 21
days, per-Prüfung overage. Vertragsgrundlagen renders a placeholder until the
SaaS-AGB/SLA/AVV/TOMs land in the portal document store. Structured per-field
Custom Fields are a documented follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-27 10:29:19 +01:00
sharangandClaude Opus 5.5 4dd1179ca4 fix: the CXO sign-in role makes the first role dataset entry (#94)
ci / shared (push) Successful in 12s
ci / test (push) Successful in 24m35s
ci / image (push) Successful in 41s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-26 22:48:21 +00:00
sharangandClaude Opus 5.5 1b9e2f1183 feat: role and authority dataset (R1 S0) (#93)
ci / shared (push) Successful in 12s
ci / test (push) Successful in 24m37s
ci / image (push) Successful in 44s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-26 21:18:57 +00:00
sharangandClaude Opus 5.5 9129e95538 fix: portal user headers only from the portal's service client (#91)
ci / shared (push) Failing after 4s
ci / test (push) Successful in 24m31s
ci / image (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-26 20:39:03 +00:00
sharangandClaude Opus 5.5 208f3d4c7e fix(docker): Drop the compromised eMudhra root from the image (#90)
ci / shared (push) Successful in 15s
ci / image (push) Successful in 44s
ci / test (push) Successful in 26m25s
Build stage upgrades Alpine ca-certificates(-bundle), fails if emSign ECC Root CA - G3 is still in the bundle and requires Go >= 1.26.10 (CVE-2026-111943); the distroless image gets that clean bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:00:21 +00:00
sharangandClaude Opus 5.5 ad4fe8f3fd feat(store): Unterlagen merge into the document store (#89)
ci / shared (push) Successful in 14s
ci / test (push) Successful in 26m6s
ci / image (push) Successful in 38s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 18:04:53 +00:00
sharangandClaude Opus 5.5 2a0a274108 feat(store): Dokumentenablage with areas, checked serving, import (#88)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 25m46s
ci / image (push) Successful in 51s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:38:10 +00:00
sharangandClaude Opus 5.5 6a640d553f feat(erpsetup): Reisekosten expense claim types with SKR04 accounts (#87)
ci / shared (push) Successful in 13s
ci / image (push) Successful in 37s
ci / test (push) Successful in 25m57s
The 22 Expense Claim Types of the Reisekosten app, each with its standard SKR04 Arbeitnehmer account for Breakpilot GmbH (decided 2026-10-20), and breakpilot_report_id (unique) on Expense Claim as the relay's idempotency key. Backlog #39 (a)+(b).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.8
2026-10-20 11:07:48 +00:00
sharangandClaude Opus 5.5 174a2f1e01 feat(company-profile): Unternehmensprofil per tenant, registry as the authority (#85)
ci / shared (push) Successful in 14s
ci / test (push) Successful in 25m47s
ci / image (push) Successful in 37s
Migration 0021 (company_profiles + company_profile_revisions), GET/PUT /v1/tenants/{id}/company-profile, POST …/submit with optimistic revisions (409 + current revision; unchanged saves are no new revision), staff import via /v1/admin/tenants/{id}/company-profile (named staff member only), outline validation of the form document, audit without answers, OpenAPI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 10:30:09 +00:00
sharangandClaude Opus 5.5 f024a4042d fix(erpsetup): deliveries of goods to EU businesses are K, not AE (#86)
ci / shared (push) Successful in 15s
ci / test (push) Successful in 25m38s
ci / image (push) Successful in 37s
Lieferung an Unternehmen in der EU is an intra-community supply: tax category K with VATEX vatex-eu-ic; Sonstige Leistung an Unternehmen in der EU (services) stays AE. Found in the live dry run of 2026-10-20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 10:25:58 +00:00
sharangandClaude Opus 5.5 c3bb7702dc feat(erpsetup): outgoing e-invoices, payment by transfer, discount line (#84)
ci / shared (push) Successful in 17s
ci / test (push) Successful in 25m36s
ci / image (push) Successful in 36s
Code lists and mappings for eu_einvoice (units, payment means 58/59, AE/G tax categories with VATEX), Mode of Payment Überweisung on the company bank account and terms Überweisung 21 Tage, item RABATT for discount lines (SKR04 4700, Verwaltung), E Invoice Settings (warn on save, block on submit), default profile EN 16931 for new customers, transfer text on offers/orders and a mandate check in the invoice mail. Backlog #16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 09:32:05 +00:00
sharangandClaude Opus 5.5 8600c92e96 fix(invoiceintake): ToDos assigned by the intake user; forwarded invoices entered by hand (#83)
ci / shared (push) Successful in 14s
ci / test (push) Successful in 25m36s
ci / image (push) Successful in 36s
Frappe 15.112 lets a user without System Manager create a ToDo only when it is assigned to or by that user, so the service sets assigned_by to its own user (asked once via frappe.auth.get_logged_user). Mails from our own domain or a freemail address no supplier has were forwarded by a person: their ToDo says to enter the invoice by hand instead of suggesting a retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 09:01:45 +00:00
sharangandClaude Opus 5.5 cee669d2bd feat(invoiceintake): invoice@ mails become draft Eingangsrechnungen (#82)
ci / shared (push) Successful in 14s
ci / test (push) Successful in 25m31s
ci / image (push) Successful in 46s
Reads the mails of ERPNext's Email Account Eingangsrechnung via the API: e-invoices become E Invoice Import drafts, other PDFs draft Purchase Invoices (supplier by sender, placeholder line, original attached), the rest ToDos. Never submits; state lives in ERPNext (unique Link intake_communication, ToDo reference). erpsetup adds the marker fields, the placeholder item EINGANGSRECHNUNG and its SKR04 6300 account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 08:15:32 +00:00
sharangandClaude Opus 5.5 36caf3c967 fix(erpsetup): visible footer line in PDFs, tighter totals (#81)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 25m32s
ci / image (push) Successful in 49s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 21:38:28 +00:00
sharangandClaude Opus 5.5 b4c184c26f fix(erpsetup): VAT after discount on documents; SEPA days on offers (#80)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 25m40s
ci / image (push) Successful in 41s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 20:51:33 +00:00
sharang edb7ecf9a2 Merge pull request 'fix(invite): Back to application lands in the workspace' (#79) from fix/invite-redirect-to-workspace into main
ci / test (push) Successful in 25m40s
ci / image (push) Successful in 39s
ci / shared (push) Successful in 15s
2026-10-19 08:38:18 +00:00
Sharang ParnerkarandClaude Opus 5.5 3551d2355b build(deps): kin-openapi 0.149.0 (CVE-2026-100349, -100351..-100354)
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 25m49s
ci / image (pull_request) Skipped
Trivy fails the shared job on five HIGH advisories in kin-openapi
0.144.0; all are fixed by 0.149.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:11:53 +02:00
Sharang ParnerkarandClaude Opus 5.5 bb414fd241 fix(invite): Back to application lands in the workspace, not on /start
ci / shared (pull_request) Failing after 15s
ci / test (pull_request) Successful in 25m47s
ci / image (pull_request) Skipped
INVITE_REDIRECT_URI may contain {slug}; the registry replaces it with the
workspace slug at all three invite sites (new workspace, member invite,
resend). Stage and prod currently point at /start?invited=1, which the
portal does not handle, so invitees landed on the trial signup form after
setting their password. With https://app.breakpilot.com/{slug}/dashboard
they arrive signed in in their workspace. A redirect without {slug} stays
as configured, so this is safe to deploy before the env change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:06:29 +02:00
sharang 06ad8d9b55 feat(projects): product hierarchy - family, product, component (#78)
ci / test (push) Successful in 25m42s
ci / image (push) Successful in 35s
ci / shared (push) Successful in 13s
v0.1.7
2026-10-15 20:36:20 +00:00
sharang 3f4dfa0cdc fix(trial): a product trial ends with the workspace's trial (#77)
ci / test (push) Successful in 25m31s
ci / image (push) Successful in 37s
ci / shared (push) Successful in 14s
v0.1.6
2026-10-15 16:28:01 +00:00
sharang c1de728d16 feat(projects): pass open vulnerabilities through to the portal (#76)
ci / shared (push) Successful in 16s
ci / test (push) Successful in 26m1s
ci / image (push) Successful in 36s
2026-10-14 18:20:57 +00:00
sharangandSharang Parnerkar 310c438aea fix(tenants): Setting the current status again is a no-op (#75)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 25m41s
ci / image (push) Successful in 37s
On stage, staff picked "Apply" (set status) with `trial` selected on a trial tenant, instead of "Extend". The registry wrote an update, a `tenant.status_changed` audit entry (`trial` → `trial`) and a Keycloak sync. The audit log showed an entry, but nothing had changed.

**Change:** `POST /v1/tenants/{id}/status` with the tenant's current status answers 200 with the unchanged tenant: no write, no audit entry, no Keycloak sync. The call stays idempotent for scripts. Other transitions are unchanged.

**Test:** `TestSetStatus_unchangedIsNoOp` (memory and Postgres) checks 200 and that no audit entry is added. It fails without the fix ("audit entries: 1, want 0"). `go vet` and `go test -short ./...` pass locally; the full Postgres suite runs in CI.

Companion: the portal staff page greys out "Apply" until a different status is chosen (separate portal PR).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #75
2026-10-14 11:09:29 +00:00
sharangandSharang Parnerkar 358c4abcb7 feat(audit): Products may pass their caller's address as source_ip (#73)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 25m31s
ci / image (push) Successful in 38s
`POST /v1/audit` recorded the address of the product that sent the event. So Prüfwerk's API-key writes showed the agent's container address (172.17.0.6 on stage) instead of the caller's.

- `appendAuditReq` gains `source_ip`. It is taken when `net.ParseIP` accepts it and stored in canonical form. The peer that sent the event is kept in `metadata.relayed_by`.
- Anything that doesn't parse is ignored, and the peer is recorded as before.
- Trust: `audit.write` is service-principal only, the same trust as the `actor_id` those callers already set.
- No migration, and existing callers are unchanged.
- Callers: Prüfwerk (pruefwerk #567, from the API host's proxy header); Werkmeister will reuse the field (agreed with werkmeister-18).

Test: `TestAppendAudit_sourceIP` covers a valid IP (recorded, `relayed_by` set) and junk (ignored), in each store.

Not in this PR: `clientIP()` takes the **leftmost** `X-Forwarded-For` entry. orca-proxy appends the peer it saw, so the rightmost entry is authoritative and the leftmost is chosen by the client. Separate issue for werkmeister-18.

Not run locally (RAM); CI runs the tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #73
2026-10-14 10:07:17 +00:00
sharang fdebac1735 feat(entitlements): Staff preview grants for products not for sale yet (#72)
ci / shared (push) Successful in 18s
ci / test (push) Successful in 25m44s
ci / image (push) Successful in 41s
2026-10-14 08:42:40 +00:00
sharang 5b4590d3bc feat(api-keys): CI licences by API key and integration keys (#71)
ci / shared (push) Successful in 13s
ci / image (push) Successful in 36s
ci / test (push) Successful in 25m10s
2026-10-13 22:12:05 +00:00
sharang 97284b5008 feat(api-keys): Scope catalogue, kinds, expiry and sha256 keys (#70)
ci / shared (push) Successful in 14s
ci / test (push) Successful in 25m3s
ci / image (push) Successful in 39s
2026-10-13 21:21:16 +00:00
sharang 1d3b5ebbc5 feat(catalog): Add werkmeister as a draft product, not for sale (#69)
ci / shared (push) Successful in 15s
ci / test (push) Successful in 24m24s
ci / image (push) Successful in 36s
2026-10-13 20:36:02 +00:00
sharangandSharang Parnerkar 271c23e5f2 fix(erpsetup): restore the letter head source, ignore <tbody> from UI saves (#68)
ci / image (push) Successful in 35s
ci / shared (push) Successful in 14s
ci / test (push) Successful in 28m11s
## What
- The letter head step also compares `source` and `footer_source` (want: HTML/HTML).
- `ensureFields` treats `<tbody>`/`</tbody>` as equal (Frappe's HTML editor adds them on a UI save).

## Why
Live ERPNext letter head `BreakPilot` (last saved 2026-10-06 09:19 in the UI): `source = Image`, so documents use an image header instead of our HTML one, plus `<tbody>` in content and footer. The dry run showed `letter head → would update` on every run, and an apply would not have restored `source`.

## Test plan
- [x] New test: tbody-only difference → `exists`; source Image → restored to HTML.
- [x] Existing erpsetup tests.
- [ ] User: dry run shows `letter head → would update` once, apply, then `exists`; check one invoice PDF shows the HTML header.

## Risk
**Blast radius:** Letter Head `BreakPilot` only (source fields). **Rollback:** set source back in the UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #68
2026-10-13 09:23:40 +00:00
sharangandSharang Parnerkar 8e2d8db4bf feat(erpsetup): cost centers per product, deferred revenue for yearly items (#67)
ci / shared (push) Successful in 14s
ci / test (push) Successful in 25m45s
ci / image (push) Successful in 37s
## What
erpsetup gets two accounting steps (new `internal/erpsetup/accounting.go`), run after the contract-basis fields:

**A1: cost centers**
- Creates Plattform, Prüfwerk, Firmwerk, Werkpilot, Infrastruktur and Verwaltung below the company's root cost center.
- Makes **Verwaltung** the company default. `Main` is kept, not renamed.
- Gives every SKU its product's **selling cost center** in its Item Defaults row for the company:
  - PLT → Plattform
  - CRA (Prüfwerk + Werkbank) → Prüfwerk
  - DEV-FWK → Firmwerk
  - DEV-WP → Werkpilot
  - INF (Managed Git + build runners) → Infrastruktur
- Other Item Defaults rows and other fields of the company's row (e.g. an income account) are kept.

**A2: deferred revenue**
- The 12 yearly items (`Jahr`: Werkpilot, Firmwerk, Managed Git and build-runner On-Prem) get `enable_deferred_revenue` over **12 months**.
- The company's default deferred revenue account becomes **SKR04 3900** (looked up by account number, never created). If it's missing, the deferral steps are skipped and reported as `missing (not created)`.
- Accounts Settings release the deferral **monthly as Journal Entries that stay drafts** (`submit_journal_entries = 0`): a person checks and submits them.

## Why
These follow the decisions with the tax advisor on 2026-10-12 (Collectives ERP/07):
- Cost centers live in ERPNext only, with no KOST1 in DATEV. They give a P&L per product.
- Yearly licences are deferred, so the monthly ERPNext P&L can be compared with her BWA. She books the RAP at year end in DATEV.

## How
- The cost-center and account names carry the company abbreviation, which is read from the Company.
- Item Defaults are PUT as the full table, because rows left out would be deleted.
- Idempotent and dry-run capable like the other steps; nothing is submitted.

## Test plan
- [x] Unit tests (fake Frappe):
  - cost centers and their parent
  - company defaults
  - Accounts Settings
  - cost center per SKU, deferral only on yearly items
  - existing Item Defaults rows and fields are kept
  - a missing 3900 skips the deferral
  - a missing company stops the run
- [x] Second run is a no-op; the dry run writes nothing.
- [ ] `erpsetup -dry-run` against live ERPNext (user): check that `deferred revenue account 3900` resolves, and expect 6 cost centers, 2 company fields, the Accounts Settings and 34 items as `would create`/`would update`.
- [ ] Apply, then spot-check one Werkpilot On-Prem item and one Prüfwerk item in ERPNext.

## Risk
**Blast radius:** live ERPNext master data: cost centers, company defaults, Accounts Settings, Item Defaults and deferral flags on the 34 SKU items. No transactions are touched.

**What could break:**
- New Sales Invoices for yearly items now need a service start and end date (ERPNext fills them from the posting date and the 12 months). Monthly items are unchanged.
- A Journal Entry draft appears each month for open deferrals.

**Rollback plan:** in ERPNext:
- set the company default cost center back to Main
- untick deferred revenue on the 12 yearly items
Cost centers can stay. Nothing is submitted by this change.

## Checklist
- [x] Docs updated (package doc; Collectives ERP/06 gets the cost-center note after the apply)
- [x] Audit events emitted for state changes (n/a: ERP master data)
- [x] Secrets via Infisical, never in repo (no secrets)
- [x] Migration is forward-only + idempotent (no migration; erpsetup is idempotent)
- [x] Tenant scoping enforced on every DB query (no DB access)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #67
2026-10-13 09:02:58 +00:00
sharang 40e77bbd0e build: Go 1.26 builder image (go.mod requires 1.26 since x/net v0.60.0) (#66)
ci / test (push) Successful in 24m19s
ci / image (push) Successful in 45s
ci / shared (push) Successful in 13s
v0.1.5
2026-10-12 08:14:28 +00:00
sharang 89487bbf50 fix(server): keep idle connections longer than orca-proxy's pool (502s on prod) (#65)
ci / shared (push) Successful in 17s
ci / test (push) Successful in 24m22s
ci / image (push) Failing after 14s
2026-10-12 07:21:11 +00:00
sharangandClaude Opus 5.5 557fbf85f5 feat(server): public GET /version with build version and commit (#63)
ci / shared (push) Successful in 12s
ci / test (push) Successful in 24m47s
ci / image (push) Successful in 39s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 19:51:40 +00:00
sharangandClaude Opus 5.5 1f6236a754 feat(members): team management: role, block, remove, revoke, resend (#64)
ci / shared (push) Successful in 12s
ci / test (push) Successful in 24m46s
ci / image (push) Successful in 33s
portal#74: PATCH/DELETE /v1/tenants/{id}/members/{uid}, POST .../resend and the staff variants; per-workspace block via org_blocked, session logout, last-admin and self guards, audit events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 18:43:31 +00:00
sharang 8753305ad4 feat(services): build runners INF-CI-* and managed service kind ci-runner (#62)
ci / shared (push) Successful in 13s
ci / test (push) Successful in 24m26s
ci / image (push) Successful in 36s
2026-10-05 18:06:49 +00:00