Repository navigation
feat(planning): add durable Today synchronization #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 104 commits
Commits
Show all changes
113 commits
Select commit
Hold shift + click to select a range
8b1da24
test(planning): define durable Today synchronization contract
seonghobae d371945
feat(planning): implement durable Today domain contract
seonghobae 0b49064
test(planning): define atomic Today persistence contract
seonghobae 7b612f1
feat(planning): persist Today with atomic optimistic writes
seonghobae a0683aa
feat(planning): add durable Today persistence schema
seonghobae d59254c
feat(planning): compose durable Today runtime
seonghobae 68eebee
test(planning): define Today HTTP precondition boundary
seonghobae f96671e
feat(planning): enforce authenticated Today HTTP preconditions
seonghobae 74304cd
feat(planning): expose authenticated Today sync API
seonghobae ab09f5d
fix(planning): avoid duplicate migration ordinal
seonghobae 32774fa
fix(planning): order durable Today migration after repository constra…
seonghobae 185c3b6
test(planning): verify durable Today PostgreSQL behavior
seonghobae c22afed
test(web): define authenticated Today sync BFF contract
seonghobae 864eaea
feat(web): add authenticated durable Today BFF
seonghobae bf04a5f
feat(web): expose same-origin Today sync route
seonghobae a202eae
test(web): include durable Today sync in quality gates
seonghobae fdc2ef0
test(web): define explicit local-to-workspace Today migration
seonghobae ec00594
feat(web): implement explicit local-to-workspace Today migration
seonghobae 89a5065
test(web): verify workspace Today migration path
seonghobae 8e0758e
feat(web): label local and durable Today states
seonghobae ce60e74
feat(web): localize durable Today sync states
seonghobae 28df9b5
feat(web): add explicit durable Today controls
seonghobae 83df8e2
feat(web): connect explicit workspace Today controls
seonghobae f9653ce
test(web): verify explicit durable Today migration
seonghobae 28f8a27
test(ci): require browser journey verification
seonghobae 1f0754a
ci(web): execute Playwright buyer journeys
seonghobae ac0218f
test(web): verify stale Today reconciliation
seonghobae 8edf7f3
docs(research): ground durable Today synchronization
seonghobae 02f9a28
docs(planning): add durable Today operations runbook
seonghobae 8cc9d42
docs(planning): design durable Today workspace sync
seonghobae c6303a5
docs(planning): plan durable Today workspace sync
seonghobae 64218f4
test(web): preserve local Today across retry
seonghobae 2c15d21
test(web): scope accessibility live-region assertions
seonghobae 71a3ae4
test(web): bind durable search acceptance to semantic controls
seonghobae ea633c3
test(web): follow the current Today capture label
seonghobae bb06f3a
style(planning): restore canonical provider formatting
seonghobae 3c46feb
style(planning): format concurrent Today assertion
seonghobae c3fa5a7
fix(web): remove unreachable Today save disabled check
seonghobae 607ddb4
fix(web): narrow optional Today request body
seonghobae 3b093be
test(web): make Today fetch fixtures exact-optional safe
seonghobae 4e473d4
test(web): preserve explicit optional fetch init in Today sync
seonghobae 0eadfb6
style(web): format Today workspace synchronization
seonghobae d77e30c
fix(planning): acquire Today advisory locks in order
seonghobae 9727606
test(planning): enforce deterministic Today lock order
seonghobae 79555c3
test(planning): stress identical Today replay concurrency
seonghobae a9ae43d
Merge 79555c3896d92a5609f90b473cf2cf0d809be467 into 38dde3fa44f6ad24d…
seonghobae 57110d1
style(web): format Today sync boundary
seonghobae a5a2586
style(web): format Today workspace client
seonghobae 86e9507
style(web): format Today sync tests
seonghobae 5939d11
style(web): format Today workspace tests
seonghobae 4f1c251
test(planning): match SQL client result contract
seonghobae 24dd54e
test(planning): isolate lock-order integration fixture
seonghobae c087cdf
test(planning): move lock-order fixture out of production source
seonghobae ec3235b
test(planning): remove dynamic SQL from lock-order fixture
seonghobae eb13ee3
style(web): format Today workspace sync client
seonghobae a30e0b2
style(web): format Today sync boundary
seonghobae 1df3a2d
style(web): format Today sync tests
seonghobae 451ffcb
fix(web): parse strong ETags with valid regex syntax
seonghobae 3ca84c6
fix(web): use valid strong ETag parser in BFF
seonghobae ceb638e
Merge branch 'main' into feat/durable-today-sync
opencode-agent[bot] 6807483
feat(identity): enforce recent-authentication policy for data rights …
seonghobae 0984658
test(planning): exercise Today concurrency independently
seonghobae 19aaa88
fix(planning): make Today date constraint DateStyle-independent
seonghobae e9602d6
fix(planning): type Today SQL parameters explicitly
seonghobae be5e6d9
test(identity): bind data-rights ownership to recent authenticated se…
seonghobae f8575d7
fix(planning): serialize Today writes in explicit transactions
seonghobae cb69c71
fix(planning): pin Today transactions to one PostgreSQL connection
seonghobae 931b783
test(planning): cover transactional Today persistence
seonghobae 67f2e96
test(planning): verify transaction lifecycle and cleanup
seonghobae 386d631
test(ci): bind Today concurrency to contributor head
seonghobae e38cdc4
test(planning): remove SQL-text lock-order surrogate
seonghobae aed4878
ci: capture exact Today prettier patch
seonghobae 8ec3175
test(web): expose in-flight Today save overwrite
seonghobae 17a0de7
fix(web): preserve edits during Today save
seonghobae 2714b6d
ci: apply bounded Today formatting
seonghobae e53349e
ci: expose read-only Today format patch
seonghobae 09d65b9
style(web): format Today sync client
seonghobae 518fdce
style(web): format Today workspace sync
seonghobae e9a68b1
style(web): format Today sync tests
seonghobae 935a8b9
chore(ci): remove Today format diagnostic
seonghobae bc3af48
test(planning): reject malformed Today lookup scope before SQL
seonghobae 12de7f7
ci: verify Today lookup validation red
seonghobae ece37c5
ci: apply verified Today lookup validation
seonghobae f5f57eb
fix(ci): compare repair lease to contributor head
seonghobae d73afed
fix(ci): include staged self-removal in repair lease
seonghobae 945ada5
test(planning): reject malformed Today repository lookups
seonghobae e4076fc
test(planning): distinguish corrupted Today persistence
seonghobae 2250163
fix(planning): classify invalid Today persistence separately
seonghobae 23f768b
fix(planning): validate Today lookup scope before SQL
seonghobae c3b7f21
test(planning): fail explicitly on leaked Today connections
seonghobae f3f2fcf
chore(ci): remove superseded Today repair workflow
seonghobae ea52117
fix(web): lint complete source globs
seonghobae a9b4b9d
test(planning): make Today concurrency cleanup deterministic
seonghobae 14e700f
docs(today): classify standards publication status
seonghobae fec9ce3
docs(today): align validation and readiness plan
seonghobae a8e8361
test(planning): define shared Today invariants contract
seonghobae a5f53a2
feat(planning): centralize Today validation invariants
seonghobae a4213da
refactor(planning): reuse shared Today invariants
seonghobae 37f91b7
refactor(planning): share Today invariants with persistence
seonghobae e490723
refactor(planning): reuse Today invariants at HTTP boundary
seonghobae b3a4021
test(planning): import Today persistence error from domain boundary
seonghobae 8b928af
test(planning): use shared Today persistence error boundary
seonghobae 5767be7
fix(web): preserve destructive-copy warning in Korean
seonghobae 2969193
test(ci): bind browser acceptance to its workflow job
seonghobae 39fc503
test(web): close Today BFF authority branch gaps
seonghobae 63842d0
ci(web): stage one-shot canonical formatter
seonghobae 55d9a51
style(web): apply canonical formatter output
github-actions[bot] 2cd8c76
feat(identity): persist data-rights request receipts (#138)
seonghobae 9e2ac42
test(web): expose Today media-type and conflict coupling
seonghobae d9002ae
test(web): execute Today review regressions
seonghobae 9cc7f5e
fix(web): preserve existing test dependencies
seonghobae 297057a
fix(web): normalize Today media types and conflict semantics
seonghobae 8260c6b
Merge 297057ab3007de67a9db82855c22a0be44004fce into 2cd8c766d2c835893…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: PR127 One-Shot Formatter | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - feat/durable-today-sync | ||
| paths: | ||
| - .github/workflows/pr127-one-shot-format.yml | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: pr127-one-shot-format | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| format: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout exact formatter trigger | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | ||
| with: | ||
| ref: feat/durable-today-sync | ||
| fetch-depth: 1 | ||
| persist-credentials: true | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 | ||
| with: | ||
| node-version: '22' | ||
| - name: Enable Corepack | ||
| run: corepack enable | ||
| - name: Install reproducible dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Apply canonical web formatting | ||
| run: >- | ||
| pnpm --filter @life-os/web exec prettier --single-quote --write | ||
| package.json "messages/*.json" "app/**/*.{ts,tsx,css,json}" | ||
| "e2e/**/*.{ts,tsx}" | ||
| - name: Remove one-shot formatter and verify | ||
| run: | | ||
| rm .github/workflows/pr127-one-shot-format.yml | ||
| pnpm --filter @life-os/web lint | ||
| git diff --check | ||
| - name: Commit bounded formatter result | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add apps/web .github/workflows/pr127-one-shot-format.yml | ||
| if git diff --cached --quiet; then | ||
| exit 1 | ||
| fi | ||
| git commit -m "style(web): apply canonical formatter output" | ||
| git push origin HEAD:feat/durable-today-sync | ||
61 changes: 61 additions & 0 deletions
61
apps/planning-service/migrations/0003_durable_today_sync.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| CREATE TABLE planning.today_aggregates ( | ||
| workspace_id uuid NOT NULL, | ||
| local_date date NOT NULL, | ||
| aggregate_id uuid NOT NULL, | ||
| revision_number bigint NOT NULL CHECK (revision_number >= 1), | ||
| revision_token uuid NOT NULL, | ||
| payload_json jsonb NOT NULL, | ||
| created_at timestamptz NOT NULL DEFAULT now(), | ||
| updated_at timestamptz NOT NULL DEFAULT now(), | ||
| CONSTRAINT today_aggregates_pk PRIMARY KEY (workspace_id, local_date), | ||
| CONSTRAINT today_aggregates_id_unique UNIQUE (aggregate_id), | ||
| CONSTRAINT today_aggregates_uuidv4_check CHECK ( | ||
| workspace_id::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| AND aggregate_id::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| AND revision_token::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| ), | ||
| CONSTRAINT today_aggregates_payload_check CHECK ( | ||
| jsonb_typeof(payload_json) = 'object' | ||
| AND payload_json ->> 'version' = 'life-os.today.v1' | ||
| AND payload_json ->> 'date' ~ '^\d{4}-\d{2}-\d{2}$' | ||
| AND EXTRACT(YEAR FROM local_date)::integer = | ||
| substring(payload_json ->> 'date' FROM 1 FOR 4)::integer | ||
| AND EXTRACT(MONTH FROM local_date)::integer = | ||
| substring(payload_json ->> 'date' FROM 6 FOR 2)::integer | ||
| AND EXTRACT(DAY FROM local_date)::integer = | ||
| substring(payload_json ->> 'date' FROM 9 FOR 2)::integer | ||
| AND jsonb_typeof(payload_json -> 'actions') = 'array' | ||
| ) | ||
|
seonghobae marked this conversation as resolved.
Resolved
|
||
| ); | ||
|
|
||
| CREATE TABLE planning.today_idempotency_records ( | ||
| workspace_id uuid NOT NULL, | ||
| idempotency_key uuid NOT NULL, | ||
| request_digest text NOT NULL, | ||
| result_kind text NOT NULL CHECK (result_kind IN ('created', 'updated')), | ||
| aggregate_id uuid NOT NULL, | ||
| revision_token uuid NOT NULL, | ||
| payload_json jsonb NOT NULL, | ||
| created_at timestamptz NOT NULL DEFAULT now(), | ||
| CONSTRAINT today_idempotency_records_pk | ||
| PRIMARY KEY (workspace_id, idempotency_key), | ||
| CONSTRAINT today_idempotency_records_uuidv4_check CHECK ( | ||
| workspace_id::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| AND idempotency_key::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| AND aggregate_id::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| AND revision_token::text ~* '^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' | ||
| ), | ||
| CONSTRAINT today_idempotency_records_digest_check | ||
| CHECK (request_digest ~ '^[0-9a-f]{64}$'), | ||
| CONSTRAINT today_idempotency_records_payload_check CHECK ( | ||
| jsonb_typeof(payload_json) = 'object' | ||
| AND payload_json ->> 'version' = 'life-os.today.v1' | ||
| AND jsonb_typeof(payload_json -> 'actions') = 'array' | ||
| ) | ||
| ); | ||
|
|
||
| CREATE INDEX today_aggregates_workspace_updated_idx | ||
| ON planning.today_aggregates (workspace_id, updated_at DESC); | ||
|
|
||
| CREATE INDEX today_idempotency_created_idx | ||
| ON planning.today_idempotency_records (workspace_id, created_at DESC); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.