Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
806da37
Capture power-loss recovery and administrative replay direction
poef Sep 19, 2026
d522359
Establish power-loss and administrative recovery understanding
poef Sep 19, 2026
b1f15b5
Define power-loss durability and recovery acceptance criteria
poef Sep 19, 2026
9fbdf89
Open power-loss durability and administrative recovery cycle
poef Sep 19, 2026
88fbfad
Design independent power-loss baseline and fault matrix
poef Sep 19, 2026
0766186
Add power-loss fault matrix and independent baseline tests
poef Sep 19, 2026
40f8739
Record power-loss baseline failures and recovery evidence
poef Sep 19, 2026
f48e92e
Design durable publication and ordered input-complete command records
poef Sep 19, 2026
065cc52
Design guarded administrative recovery and consistent backup restoration
poef Sep 19, 2026
6a8cd61
Record completed design step and explicit compatibility rollout
poef Sep 19, 2026
d70a935
Reconcile recovery design with explicit compatibility rollout
poef Sep 19, 2026
67be05c
Record design-only constraint to retain existing store formats
poef Sep 19, 2026
682d405
Design durable writes and complete commands within existing formats
poef Sep 19, 2026
d27a8d3
Keep administrative recovery and cycle scope within existing store fo…
poef Sep 19, 2026
b064824
Clarify recovery digest verification precedes commit
poef Sep 19, 2026
8a42ed1
Record command log as the authoritative command order
poef Sep 19, 2026
088e389
Require execution and reconstruction to follow command-log order
poef Sep 19, 2026
dc7f50c
Align recovery guards and cycle expectations with command-log authority
poef Sep 19, 2026
9fecb10
Record authorization to complete the power-loss recovery cycle
poef Sep 19, 2026
59179b6
Carry corrected durability design into authorized implementation
poef Sep 19, 2026
049c456
Implement durable log-ordered commands and guarded administrator reco…
poef Sep 19, 2026
13db3bf
Verify exact suffix recovery and backup loss examples
poef Sep 19, 2026
14c6400
Record regression and ext4 power-cut recovery evidence
poef Sep 19, 2026
eafac5d
Prepare power-loss recovery cycle for human acceptance
poef Sep 19, 2026
80a1633
Record preference for explicit control-flow braces
poef Sep 19, 2026
941a96e
Use explicit control-flow blocks throughout cycle code
poef Sep 19, 2026
f51752d
Put block contents and closing braces on separate lines
poef Sep 19, 2026
5292724
Record JAQT readability refactor request
poef Sep 19, 2026
49fa48c
Clarify recovery queries and diagnostics with JAQT
poef Sep 19, 2026
dc4e0af
Record JAQT refactor verification and review status
poef Sep 19, 2026
f14d13e
Record conditional-expression and line-width preferences
poef Sep 19, 2026
5d166a2
Simplify conditionals and wrap cycle code near 80 columns
poef Sep 19, 2026
8cd6e7e
Record conditional and width refactor verification
poef Sep 19, 2026
8d6590f
Record example initialization and converter correction request
poef Sep 19, 2026
9b4a340
Clarify example build script scope
poef Sep 19, 2026
d4136ea
Fix URL conversion and add example npm build
poef Sep 19, 2026
8d2b700
Record example build and startup verification
poef Sep 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
267 changes: 267 additions & 0 deletions .spiral/cycles/CYC-20260919-TTZ7C-17.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions .spiral/cycles/CYC-20260919-TTZ7C-17.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@prefix sd: <https://muze.nl/ns/spiral-developer#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix project: <https://github.com/simplyedit/simplystore/spiral#> .

project:CYC-20260919-TTZ7C-17
a sd:Cycle ;
dcterms:identifier "CYC-20260919-TTZ7C-17" ;
sd:repositoryPath ".spiral/cycles/CYC-20260919-TTZ7C-17.md" ;
sd:status sd:Active ;
sd:derivedFrom [
a sd:ArtifactReference ;
sd:artifact project:REQ-20260919-TTZ7C-20 ;
sd:gitCommit "b1f15b5964986a9e3cab9025f08829b88294974c"
] ;
sd:constrainedBy [
a sd:ArtifactReference ;
sd:artifact project:SRC-20260919-TTZ7C-18 ;
sd:gitCommit "8a42ed15242c174a296eb90ed4a35b3354d79e8d"
] ;
sd:changeCausedBy [ a sd:ArtifactReference ;
sd:artifact project:SRC-20260919-TTZ7C-18 ;
sd:gitCommit "9fecb10ba1b58c79779394130e1c5cf500206ea9" ] .
69 changes: 69 additions & 0 deletions .spiral/designs/DES-20260919-TTZ7C-21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Design: Power-Loss Baseline Harness

