Add an incremental SHA-256 library for the browser and node tests

This commit is contained in:
Claude
2026-09-30 07:27:31 +00:00
parent a27788a80a
commit b56be586ee
7 changed files with 169 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ green, app boots with no JS errors, P2P on by default, offline boot works).
| 008 | 008-p2p-schema-and-config-127966 | Add P2P tables, config flags and db helpers | done | Add P2P tables, config flags and db helpers | P2P ON, malware scan OFF by default |
| 009 | 009-server-content-hash-186e7f | Hash every validated server copy and register it as verified content | done | Hash every validated server copy and register it as verified content | uses plans/patches/009-* |
| 010 | 010-views-and-retention-d0c6ca | Count views and evict server copies by retention criteria before LRU | done | Count views and evict server copies by retention criteria before LRU | |
| 011 | 011-browser-sha256-e1793d | Add an incremental SHA-256 library for the browser and node tests | in-progress | | |
| 011 | 011-browser-sha256-e1793d | Add an incremental SHA-256 library for the browser and node tests | done | Add an incremental SHA-256 library for the browser and node tests | |
| 012 | 012-device-file-registry-288d55 | Add the on-device IndexedDB file registry and hash saves while downloading | queued | | browser harness |
| 013 | 013-device-identity-and-holdings-3ba493 | Register devices and report verified holdings to the server | queued | | persistent holders, no TTL |
| 014 | 014-p2p-presence-hub-ceced8 | Add the /ws/p2p presence and signalling hub and the holders endpoint | queued | | stale flag, never hidden |

View File

@@ -240,3 +240,9 @@ test('update after digest throws; isHex', () => {
assert.ok(!Sha256.isHex('ABC'));
});
```
## Execution log
- Executor: in-session Agent (haiku). Attempts: 1. Fix rounds: 0.
- Orchestrator re-ran Verification: `sha256.js` and `sha256.test.js` byte-identical to the tested versions; `node --test frontend/*.test.js` 56 pass / 0 fail; `abc` digest `ba7816bf...15ad`; index.html and sw.js each reference `sha256.js` once; the CLAUDE.md change is the single plan-authorized line.
- Executor Findings (verbatim): All steps completed successfully. Two new files created (frontend/sha256.js and frontend/sha256.test.js copied verbatim from appendices). Three existing files modified: index.html (script tag added), sw.js (SHELL array entry added), CLAUDE.md (Testing list updated). All verification commands passed: unit tests 56 pass/0 fail; sha256 hash correct; sha256.js referenced exactly once in each of index.html and sw.js.