Skip to content

feat: extend #203 git-derived trust tiers to the .uf/dewey/ workspace layout (compiled/ and knowledge/) #210

Open

Description

@jflowers

Summary

#203's git-is-source-of-record trust derivation — validated requires a canonical tier: validated frontmatter claim AND file-blob equality with the fetched <remote>/<default-branch> ref — currently covers only vault-root compiled/ and knowledge/ page families. Every real compiled article in the reference deployment lives at .uf/dewey/compiled/*.md (the workspace layout), so "merge = vouch" never manifests in dewey doctor/dewey status for them: the vouch is recorded in git (the merged, code-owner-approved PR on the article path), but the display never surfaces it.

Verified gap (five code-traced root causes)

  1. gitref.TrustPathspecs() returns ["compiled", "knowledge"] — git ls-tree -r <ref> -- compiled knowledge does not match .uf/dewey/compiled/x.md (a git pathspec compiled matches only the top-level path; verified empirically).
  2. vault.isGitTrustPage requires the page name/path prefix compiled/ or knowledge/ — .uf/dewey/compiled/auth does not match; compiled/auth does.
  3. No ingestion route reads .uf/dewey/compiled/** files at all: the disk source skips hidden directories (ignore/matcher.go hidden-dir baseline), the vault scan (vault.Client.Load) skips hidden directories too, and dewey index has no compiled-files re-ingestion pass (only reIngestLearnings for learnings). Compiled DB pages are written solely by store_compiled/compile with their own tier (draft).
  4. queryTrustStatus (cli.go, backs the dewey doctor/dewey status Trust Tiers section) walks <vault>/compiled and <vault>/knowledge — 0 files in the workspace layout.
  5. Precedent contrast: tools/curate.go IndexKnowledgeStore handles arbitrary store locations by passing the store-relative pathspec to NewPageBlobResolver — compiled pages have no equivalent route.

Evidence

  • Scratch-repo binary proof (2026-11-15, built from 018-weekly-distill-automation HEAD 96c43d1):
    • Workspace layout: .uf/dewey/compiled/auth.md with tier: validated, committed, refs/remotes/origin/main = HEAD. dewey status --vault . → "Files: 0 compiled/knowledge file(s): 0 validated-eligible". dewey index → 0 documents (disk source skips .uf).
    • Vault-root layout (same ref state): compiled/auth.md (tier: validated) + knowledge/team.md (tier: draft). dewey status --vault . → "Files: 2 compiled/knowledge file(s): 1 validated-eligible, 0 differing".
  • Real repo check (via gh api): unbound-force/unbound-force has no top-level compiled/; its compiled articles live at .uf/dewey/compiled/*.md (e.g. change-management.md with tier: validated), sources.yaml disk-local path . — the reference deployment is entirely in the uncovered layout. 38 validated-claiming articles at .uf/dewey/compiled/*.md are affected today.
  • feat: git is the source of record for page trust tiers #203's own design.md problem statement ("Measured on unbound-force/main 2026-11-13, 38 of 39 compiled articles say tier: validated in git and ingest as draft everywhere") measured the .uf/dewey/compiled articles — but the shipped fix's fixtures (vault/tier_wiring_test.go, tools/promote_git_test.go) all use vault-root compiled/, so the workspace layout was never covered.

Proposed direction

Match #203's design intent ("one git ls-tree -r <ref> -- <source-paths> per source per index"):

  • Add .uf/dewey/compiled and .uf/dewey/knowledge to the gitref trust pathspecs (alongside vault-root compiled/knowledge).
  • Extend the vault page classification (isGitTrustPage or equivalent) to recognize the workspace-layout page families (doc.ID / page-name normalization).
  • Add an ingestion route that reads .uf/dewey/compiled/** / .uf/dewey/knowledge/** files (mirroring reIngestLearnings and the IndexKnowledgeStore precedent of passing store-relative pathspecs to NewPageBlobResolver).
  • Extend queryTrustStatus's walk (the doctor/status Trust Tiers section) to the workspace paths.
  • Backward compatible: the vault-root layout keeps working unchanged.

Origin

Found during #193 (018-weekly-distill-automation) Phase 8 implementation, when the US6 e2e could not verify the vouch display for the distill pipeline's own output paths (distill articles are written to .uf/dewey/compiled/<theme>.md). The remediation decided for #193 is "document + follow-up issue" — this is that issue. Until it lands, #193's spec documents the limitation honestly: the vouch for workspace-layout articles is the merged, code-owner-approved PR recorded in git, while dewey doctor/dewey status surface the display for vault-root layouts only.

Refs: #203 (design intent), #193 (origin), #153 (epic).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions