Repository navigation
timesheets 0.4.0: two open copies, send lease, concurrent compaction (#123 M5) - #246
Merged
Merged
Conversation
…M5) - Send lease (app/lease.ts, #97 answer 5): clockify-lease on the log head, 60 s, taken (read, write, read back) before a send, renewed before each change and write, given back at the end. Held elsewhere: nothing is sent. A sync leaves another copy's unconfirmed create alone. Advisory: /app-write has no compare-and-swap. - Range edits as intents (app/intents.ts, #97 §5.2, #177 §4.5): one write-once resource per range edit or resolution under the log head, found by clockify-intent-of; status derived (replaced, open). S22: an edit over open range edits it can see replaces them (their staged changes put back first); refused if one reaches outside it. S21: overlapping open edits made apart with different targets are a "between your edits" conflict on every device, their changes held until one is chosen. - Concurrent compaction (S28): the head keeps a second snapshot tip instead of dropping it, unites tails (keeping diffs another copy appended during a compaction, which were dropped before), replays the DAG when there are two tips, and the next compaction merges them. - fakeStore saves only properties set since the last save, as the host. - Tests: S21 (range and same entry), equal edits, S22 and its refusal, the lease (held, expired, long batch, lost mid-batch, sync), S28 and one-compacts-one-appends in both orders. Measured fold/snapshot sizes at 600 and 2,000 entries (README). - App 0.4.0 (143,683 bytes; limit re-measured), catalog copy, usertest-4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
# Conflicts: # usertest/catalog.mjs
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements #123 M5 on top of M4 (#240), following #97 §5.2/§6.2 and #177: bookkeeping on the row, compare-on-open, review before send. Mock-tested only, so declared, not verified.
app/lease.ts): one open copy sends at a time./app-writehas no compare-and-swap. Two lease takes within one round trip can both succeed; the worst case is a duplicate create, which "Remove duplicate" fixes.app/intents.ts):usertest-4.Tests:
app/multiDevice.test.ts: S21 ×2, equal edits, S22 and its refusal, and 4 lease cases.app/observationLog.test.ts: S28, plus 2 cases where one device compacts while another appends.app/timeline/timeline.test.ts: the render text.Lanes: typecheck, unit (466 tests) and e2e (4/4, 1 worker as in CI) pass. Tooling tests, apps and ontology checks, certify, oxlint and oxfmt also pass.
Defaults chosen (product questions go to #227):
#123 stays open for the live checks in a test workspace and for the
billablequestion.🤖 Generated with Claude Code