Merge branch 'main' of https://git.stella-ops.org/stella-ops.org/git.stella-ops.org
This commit is contained in:
@@ -151,21 +151,9 @@ CREATE INDEX idx_hlc_state_updated ON scheduler.hlc_state(updated_at DESC);
|
||||
| 7 | HLC-007 | DONE | HLC-003 | Guild | Add `HlcTimestampTypeHandler` for Npgsql/Dapper |
|
||||
| 8 | HLC-008 | DONE | HLC-005 | Guild | Write unit tests: tick monotonicity, receive merge, clock skew handling |
|
||||
| 9 | HLC-009 | DONE | HLC-008 | Guild | Write integration tests: concurrent ticks, node restart recovery |
|
||||
<<<<<<< HEAD
|
||||
| 10 | HLC-010 | DONE | HLC-009 | Guild | Write benchmarks: tick throughput, memory allocation |
|
||||
| 11 | HLC-011 | DONE | HLC-010 | Guild | Create `HlcServiceCollectionExtensions` for DI registration |
|
||||
| 12 | HLC-012 | DONE | HLC-011 | Guild | Documentation: README.md, API docs, usage examples |
|
||||
=======
|
||||
<<<<<<<< HEAD:docs/implplan/SPRINT_20260105_002_001_LB_hlc_core_library.md
|
||||
| 10 | HLC-010 | TODO | HLC-009 | Guild | Write benchmarks: tick throughput, memory allocation |
|
||||
| 11 | HLC-011 | DONE | HLC-010 | Guild | Create `HlcServiceCollectionExtensions` for DI registration |
|
||||
| 12 | HLC-012 | TODO | HLC-011 | Guild | Documentation: README.md, API docs, usage examples |
|
||||
========
|
||||
| 10 | HLC-010 | DONE | HLC-009 | Guild | Write benchmarks: tick throughput, memory allocation |
|
||||
| 11 | HLC-011 | DONE | HLC-010 | Guild | Create `HlcServiceCollectionExtensions` for DI registration |
|
||||
| 12 | HLC-012 | DONE | HLC-011 | Guild | Documentation: README.md, API docs, usage examples |
|
||||
>>>>>>>> 47890273170663b2236a1eb995d218fe5de6b11a:docs-archived/implplan/SPRINT_20260105_002_001_LB_hlc_core_library.md
|
||||
>>>>>>> 47890273170663b2236a1eb995d218fe5de6b11a
|
||||
|
||||
## Implementation Details
|
||||
|
||||
@@ -347,23 +335,12 @@ hlc_physical_time_offset_seconds{node_id} // Drift from wall clock
|
||||
| Date (UTC) | Update | Owner |
|
||||
|------------|--------|-------|
|
||||
| 2026-01-05 | Sprint created from product advisory gap analysis | Planning |
|
||||
<<<<<<< HEAD
|
||||
| 2026-01-05 | HLC-001 to HLC-011 implemented: core library, state stores, JSON/Dapper serializers, DI extensions, 56 unit tests all passing | Agent |
|
||||
| 2026-01-06 | HLC-010: Created StellaOps.HybridLogicalClock.Benchmarks project with tick throughput, memory allocation, and concurrency benchmarks | Agent |
|
||||
| 2026-01-06 | HLC-012: Created comprehensive README.md with API reference, usage examples, configuration guide, and algorithm documentation | Agent |
|
||||
| 2026-01-06 | Sprint COMPLETE: All 12 tasks done, 56 tests passing, benchmarks verified | Agent |
|
||||
=======
|
||||
<<<<<<<< HEAD:docs/implplan/SPRINT_20260105_002_001_LB_hlc_core_library.md
|
||||
| 2026-01-05 | HLC-001 to HLC-011 implemented: core library, state stores, JSON/Dapper serializers, DI extensions, 56 unit tests all passing | Agent |
|
||||
========
|
||||
| 2026-01-06 | HLC-001 to HLC-006 and HLC-011 DONE: Created StellaOps.HybridLogicalClock project with HlcTimestamp record (comparison, parsing, serialization), HybridLogicalClock class (Tick/Receive/Current), IHybridLogicalClock and IHlcStateStore interfaces, InMemoryHlcStateStore, PostgresHlcStateStore (atomic upsert with conditional update for monotonicity), HlcClockSkewException, HlcTimestampJsonConverter (string and object format), NullableHlcTimestampJsonConverter, and HlcServiceCollectionExtensions. All builds verified. | Agent |
|
||||
| 2026-01-06 | HLC-007 DONE: Created HlcTimestampTypeHandler.cs with HlcTimestampNpgsqlExtensions (AddHlcTimestamp, GetHlcTimestamp, GetHlcTimestampOrNull methods for NpgsqlCommand and NpgsqlDataReader), HlcTimestampDapperHandler, NullableHlcTimestampDapperHandler, and HlcTypeHandlerRegistration for DI. Added Dapper package reference. Build verified. | Agent |
|
||||
| 2026-01-06 | HLC-008 DONE: Created StellaOps.HybridLogicalClock.Tests project with comprehensive unit tests: HlcTimestampTests (20+ tests for parsing, comparison, operators, lexicographic ordering), HybridLogicalClockTests (25+ tests for tick monotonicity, receive merge, clock skew handling, state initialization/persistence, causal ordering), InMemoryHlcStateStoreTests (15+ tests for load/save/monotonicity), HlcTimestampJsonConverterTests (25+ tests for string and object JSON converters). Build verified. | Agent |
|
||||
| 2026-01-06 | HLC-009 DONE: Added HybridLogicalClockIntegrationTests with 10+ integration tests covering: concurrent ticks (all unique, within-thread monotonicity), node restart recovery (resume from persisted, same physical time counter increment), multi-node causal ordering (request-response, broadcast-gather, clock skew detection, concurrent events total ordering), state store concurrency (no loss, maintains monotonicity). Build verified. | Agent |
|
||||
| 2026-01-06 | HLC-010 DONE: Created HybridLogicalClockBenchmarks.cs with 12+ performance benchmarks: tick throughput (single-thread 100K/sec target, multi-thread 50K/sec, with time advance), receive throughput (50K/sec), parse/serialize throughput (500K/sec), comparison throughput (10M/sec), memory allocation tests (value type verification, reasonable struct size), InMemoryStateStore throughput (save 100K/sec, load 500K/sec). Uses xUnit Facts with TestCategories.Performance trait. Build verified. | Agent |
|
||||
| 2026-01-06 | HLC-012 DONE: Created comprehensive README.md with: overview and problem statement, installation and quick start, DI registration (3 patterns), core types reference (HlcTimestamp, IHybridLogicalClock, IHlcStateStore), PostgreSQL persistence schema, JSON serialization (string and object formats), Npgsql/Dapper type handlers, clock skew handling, recovery from restart, testing patterns, HLC algorithm pseudocode, performance benchmarks table, and academic references. Sprint complete. | Agent |
|
||||
>>>>>>>> 47890273170663b2236a1eb995d218fe5de6b11a:docs-archived/implplan/SPRINT_20260105_002_001_LB_hlc_core_library.md
|
||||
>>>>>>> 47890273170663b2236a1eb995d218fe5de6b11a
|
||||
|
||||
## Next Checkpoints
|
||||
|
||||
|
||||
@@ -419,22 +419,6 @@ public sealed class SchedulerOptions
|
||||
| Date (UTC) | Update | Owner |
|
||||
|------------|--------|-------|
|
||||
| 2026-01-05 | Sprint created from product advisory gap analysis | Planning |
|
||||
<<<<<<< HEAD:docs/implplan/SPRINT_20260105_002_002_SCHEDULER_hlc_queue_chain.md
|
||||
| 2026-01-06 | SQC-001: Added HLC and CanonicalJson references to Scheduler.Persistence and Scheduler.Queue projects | Agent |
|
||||
| 2026-01-06 | SQC-002-004: Created migration 002_hlc_queue_chain.sql with scheduler_log, batch_snapshot, chain_heads tables | Agent |
|
||||
| 2026-01-06 | SQC-005-008: Implemented SchedulerChainLinking, ISchedulerLogRepository, PostgresSchedulerLogRepository, IChainHeadRepository, PostgresChainHeadRepository | Agent |
|
||||
| 2026-01-06 | SQC-009: Implemented HlcSchedulerEnqueueService with chain linking and idempotency | Agent |
|
||||
| 2026-01-06 | SQC-010: Implemented HlcSchedulerDequeueService with HLC-ordered retrieval and cursor pagination | Agent |
|
||||
| 2026-01-06 | SQC-013: Implemented BatchSnapshotService with audit anchoring and optional DSSE signing | Agent |
|
||||
| 2026-01-06 | SQC-015: Implemented SchedulerChainVerifier for chain integrity verification | Agent |
|
||||
| 2026-01-06 | SQC-020: Added SchedulerHlcOptions with EnableHlcOrdering, DualWriteMode, VerifyOnDequeue flags | Agent |
|
||||
| 2026-01-06 | SQC-022: Implemented HlcSchedulerMetrics with enqueue, dequeue, verification, and snapshot metrics | Agent |
|
||||
| 2026-01-06 | Added HlcSchedulerServiceCollectionExtensions for DI registration | Agent |
|
||||
| 2026-01-06 | SQC-011-012: Verified Redis and NATS adapters already have HLC support (IHybridLogicalClock injection, Tick(), header storage) | Agent |
|
||||
| 2026-01-06 | SQC-021: Created HLC migration guide at docs/modules/scheduler/hlc-migration-guide.md | Agent |
|
||||
| 2026-01-06 | SQC-014: Implemented BatchSnapshotDsseSigner with HMAC-SHA256 signing, PAE encoding, and verification | Agent |
|
||||
| 2026-01-06 | SQC-019: Updated JobRepository with optional HLC ordering via JobRepositoryOptions; GetScheduledJobsAsync and GetByStatusAsync now join with scheduler_log when enabled | Agent |
|
||||
=======
|
||||
| 2026-01-06 | SQC-001 DONE: Added HybridLogicalClock project reference to StellaOps.Scheduler.Persistence and StellaOps.Scheduler.Queue. Build verified. | Agent |
|
||||
| 2026-01-06 | SQC-002-004 DONE: Created 002_hlc_queue_chain.sql migration with: scheduler_log (HLC-ordered queue with chain linking), batch_snapshot (audit anchors with optional DSSE), chain_heads (per-partition head tracking), and upsert_chain_head function for atomic monotonic updates. | Agent |
|
||||
| 2026-01-06 | SQC-005-007 DONE: Created entity models (SchedulerLogEntity, BatchSnapshotEntity, ChainHeadEntity), ISchedulerLogRepository interface (insert, HLC-ordered query, range query, job/link lookup), SchedulerLogRepository (transactional insert with chain head update), IChainHeadRepository (get, upsert with monotonicity), ChainHeadRepository. Build verified. | Agent |
|
||||
@@ -457,7 +441,6 @@ public sealed class SchedulerOptions
|
||||
| 2026-01-06 | SQC-014 DONE: Created ISchedulerSnapshotSigner interface with SignAsync() method and SnapshotSignResult record. Updated BatchSnapshotService to optionally sign snapshots when SignBatchSnapshots=true and signer is available. Added ComputeSnapshotDigest() for deterministic SHA-256 digest. Build verified. | Agent |
|
||||
| 2026-01-06 | SQC-019 DONE: Created HlcJobRepositoryDecorator implementing decorator pattern for IJobRepository. Supports dual-write mode (writes to both scheduler.jobs AND scheduler.scheduler_log) and HLC ordering for dequeue. Uses ISchedulerLogRepository.InsertWithChainUpdateAsync for atomic chain updates. Build verified. | Agent |
|
||||
| 2026-01-06 | SQC-017 DONE: Created HlcSchedulerPostgresFixture.cs (PostgreSQL test fixture with Testcontainers, scheduler schema migrations, table truncation) and HlcSchedulerIntegrationTests.cs with 13 integration tests: EnqueueAsync_SingleJob_CreatesLogEntryWithChainLink, EnqueueAsync_MultipleJobs_FormsChain, EnqueueAsync_UpdatesChainHead, DequeueAsync_ReturnsJobsInHlcOrder, DequeueAsync_EmptyQueue_ReturnsEmptyList, DequeueAsync_RespectsLimit, VerifyAsync_ValidChain_ReturnsTrue, VerifyAsync_EmptyChain_ReturnsTrue, GetByHlcRangeAsync_ReturnsJobsInRange, Enqueue_DifferentTenants_MaintainsSeparateChains, EnqueueAsync_DuplicateIdempotencyKey_ReturnsExistingJob, VerifySingleAsync_ValidEntry_ReturnsTrue, VerifySingleAsync_NonExistentJob_ReturnsFalse. Properly aligned API with SchedulerJobPayload, SchedulerEnqueueResult, SchedulerDequeueResult, ChainVerificationResult, and correct service constructors. Build verified. | Agent |
|
||||
>>>>>>> 47890273170663b2236a1eb995d218fe5de6b11a:docs-archived/implplan/SPRINT_20260105_002_002_SCHEDULER_hlc_queue_chain.md
|
||||
|
||||
## Next Checkpoints
|
||||
|
||||
|
||||
Reference in New Issue
Block a user