Repository navigation
ShellGuard v0.0.2.5
π¦ ShellGuard β Release v0.0.2.5
"The Bitwarden Item Integrity & Relational Molt" β Phase 23: Bitwarden-Model Item Integrity, Attachment Parent Enforcement & Dashboard Type Truth
ClawStack Studios Β©β’ Β· 2026-10-17 Β· AGPL-3.0
The reef ascends to total relational integrity. ShellGuard v0.0.2.5 (Build 27) aligns the vault data model strictly with the Bitwarden Item Integrity Model β enforcing that binary attachments are strictly child components of parent vault items, quarantining orphaned attachments non-destructively, validating note credential rejection, ensuring transactional relational cascades, exposing pre-flight storage quota capacity, and polishing the Vault Dashboard for pure type-truthfulness.
βββββββββββ ββββββββββββββ βββ βββββββ βββ βββ ββββββ βββββββ βββββββ
βββββββββββ ββββββββββββββ βββ βββββββ βββ βββ ββββββββ ββββββββ ββββββββ
ββββββββββββββββββββββ βββ βββ βββ ββββ βββ βββ ββββββββ ββββββββ ββββββββ
ββββββββββββββββββββββ βββ βββ βββ βββ βββ βββ ββββββββ ββββββββ βββββββ
βββββββββββ βββββββββββββββββββββββββββ βββββββββββββββββ βββ βββ βββ βββ βββββββ
βββββββββββ βββββββββββββββββββββββββββ βββββββ βββββββ βββ βββ βββ βββ ββββββββ
~ **ClawStack StudiosΒ©β’** ~
π The Core Summary
Welcome to v0.0.2.5 (Build 27) of ShellGuard! This release establishes end-to-end structural fidelity between the frontend interface and the Bedrock database schema. In adherence to the Bitwarden Item Integrity Model, binary attachments can never be created as standalone vault recordsβthey exist solely as encrypted child components bound to a parent item (Passwords, Credit Cards, Identities, Secure Notes, and SSH Keys). Orphaned or unparented attachments are swept into a safe, non-destructive quarantine ledger with forensic audit logging, while deleted attachments cleanly cascade out of parent reference arrays.
π Key Themes & Highlights
π‘οΈ 1. Bitwarden-Model Item Integrity & Parent Enforcement (Task 45)
- Mandatory Parent Linkage (
src/server/routes/attachments.ts): ThePOST /api/attachmentsendpoint now strictly requires validparent_idandparent_typefields (pearl,note,key). Standalone attachment creation is structurally forbidden and returns400 Bad Request. - Atomic Transaction Linkage: When an attachment is uploaded, the parent item's
attachmentsJSON ID array is updated within the exact same database transaction, eliminating partial creation states. - Migration 0009 (
0009_attachment_integrity.up.sql): Applied schema upgrades tovault_secure_attachmentsenforcing parent association columns and indices. - Zero-Knowledge Invariant Preserved: Attachment payloads (
file_data) remain opaque AES-256-GCM ShellCryption BLOBs. The server enforces relationship integrity without ever inspecting decrypted file bytes.
π§Ή 2. Non-Destructive Orphan Attachment Quarantine & Audit Logging
- Boot & Runtime Sweeper (
src/server/utils/attachmentIntegrity.ts): BuiltquarantineOrphanAttachments()which scans for unparented or dangling attachment records and flags themis_quarantined = 1. - Sacred Data Protection: Quarantined attachments are hidden from standard vault lists and download routes, but are never silently deleted. User data remains preserved on disk.
- Forensic Audit Redaction: Every quarantine action records an
ATTACHMENT_QUARANTINEDevent in the segregatedaudit.sqlitedatabase.
β‘ 3. Relational Cascading, Sweeper & Pre-Flight Quota (Sub-Stage 25.1)
- Relational Cascade on Delete: Calling
DELETE /api/attachments/:idatomically removes the deleted attachment's ID from its parent item'sattachmentsJSON array acrossvault_pearls,vault_secure_notes, andvault_ssh_keys, preventing dangling ghost IDs. - On-Demand Runtime Sweeper Endpoint: Exposed
POST /api/attachments/quarantine/sweepfor administrators and maintenance workflows to sweep and isolate orphaned attachments on demand without rebooting the server. - Pre-Flight Quota Inspection: Exposed
GET /api/attachments/quotareturning{ used_bytes, quota_bytes, remaining_bytes }based onGROTTO_QUOTA_MB, enabling client dropzones to pre-validate available space before initiating uploads.
π 4. Note Credential Rejection Invariant
- Form-Contract Guard (
src/server/validation/schemas.ts): Secure Notes strictly reject payloads containing credential fields such assecret. Secure Notes remain purely document and markdown ledgers, preventing improper credential leakage.
π¨ 5. Dashboard Type Truth & Add-Menu Correction (Task 46)
- Add-Menu Simplification (
Header.tsx): Removed the'π Attachment'entry from the+Add Item dropdown menu. Attachments are created and managed exclusively within their parent item's modal. - Item List Type Truth (
ItemListPane.tsx,VaultShell.tsx): Master item lists strictly present primary vault items (Passwords, Secure Notes, SSH Keys, Cards, Identities). Attachments render solely within their parent's detail pane. - Deterministic Type Ordering: Items sort predictably by type: Passwords β Cards β Identities β Secure Notes β SSH Keys, with recency sorting within each group.
π 6. Canonical Root AGENTS.md Governance Contract
- High-Agency Skill-Seed: Established repository root
AGENTS.mdarticulating project philosophy, core invariables, immutable rules, architecture mapping seams, and tool bindings.
ποΈ Architectural Topology Map
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Client Layer (React 19 + Vite 6) β
β βββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββ β
β β Header Add-Item + β β ItemListPane β β
β β (Passwords, Cards, β β (Deterministic Type Sort Order: β β
β β Identities, Notes, β β Passwords β Cards β Identities β β β
β β SSH Keys β No Atts) β β Notes β SSH Keys) β β
β βββββββββββββ¬ββββββββββββββ ββββββββββββββββββββ¬ββββββββββββββββββββ β
β β β β
β βΌ βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β ItemDetailPane / ItemFormModal β β
β β (Attachments bound strictly as children to parent item's JSON ID) β β
β βββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β (REST with Parent Linkage)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Server & API Layer (Express 5 Security Kernel) β
β βββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
β β POST /api/attachments β DELETE /api/attachments/:id β β
β β (Requires parent_id + parent_type)β (Cascades parent JSON IDs) β β
β βββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ€ β
β β POST /api/attachments/quarantine β GET /api/attachments/quota β β
β β (Runtime sweep orphaned records) β (Returns quota capacity stats)β β
β βββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ποΈ Bedrock Storage (SQLite + SQLCipher) β
β βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ β
β β vault_secure_attachments β <βββ> β vault_pearls / notes / keys β β
β β (parent_id, parent_type, β β (attachments JSON ID array β β
β β is_quarantined) β β updated in transaction) β β
β βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ Verification Receipts
- Unit & Integration Test Oracle: 29 test suites, 341 tests passing 100% green (1 skipped).
- TypeScript Strict Check:
tsc --noEmitpassed with 0 errors. - Production Vite Build: Compiled cleanly without warnings or errors.
- VitePress Documentation Portal: Built cleanly in 100% compliance with Docs-as-Code.
- Cloud CI Pipeline: GitHub Actions Run
#39023257850passed 100% green across all verification matrices in 1m 32s.