## Purpose and boundary

Implement the first work item of CYC-20260919-TTZ7C-17: discriminating baseline
tests and a failure matrix before persistence/recovery fixes. The design follows
REQ-20260919-TTZ7C-20. Product behavior remains unchanged in this slice.

Use actual server/worker writes with a test-only Node preload. Trace completed
file operations and syncs outside the disposable store; capture synchronized
bytes for the small fixture logs. Independently record client-issued commands,
observed acceptance, and observed completion. The expected state comes from
fixture semantics and external observations, never solely from damaged logs.

The preload is explicitly enabled only by a test configuration and is inherited
by worker threads. Scope interception to the disposable store. Capture filesystem
function references before wrapping so tracing cannot recurse. Controls must
prove that instrumentation observes real appends, file syncs, and renames.

## Fault model

- Trace file sync and namespace publication separately. After abrupt process
termination, remove a newly created/renamed filename only when its trace shows
no subsequent directory sync. Such image edits model a permitted persistence
outcome; they are not physical power cuts or measured filesystem behavior.
- At an explicit pause before a log sync, restore its last successfully synced
byte snapshot. Only unsynced data may be lost in this model. Preserve external
acknowledgments and side-effect witnesses outside the crash image.
- Inject I/O errors before a selected operation, and a real partial callback
write where applicable. Assert that fault injection was actually reached.
- Torn/corrupt durable artifacts and synthetic recovery-status combinations are
separate adversarial/policy fixtures. Do not present arbitrary mutation of
previously synced bytes as a valid cache-loss model.
- A controlled append-completion gate can exercise concurrent acceptance order
without relying on timing races. Test that subsequent recovery does not derive
its expected order from the same log it is checking.

## Reporting and tests

Ordinary assertions verify setup, interception, completed operations, observed
responses, and current classifications. Known requirement violations appear in
nested tests marked TODO. `SIMPLYSTORE_BASELINE_STRICT=1` removes only those TODO
annotations, exposing reproducible failing invariant assertions with a nonzero
exit. A fixture/harness failure outside that final invariant remains a real
failure in normal baseline mode. Remove TODO annotations as later fixes earn it.

Cover durable acceptance/completion, missing directory entries, derived index
loss, interrupted status append, explicit sync/rename/write failures, automatic
replay with secondary effects, later-dataset rerun restrictions, command input
completeness, and concurrent queue order. Name untested matrix rows explicitly;
this baseline is not acceptance of the whole cycle or administrator tooling.

Add an isolated `test:power-loss` command and a human-readable matrix with test
names, expected/current results, and limitations. Existing suites stay separate
and are run as regression evidence. Only new test files, package test scripts,
and Spiral/documentation artifacts belong to this implementation slice.

## Independence and limits

External observations and side-effect witnesses survive every modeled cut and
are not reconstructed from the store under test. Fixture command behavior is
simple and known. The OD-JSONTag parser remains shared for reading actual bytes;
compare its output against independently expected values/order.

The trace covers the explicit filesystem APIs used by these fixtures, not all
Node/native/custom-module I/O. It cannot prove hardware flush honesty, torn-sector
semantics, mount behavior, cross-process writer exclusion, consistent backups,
or full administration/rebuild workflows. A disposable block-level exercise and
the remaining P1-P12 work are still required later in the active cycle.
11 changes: 11 additions & 0 deletions .spiral/designs/DES-20260919-TTZ7C-21.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@prefix sd: <https://muze.nl/ns/spiral-developer#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix project: <https://github.com/simplyedit/simplystore/spiral#> .

project:DES-20260919-TTZ7C-21 a sd:Design ;
dcterms:identifier "DES-20260919-TTZ7C-21" ;
sd:repositoryPath ".spiral/designs/DES-20260919-TTZ7C-21.md" ;
sd:status sd:Active ;
sd:satisfies [ a sd:ArtifactReference ;
sd:artifact project:REQ-20260919-TTZ7C-20 ;
sd:gitCommit "b1f15b5964986a9e3cab9025f08829b88294974c" ] .
Loading
Loading