Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
921f685
feat(data): migrate all entity primary keys from auto-increment uint …
cpcloud Mar 17, 2026
5240b2d
refactor(ui): truncate ULID display to last 7 chars in ID column
cpcloud Mar 17, 2026
9486e48
feat(data): add sync oplog for change tracking across devices
cpcloud Mar 17, 2026
b87e1bd
feat(crypto): add encryption layer for sync operations
cpcloud Mar 17, 2026
b190d8e
feat(relay): add sync relay server with push/pull endpoints
cpcloud Mar 17, 2026
ed5a1cf
feat(sync): add client sync with push/pull and LWW conflict resolution
cpcloud Mar 17, 2026
f4ceb82
feat(sync): add household sharing with invite codes and NaCl box key …
cpcloud Mar 17, 2026
4940365
fix(relay): move join endpoint to POST /households/{id}/join per spec
cpcloud Mar 17, 2026
c71c5bc
feat(relay): add Stripe subscription gating and webhook processing
cpcloud Mar 17, 2026
4adbfc6
docs: clean up micasa Pro spec, remove timelines and stale decisions
cpcloud Mar 17, 2026
ea101ac
docs: restore key rotation to v1, move device.token back to filesystem
cpcloud Mar 17, 2026
6016ff4
fix(relay): make key exchange credential retrieval single-use
cpcloud Mar 17, 2026
342f8f3
refactor(crypto): rename keys/ directory to secrets/
cpcloud Mar 17, 2026
bc0729c
fix(sync): harden crypto, relay, and sync against review findings
cpcloud Mar 17, 2026
3616099
fix(sync): address roborev findings across relay, sync, and data pack…
cpcloud Mar 17, 2026
303513e
fix(sync): address remaining roborev findings and add relay to gitignore
cpcloud Mar 17, 2026
df57577
fix(crypto): return zero DeviceKeyPair on all error paths
cpcloud Mar 17, 2026
9e1eae8
fix(relay): validate household before consuming invite attempts
cpcloud Mar 17, 2026
1d5d95a
feat(sync): add device token persistence, household client methods, a…
cpcloud Mar 17, 2026
e16374d
feat(pro): add micasa pro CLI commands and address review findings
cpcloud Mar 17, 2026
b28d430
fix(pro): address review findings and fix extraction accept guard
cpcloud Mar 17, 2026
9ea7e8a
refactor(pro): use deferred guard for store cleanup and fix test stor…
cpcloud Mar 17, 2026
ed03d4e
feat(sync): add document blob sync via relay
cpcloud Mar 17, 2026
237b77b
fix(sync): address blob sync review findings
cpcloud Mar 17, 2026
bde9923
fix(sync): distinguish MaxBytesError from read errors and include has…
cpcloud Mar 17, 2026
e041de5
fix(sync): validate insert payload ID, harden zeroize, and log unmars…
cpcloud Mar 17, 2026
a10e453
refactor(sync): extract validateInsertPayloadID with distinct error m…
cpcloud Mar 17, 2026
0d52f40
fix(relay): use 256-bit crypto-random tokens for key exchange IDs
cpcloud Mar 17, 2026
63d8542
fix(relay): replace O(N) bcrypt scan with O(1) SHA-256 token index
cpcloud Mar 17, 2026
2049f35
fix(sync): sort pulled ops by seq before applying
cpcloud Mar 17, 2026
8d6b420
refactor(data): replace global cachedDeviceID with per-Store deviceID…
cpcloud Mar 17, 2026
723d625
fix(data): return error from resolveDeviceID and fix SetDeviceID orde…
cpcloud Mar 17, 2026
d0dd6cb
fix(pro): address review findings and fix extraction accept guard
cpcloud Mar 17, 2026
9fe7187
docs(pro): migrate relay spec from Firestore to Cloud SQL (Postgres)
cpcloud Mar 17, 2026
6bdbb3f
fix(pro): address review findings for spec schema and code quality
cpcloud Mar 17, 2026
4f304ff
feat(pro): add micasa pro conflicts CLI subcommand
cpcloud Mar 17, 2026
4681bfe
feat(pro): add micasa pro storage subcommand
cpcloud Mar 17, 2026
dc1b149
feat(relay): add Postgres store implementation
cpcloud Mar 17, 2026
b7d6de5
fix(pro): clean up verbose error message and address review findings
cpcloud Mar 17, 2026
74ceb62
fix(pro): use plain language in sync error messages
cpcloud Mar 17, 2026
15cb9e8
fix(pro): address review findings and fix extraction accept guard
cpcloud Mar 17, 2026
f54e947
chore(relay): unexport constants, fix test type assertion, simplify t…
cpcloud Mar 17, 2026
af4c59d
fix(sync): harden security across crypto, relay, and sync packages
cpcloud Mar 17, 2026
5d72dde
fix(sync): preserve timestamps across devices and add download integr…
cpcloud Mar 17, 2026
44a03e5
fix(sync): harden apply ops and zeroize device token data
cpcloud Mar 17, 2026
f3d9748
refactor(data): add json tags to all GORM model structs
cpcloud Mar 17, 2026
8b07a68
fix(data): remove omitempty from syncable model json tags
cpcloud Mar 17, 2026
3646014
fix(sync): address review findings across relay, sync, and data packages
cpcloud Mar 17, 2026
0a4e890
chore(relay): add readability comments to blob quota overflow check
cpcloud Mar 17, 2026
ae98d76
fix(sync): harden conflict resolution, relay security, and client safety
cpcloud Mar 17, 2026
edb1abd
fix(relay): add FOR UPDATE lock on invite count to close TOCTOU race
cpcloud Mar 17, 2026
d03044b
docs(sync): update spec from audit findings, save audit reports
cpcloud Mar 17, 2026
d17acae
fix(crypto): bound key file reads with io.LimitReader
cpcloud Mar 17, 2026
fb2528e
fix(relay): expire key exchange records after 1 hour
cpcloud Mar 17, 2026
8fad606
test(sync): cover conflict resolution and payload stripping edge cases
cpcloud Mar 17, 2026
8f0f150
fix(crypto,relay): address review findings from roborev
cpcloud Mar 17, 2026
ff44dd4
test(relay,crypto): add lower-priority test coverage from audit
cpcloud Mar 17, 2026
fa284b4
feat(relay): wire binary to PgStore, Stripe, and graceful shutdown
cpcloud Mar 17, 2026
766c5cd
docs(plans): add TUI sync integration implementation plan
cpcloud Mar 17, 2026
2fafbc0
feat(sync): extract Engine from pro.go for reuse by TUI
cpcloud Mar 17, 2026
df240f4
feat(app): wire background sync into TUI with indicator and debounce
cpcloud Mar 17, 2026
7496b68
test(app): sync state transitions and integration test with mock relay
cpcloud Mar 17, 2026
29aeec8
docs(relay): add self-hosted relay spec
cpcloud Mar 17, 2026
d21e9ce
docs(relay): add self-hosted relay implementation plan
cpcloud Mar 17, 2026
94e599c
feat(relay): add self-hosted mode with subscription bypass and config…
cpcloud Mar 17, 2026
23ce7b2
docs(sync): document BlobStorage.QuotaBytes zero-value semantics
cpcloud Mar 17, 2026
99d65cf
feat(cli): adaptive storage display for unlimited quota
cpcloud Mar 17, 2026
f1206dd
feat(relay): parse SELF_HOSTED and BLOB_QUOTA_BYTES env vars at startup
cpcloud Mar 17, 2026
8150185
test(relay): add self-hosted mode integration test
cpcloud Mar 17, 2026
841db08
feat(deploy): add Docker Compose stack for self-hosted relay
cpcloud Mar 17, 2026
abf0549
chore(relay): clarify NewHandler default quota comment
cpcloud Mar 17, 2026
4c3e4ae
fix(relay): address review findings across relay, sync, and data pack…
cpcloud Mar 18, 2026
6aeaac0
fix(app): remove dead syncStartedMsg and fix .dockerignore glob
cpcloud Mar 19, 2026
62d01ec
feat(data): add HardDeleteMaintenance with cascade oplog handling
cpcloud Mar 19, 2026
16a0f98
fix(data): detach maintenance-item documents in HardDeleteMaintenance
cpcloud Mar 19, 2026
4701266
fix(data): check ListMaintenance errors in hard-delete tests
cpcloud Mar 19, 2026
8a190bf
fix: resolve all golangci-lint findings and bump grpc for CVE
cpcloud Mar 19, 2026
902f6e1
fix: address critical design review findings
cpcloud Mar 19, 2026
9c5ee00
fix(ci): resolve lint, Windows perms, and OSV findings
cpcloud Mar 19, 2026
d0c0d9a
fix(ci): use filepath.Join for Windows path separator in test
cpcloud Mar 19, 2026
265c732
fix(sync): correct pushAll count, scope vendor oplog, use t.Skip
cpcloud Mar 19, 2026
654af4d
test(relay,sync): add error path and blob engine coverage
cpcloud Mar 19, 2026
746a958
fix(relay): rename unused handler param to _ in test helper
cpcloud Mar 19, 2026
bc1d314
fix(test): clean up test helpers per review findings
cpcloud Mar 19, 2026
94ef1a4
test: improve patch coverage across relay, sync, crypto, and data
cpcloud Mar 19, 2026
1b91c46
ci: add Postgres integration test job for PgStore coverage
cpcloud Mar 19, 2026
ae4dc5b
fix(test): remove stale comment in oversized blob test
cpcloud Mar 19, 2026
80ca44b
fix(test): resolve remaining lint in coverage tests
cpcloud Mar 19, 2026
834f4ec
fix(relay): lock household row instead of FOR UPDATE on aggregate
cpcloud Mar 19, 2026
181ee3a
ci: run all relay tests in postgres job for full coverage
cpcloud Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,50 @@ jobs:
files: coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}

