๐Ÿ“ COI_Blueprint_Summary.mdv4.5 · 2026-09-28

COI Blueprint: Summation

/**
* ========================================================
* Module: COI_Blueprint_Summary.md
*
* @version 1.0
* @date 2026-09-29
*
* Another collaboration between Andrew.human and Claude.ai
* ========================================================
*/

DM2S/NX v9.9, Chapter 6 ยท designed 29/09/2026, 00:59โ€“03:24 AEST Companion files: COI_Blueprint_Transcript.md (verbatim) ยท COI_Pseudocode_v0.1.md (skeleton)


1. Why COI exists

In one evening, three index entries were found telling lies about Live: 2419 was listed after it had been deleted, and 6982/6998 were missing from media_store. None was caused by an outsider. Each came from a sensible-looking move, by Andrew or by Claude, made without checking how the links fit together. The threat is the "bright idea" made in ignorance, not illogic. The only users are also the only threat, so the defence has to work whether or not anyone remembers the rules.

2. The Chain-of-Integrity

.json entry โ”€โ”€โ–บ SMF DB row โ”€โ”€โ–บ file in attachments / attachments2 โ”€โ”€โ–บ back to .json

Every link is a yes/no question to SMF. Classifier "features" (genre, BPM quality) are out of scope, because they're opinions, not facts that can be checked.

3. The rules

  1. SMF is gospel. Everything is built next to SMF, never on top of it. COI reads SMF and never writes to it. The two exceptions (restoring a file, rescuing an orphan) are manual only.

  2. Live is the boss. Every store is judged against Live's SMF, including the audio store Clone builds.

  3. Ownership:

    Machine Audio stores Every other store
    Dev R/O R/O
    Clone R/W R/O
    Live R/O (arrives only by the push) R/W
  4. Every .json store is locked (chattr +i) at rest, on every machine, owned or not. That's what makes the stores rsync-proof.

  5. The daily check reports only. It never fixes, unlocks or writes.

  6. Fixes run only when Andrew types them, after reading the report.

4. The parts

Part What it does
Ownership file (per machine, outside every rsync path) States what this machine may write
Shared enforcer (same code on all three machines) Checks ownership before a write, locks and unlocks stores, reports status
Mirror / push scripts (names unchanged) The only routine unlockers, with a trap that re-locks on any exit
Hard-link protection A second name for every attachment in a locked directory on the same filesystem: rm -f survivable, unticking still free
Daily chain check (Live, cron, read-only) Tests every link and grades the result RC 0 / 4 / 8
Manual fix commands Remove entry, restore file, release link, re-index on the owner

Stores are saved by temp file + rename, never written in place, so a crash can't leave a half-written store. rsync already works this way.

5. What the daily check can tell apart

DB row File Protected link Meaning Fix (manual)
yes yes yes normal none
yes no yes deleted outside SMF restore from link
no no yes Andrew unticked it release link after grace period
no yes yes DB restore or orphan investigate / Orphan Master Post

For each store: an entry with no DB row โ†’ remove the entry. A DB row with no entry โ†’ index it on the owning machine.

RC 0 = intact ยท RC 4 = a few breaks ยท RC 8 = mass break (restore / rsync / rm -f): fix nothing, investigate.

6. Ideas considered and rejected (and why)

Idea Why not
Extend SMF's own attachment maintenance Its repair step deletes; there's no hook to change that; it runs in the browser; half the chain is Python
Lock the attachment files themselves Andrew unticks attachments all the time. Locked files would pile up as fake orphans, and the Orphan Master Post rescue would resurrect them
A shared lock DB as the enforcement Advisory only, like ENQ/DEQ; it doesn't stop a program that ignores it. Kept only as a possible "mirror wait" if the code turns out to write stores in place
Auto-fixing daily check After a DB restore it would delete valid entries and add to the damage
Tag in post bodies recording attachments A second record of the same fact, which goes out of step. Deferred instead: [attstate] using the real ID and asking the DB live

7. Who does what

Claude Andrew
Writes COI โœ”
Writes COI's manual (mandatory convention) โœ”
Plants faults and judges the checker โœ” (never the author)
Sends COI out for cross-model review with the design โœ”
Decides the open items (ยง9) โœ”
Types any fix โœ”

The buck stops with the human. The AI forgets between sessions and has nothing at stake. The human carries the history and the consequences.

8. Limitations, stated plainly

Claude's:

Andrew's (his own words): also "the UBER IDIOT sometimes". He doesn't read AI-written code, on principle. He's the sole director. The riskiest operator is the one working at 3 AM.

COI's:

Suggested, Andrew's call: manual fixes wait for daylight.

9. Open decisions (Andrew's remit)

  1. Ownership file name and location
  2. Protected hard-link directory (same filesystem as both attachment folders)
  3. Grace period before an unticked attachment's link is released
  4. RC 4 / RC 8 threshold
  5. Report location; whether RC 8 alerts or just logs
  6. Posts chain (post_store, word_index against messages): v1 or later
  7. Shared "mirror wait" lock: only if the code shows in-place writes
  8. [attstate] and references between posts: what readers see when an attachment is gone (later version)

10. Next steps

  1. Andrew sends the zip: The_ISE_Project/, /bin/mirrorISE_Clone, /bin/json_push_audio_Clone_to_Live, Dev's mirror.
  2. Andrew runs on Live: df of both attachment folders, and the smf_settings query for the upload dirs and cache_enable.
  3. Claude checks how each indexer saves its store, then writes COI v1 plus its manual.
  4. Cross-model review (design + code) via the orchestrator team.
  5. Andrew plants the faults on Clone and judges the result.

"The GOLD is in INTEGRITY VERIFICATION/ENFORCEMENT." (Andrew, 29/09/2026)