Commit Graph
156 Commits
Author SHA1 Message Date
faumaray 81e1d54ac3 Merge pull request 'Bounded admission gated on an exact retained publication (#16)' (#32) from issue/16-publication-gated-queue into main 2026-12-03 08:08:37 +00:00
faumaray f57b508b0a Merge pull request 'Deterministic completion-order helpers (#15)' (#31) from issue/15-completion-observer into main 2026-12-03 08:08:35 +00:00
faumaray b381d682c8 Merge pull request 'Bounded sparse 3D pages with atomic revision-checked batches (#14)' (#30) from issue/14-sparse-page-table into main 2026-12-03 08:08:33 +00:00
faumaray 8c576fdcbf Merge pull request 'Bounded epoch-qualified revision read sets (#13)' (#29) from issue/13-revision-read-set into main 2026-12-03 08:08:31 +00:00
faumaray 63eecc32c7 Merge pull request 'Bounded 3D grid-ray traversal with a documented tie policy (#12)' (#28) from issue/12-grid-ray into main 2026-12-03 08:08:29 +00:00
faumaray 86bde8b172 Merge pull request 'Checked Euclidean division for signed grid coordinates (#11)' (#27) from issue/11-euclidean-division into main 2026-12-03 08:08:26 +00:00
faumaray a0e4bfa941 Merge pull request 'Versioned deterministic random stream state and bounded draws (#10)' (#26) from issue/10-versioned-rng-state into main 2026-12-03 08:08:24 +00:00
faumaray 6c5c2dcd93 Merge pull request 'Atomic reservations and repeatable transfers in an account ledger (#8)' (#24) from issue/8-account-ledger into main 2026-12-03 08:08:22 +00:00
faumaray 86510f99f0 Merge pull request 'Instance-owned restorable id sequences with checked exhaustion (#7)' (#23) from issue/7-restorable-id-sequences into main 2026-12-03 08:08:21 +00:00
faumaray a5f21c6374 Merge pull request 'Epoch-scoped request ledger with conflicting-retry detection (#6)' (#22) from issue/6-request-ledger into main 2026-12-03 08:08:19 +00:00
faumaray 2474292462 Merge pull request 'Immutable snapshot publication with epoch/revision identity (#5)' (#21) from issue/5-immutable-publication into main 2026-12-03 08:08:17 +00:00
faumaray 34cfd9cb39 Merge pull request 'Deterministic package resolver with source diagnostics (#4)' (#20) from issue/4-package-resolver into main 2026-12-03 08:08:15 +00:00
faumaray 5a076cd8f2 feat(Async): bounded admission gated on an exact retained publication (#16) 2026-12-03 07:02:33 +00:00
faumaray 3953891511 feat(Testing): deterministic completion-order helpers (#15) 2026-12-03 07:02:24 +00:00
faumaray 00eefe0521 feat(Containers): bounded sparse 3D pages with atomic revision-checked batches (#14) 2026-12-03 06:53:42 +00:00
faumaray dddcc2b2f0 feat(Algorithms): bounded epoch-qualified revision read sets (#13) 2026-12-03 06:53:34 +00:00
faumaray acd4ff40f0 feat(Algorithms): bounded 3D grid-ray traversal with a documented tie policy (#12) 2026-12-03 06:53:27 +00:00
faumaray 4f67fd2b93 feat(Math): checked Euclidean division for signed grid coordinates (#11) 2026-12-03 06:53:17 +00:00
selikhov 2e8afc471b feat(Math): versioned Xoshiro state and portable bounded draws (#10)
- Public, versioned State (algorithm identity "xoshiro256**", schema
  version 1, four words in s0..s3 order) so consumers can define their
  own wire format.
- restore() validates version and rejects the absorbing all-zero state
  without touching the current stream; from_state() builds a generator
  from saved state.
- bounded(n): unbiased rejection sampling in [0, n). Documented
  zero-bound policy: n == 0 and n == 1 return 0 without consuming
  randomness.
- 7 new tests freeze raw/bounded/state outputs for seed 42 (portable
  across targets), verify save/restore suffix equality, invalid-state
  rejection, zero/one bounds, large non-power-of-two ranges,
  independent interleaved streams and discard equivalence.
2026-12-03 09:46:15 +03:00
selikhov f3176c2b54 feat(System): bounded Windows read through one handle, with coverage (#9)
The Windows read_file_bounded path was implemented together with #3 using
a single CreateFileW handle. This adds the #9 acceptance coverage and
documents the contract:

- The size is checked before allocation and every chunk is re-checked, so
  growth after the initial size check still fails with limit_exceeded and
  never returns partial contents.
- Windows shares read/write/delete, so another process may append,
  rename or replace the path while a background read is pending; the
  read continues from the opened handle and sees one coherent version.
- Tests: empty, binary, Unicode path, exact limit, over limit before
  reading, and (POSIX) a stream that grows past the limit mid-read.
2026-12-03 09:45:14 +03:00
selikhov a4851c2c20 feat(Containers): restorable account ledger with atomic reservations (#8)
- AccountLedger: caller-keyed accounts (owner, balance, capacity) with
  atomic multi-account reserve, release without ownership change and
  transfer to the destination (next) owner.
- Explicit outcomes for insufficient balance, capacity exhaustion,
  overflow, unknown account/operation, invalid phase and limits.
- Every committed phase is recorded by operation id, so repeated
  requests replay the recorded outcome instead of applying twice;
  failed attempts change nothing and remain retryable.
- State is a plain value: save()/restore() survive a partially completed
  transfer and replay applies exactly once after restore.
- 11 tests: conservation, last-unit contention, atomic multi-key failure,
  cancellation before pickup and during delivery, restore/replay,
  overflow, operation-id conflict, account/operation limits and invalid
  restore state.
2026-12-03 09:44:21 +03:00
selikhov f2b002eb26 feat(Core): instance-owned restorable id sequences with checked exhaustion (#7)
- IdSequence<Tag, Rep> is per-instance, copyable and restorable, so two
  worlds in one process allocate independently and a saved high-water
  mark replays exactly.
- next()/next_batch() check exhaustion before mutating; failed requests
  leave the sequence and application records untouched. Batches are
  all-or-nothing.
- High-water only moves forward: erased records keep their ids retired.
- Fixed-width Rep (default uint64_t) plus an explicit exhausted flag make
  saved state canonical and portable; restore() rejects impossible state.
- 10 standalone tests cover independence, erase/restore, copy replay,
  atomic batches, exhaustion, final-boundary batches and invalid state.
2026-12-03 09:41:50 +03:00
selikhov afd4d99a2d feat(Messaging): epoch-scoped request ledger with conflict detection (#6)
- RequestLedger<Payload, Result, PayloadEqual> keys idempotent host
  requests by (epoch, trusted client, request id).
- check() admits the first request, replays a recorded result for an
  exact repeat (including a rejected outcome), reports in_progress while
  the request is still running, rejects a changed payload and rejects
  keys from an obsolete/future epoch before side effects.
- record() stores the caller-defined result exactly once; results are
  never overwritten.
- Capacity/admission/archival is explicit: entries are never evicted
  within an epoch (capacity_exceeded instead), and advancing the epoch
  clears memory. An old request number therefore cannot execute a second
  time after cleanup.
- 8 tests: replay, rejected outcome, payload conflict, delayed retry
  after newer operations, epoch rollover, capacity pressure, in-flight
  state/immutable result and non-advancing epoch rejection.
2026-12-03 09:40:47 +03:00
selikhov 37c3cd4383 feat(Core): immutable snapshot publication with epoch/revision identity (#5)
- Publication<T>: single-writer, multi-reader publication of complete
  immutable values. acquire() returns a retainable Snapshot; a retained
  snapshot stays coherent across any number of later publishes and keeps
  the value alive until the last reader releases it.
- publish() is compare-and-publish over one atomic (value + version)
  state: an expected epoch must match, and the new version must advance
  (higher epoch, or same epoch with higher revision). Rejected publishes
  leave the last good publication untouched, so a failed preparation
  cannot corrupt readers.
- publish_next()/publish_epoch() convenience helpers.
- 7 tests: retained snapshots, stale-epoch rejection, non-advancing
  revision, epoch reset, last-reader resource release, failed
  preparation preservation and concurrent reader coherence.
2026-12-03 09:39:56 +03:00
selikhov d30384d981 feat(Update): deterministic package resolver with diagnostics (#4)
- resolve_packages() takes caller-supplied package descriptions (id,
  exact version, content digest, exclusive capabilities, dependency
  ranges) plus selected root ids and returns an exact dependency set.
- Deterministic: canonical input ordering, descending SemVer candidate
  order and canonical requirement order make the result invariant under
  permutation of installed/selected input.
- Frozen PackageIdentity compares build metadata and content digest in
  addition to SemVer precedence, so equal-precedence rebuilds are never
  conflated; ambiguous same-id/same-precedence inputs are rejected.
- Actionable diagnostics carry kind, input package, field
  (e.g. dependencies[1].range) and related id: missing dependency,
  incompatible version, cycle, ambiguity, competing exclusive providers.
- Bounded package/edge/search-node limits with backtracking search.
- 13 standalone tests cover closure, order invariance, diagnostics,
  backtracking, cycles, capabilities, frozen identity and limits.
2026-12-03 09:38:27 +03:00
selikhov 51ceb081ac feat(System): transactional file replacement on Windows x64 (#3)
- replace_file/atomic_write gain a Win32 implementation: exclusive
  CREATE_NEW staging in the destination directory, WriteFile loop,
  FlushFileBuffers for durable_sync, MoveFileExW(MOVEFILE_REPLACE_EXISTING
  [| MOVEFILE_WRITE_THROUGH]) for atomic publication and a parent-directory
  flush for durability.
- read_file_bounded/write_file implemented on Windows so the contract is
  usable and testable there.
- Documented Windows guarantees per durability level, including the
  application-crash vs power-loss distinction and post-rename failure
  reporting (sync_parent + visible_on_disk + durability_unknown).
- Added a portable contract test (first creation, replacement, Unicode
  name, pre-publication faults preserving old contents, post-publication
  fault reporting, no staging leftovers, live destination never deleted)
  and a concurrent-writer atomicity test.
2026-12-03 09:34:50 +03:00
faumaray c6de7842f7 fix(wave11): resolve adversarial review findings in EventBus, IO, and Runtime 2026-12-01 22:03:35 +03:00
faumaray 7bea7df46d feat(runtime): add 8-step Host start, SignalGate, and 11-phase structured shutdown (S-RUNTIME-02/03) 2026-12-01 16:58:29 +03:00
faumaray 50029e1f7b feat(io): add Driver::run, embedded pump_until, and shutdown conformance tests (S-IO-04) 2026-12-01 16:25:20 +03:00
faumaray ef85ce07b7 feat(async): add EventBus injected/joined lifecycle and Observable reentrancy queue (M-ASYNC-05) 2026-12-01 10:27:50 +03:00
faumaray 1e752da590 feat(io): add positional File workers, sync, bounded shutdown core, and epoll D1 fixes (S-IO-03) 2026-12-01 10:15:03 +03:00
faumaray b2c84114fe feat(async): add ThreadExecutor, FuturePool, AsyncChannel, bounded parallel_for, and spawn fix (M-ASYNC-04) 2026-12-01 10:15:03 +03:00
faumarayandClaude Opus 5.5 5c24f8e84f feat(async): add retry_async over TimerQueue and deadline-domain conformance (M-TIME-03 B1b)
- NEW Async/Retry.hpp: retry_async drives RetryState with the TimerQueue's
  injected clock, awaits backoff via sleep_until, resumes only after a clean
  sleep (any sleep error ends the retry), preserves success after stop,
  supports Task-returning and move-only callables
- Tests: AsyncRetry (15), DeadlineDomains blocking-retry manual-clock case

Review: W11-REVIEW-B1b READY (deviation accepted; doc fix applied by root)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 00:35:20 +03:00
faumarayandClaude Opus 5.5 99a1100bb1 feat(async,time): add injected-clock TimerQueue and clock saturation helpers (M-TIME-03 B1)
- NEW Async/Timer.hpp: TimerQueue (stable (deadline, seq) min-heap, bounded
  tombstones, explicit poll_expired, callbacks outside the lock, close/destroy
  deliver TimerEvent::closed), shared-state TimerHandle safe after queue
  destruction, sleep_until/sleep_for settling exactly once and resuming via
  post_completion; documented sleep-task lifetime and cancel-under-lock rules
- Time/Clock.hpp: saturating_add, deadline_after
- Tests: TimerQueue (15), DeadlineDomains (2), ClockSaturation (1); race loops
  count failures to stay under the runner's 1,000-assertion retention (X-QA-02)

Review: W11-REVIEW-B1 (CHANGES_REQUIRED F1-F3 fixed by root: test counters,
header lifetime/cancel docs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 23:36:37 +03:00
faumarayandClaude Opus 5.5 26edf653e3 feat(functional): add pure RetryState and named retry_blocking adapter (M-FUNCTIONAL-03)
- NEW std-only Functional/RetryState.hpp: RetrySpec/BackoffSpec validation,
  begin/next/resume/succeed decisions, saturating backoff, Full/Equal jitter,
  explicit no_deadline, random_device-seeded default engine, final stop decisions
- Retry.hpp: relocate JitterMode, add SteadyNow/ThreadSleep/BlockingRetryOptions
  and retry_blocking with injected now/sleep; saturating wait computation
- 1.x retry/retry_while/retry_or_throw unchanged (zero-attempt defect pinned)
- Tests: RetryState (13), RetryBlocking (10)

Review: W11-REVIEW-A1 READY (P3 fixes 1, 2, 5 applied by root)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 19:34:46 +03:00
faumarayandClaude Opus 5.5 7f95f89d52 chore(wave11): plan execution-path backfill, reserve error codes, update area plans
- Audit roadmap vs TASKS (D-033); scope Wave 11 to M-FUNCTIONAL-03, M-TIME-03,
  M-ASYNC-04/05, S-IO-03/04, S-RUNTIME-02/03 (D-034..D-036)
- Schedule VoidForge upstream requests after Wave 11 (D-037)
- Persist planner output, PREFLIGHT findings and contract addendum (D-038)
- Add AsyncErrorCode::closed, IoErrorCode::sync_failed,
  RuntimeErrorCode::{self_join, shutdown_incomplete}
- Update Functional/IO/Runtime area plans and MIGRATION per C-13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 18:31:14 +03:00
faumaray 60ee28e4ca feat(messaging): implement P3 S-MESSAGING-01..04 Messaging queue, StorageQueue/OutboxInbox, and MessagingRpc adapter 2026-11-27 05:45:43 +03:00
faumaray aaeab50758 feat(scheduler): implement P3 S-SCHEDULER-01..04 Scheduler engine, calendar/DST, and SchedulerStorage durable store 2026-11-27 05:38:06 +03:00
faumaray ec8c0bd40a feat(discovery): implement P3 S-DISCOVERY-01..04 Discovery catalog and optional DiscoveryRpc adapter 2026-11-27 05:25:43 +03:00
faumaray 0cf187d664 docs(wave10): add P3 Discovery, Scheduler, and Messaging specs and error domains 2026-11-27 05:14:52 +03:00
faumaray 5184d1cf8c feat(rpc): implement P2 S-RPC-01..03 Wire v1 binary codec and unary HTTP/1.1 RPC subsystem 2026-11-27 01:27:32 +03:00
faumaray 691808eab6 feat(shorturl): complete P2 M-SHORTURL-01..04 V2 local, storage, and remote providers with frozen V1 2026-11-27 01:27:32 +03:00
faumaray 658c21a2fa feat(testing-mock): complete P2 M-TESTINGMOCK-01..04 sessions, action-outside-lock, move-only, combinators 2026-11-27 01:15:36 +03:00
faumaray 86d777eae6 feat(net): complete P2 M-NET-01..05 codec, pool, safe static open, redirects, and RFC 6455 WebSocket 2026-11-27 01:15:36 +03:00
faumaray 700024a24d docs(wave9): add P2 Net, TestingMock, ShortUrl, and RPC task specs and error domains 2026-11-26 22:58:30 +03:00
faumaray 66baae74a0 feat(net): implement VL-004 HttpServer and VL-005 streaming HttpClient with secure TLS 2026-11-26 21:47:15 +03:00
faumaray 22c8538754 feat(crypto,archive): implement VL-007 built-in hashes and VL-006 archive creation/gzip/tar fallback 2026-11-26 20:55:45 +03:00
faumaray b50131f52e feat(system,config,sqlite): implement VL-001, VL-003, VL-010, VL-011 2026-11-26 20:45:52 +03:00
faumaray adfc8548dc feat(data,text,testing): implement VL-002 TOML, VL-008 StrictJson UTF-8, VL-009 native tests, and VL-013 Semver shorthands 2026-11-26 20:27:42 +03:00
faumaray 40b579d683 fix(fsm): publish terminal status after exit hooks and join worker before derived teardown 2026-11-26 17:10:54 +03:00