pgtest:
name: Postgres Integration
needs: changes
if: needs.changes.outputs.go == 'true'
runs-on: ubuntu-latest
concurrency:
group: ci-pgtest-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: micasa
POSTGRES_PASSWORD: testpass
POSTGRES_DB: micasa_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U micasa"
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false

- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: "1.26"

- name: Test relay (with Postgres)
env:
CGO_ENABLED: "1"
RELAY_POSTGRES_DSN: "postgres://micasa:testpass@localhost:5432/micasa_test?sslmode=disable"
run: go test -race -shuffle on -timeout 5m -coverprofile coverage-pg.txt ./internal/relay/

- name: Upload coverage
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
files: coverage-pg.txt
flags: postgres
token: ${{ secrets.CODECOV_TOKEN }}

benchmarks:
name: Benchmarks (smoke)
needs: changes
Expand Down Expand Up @@ -249,7 +293,7 @@ jobs:
result:
name: CI Result
if: always()
needs: [changes, test, benchmarks, nix-build, docs, semantic-release-dry-run]
needs: [changes, test, pgtest, benchmarks, nix-build, docs, semantic-release-dry-run]
runs-on: ubuntu-latest
steps:
- run: exit 1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*.so
*.dylib
/micasa
/relay

# Test binary, built with `go test -c`
*.test
Expand Down
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,13 @@ details; do not duplicate that detail here.
cascading defaults across sections, no "this overrides that unless the
other thing is set." If two pipelines need the same setting, they each
get their own independent copy.
- **No defensive casing variants**: We control the serialization protocol.
Every struct that can appear in a JSON payload (oplog entries, API
requests/responses) MUST have explicit `json:"snake_case"` tags on every
field. Never write code that handles multiple casings of the same key
(e.g. `delete(m, "id"); delete(m, "ID")`) -- that papers over an
inconsistency instead of fixing it. If you see ambiguity, fix the
source struct's tags.
- **Deterministic ordering requires tiebreakers**: Every `ORDER BY` that
could tie MUST include a tiebreaker (typically `id DESC`).
- **Audit new deps before adding**: Review source for security issues
Expand Down
Loading
Loading