Skip to content

write_knowledge emits a WriteEvent file per object with no consumer gitignore #37

Description

@RichardHightower

Summary

Every successful write_knowledge creates knowledge/write-events/{unix}-{hex}.md and refreshes that catalog. A 67-object Fabric capture produced 70+ WriteEvent files. They are not in templates/gitignore-fragment (**/.index/ only). Consumer brains either commit noise or leave untracked floods.

Doctor then counts WriteEvent as a first-class type.

Repro

python3 scripts/dekc_capture.py table --name foo --layer bronze
ls knowledge/write-events/

Expected

  • WriteEvents optional (DEKC_WRITE_EVENTS=0 or --no-write-event).
  • Default off for bulk walk/capture, on for session isolation if desired.
  • Fragment gitignore: knowledge/write-events/ except index.md, or the whole dir.
  • Do not refresh a global catalog of timestamps on every table.

Code

def emit_write_event(...):
    event_id = f"{int(datetime.now(timezone.utc).timestamp())}-{secrets.token_hex(3)}"
    ev_rel = f"write-events/{event_id}.md"
    ...
    write_concept(bundle, ev_rel, fm, body, force=True)
    ensure_catalog_index(bundle, "write-events", "Write Events")

write_knowledge(..., emit_event=True) default.

templates/gitignore-fragment documents .index/ only.


Found on: DEKC 0.4.1 (GitHub Latest 2026-08-24), mixed PKC+SAC+DEKC second brain, Azure Fabric reverse-engineering walk.
Not a sample-knowledge issue. Repro used live capture scripts from spillwave-second-brain cache data-engineering-knowledge-capture/0.4.1/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions