Skip to content

wiki-audit: knowledge pipeline hardening — gate bypass window, checkable dedup evidence, harvest caps #39

Description

@choiyounggi

Finding (wiki-audit 2026-08-05, axis: harvest/flush pipeline)

Fixed on branch fix/harvest-dedup-processed: processed-store dedupe in harvest.js, quoted/$HOME --body-file parsing in pre-flush-pr-gate.sh, SKILL literal-path guidance, retire-dropped-candidates clarification (21 bats tests).

Residual hardening candidates (plans/wiki-audit/findings/pipeline.md):

  1. Gate bypass window: flush detection is command-marker-only (--head knowledge/, label, INGEST_REPORT). A gh pr create --body inline with no label and head inferred from the current branch engages nothing. Tightening options: also match --title "knowledge:"; have the flush prompt forbid --body.
  2. Existing-layer check is free prose: the gate proves the section exists, not that wiki pages were read. Option: require the report to list page ids read, machine-checkable against wiki/**.
  3. No per-session harvest cap: the instruction says 0–3 insights/session but harvest.js enforces none; a runaway session could queue dozens and burn a headless auto-flush run.
  4. Empty per-session queue files accumulate (~35 observed) — cosmetic cleanup in harvest or flush.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions