graphmark 0.5.0__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. {graphmark-0.5.0 → graphmark-0.7.0}/CHANGELOG.md +245 -0
  2. {graphmark-0.5.0 → graphmark-0.7.0}/PKG-INFO +72 -1
  3. {graphmark-0.5.0 → graphmark-0.7.0}/README.md +70 -0
  4. {graphmark-0.5.0 → graphmark-0.7.0}/docs/ROADMAP.md +67 -14
  5. {graphmark-0.5.0 → graphmark-0.7.0}/pyproject.toml +2 -2
  6. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/__init__.py +4 -1
  7. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/check.py +34 -2
  8. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/cli.py +11 -1
  9. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/config.py +4 -0
  10. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/graph.py +93 -4
  11. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/parse.py +32 -1
  12. graphmark-0.7.0/tests/test_aliases.py +256 -0
  13. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_check.py +7 -1
  14. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_diagnose.py +3 -1
  15. graphmark-0.7.0/tests/test_link_counts.py +207 -0
  16. graphmark-0.7.0/tests/test_links_report.py +171 -0
  17. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_parse.py +91 -0
  18. graphmark-0.7.0/tests/test_properties.py +322 -0
  19. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_public_api.py +2 -0
  20. {graphmark-0.5.0 → graphmark-0.7.0}/.gitignore +0 -0
  21. {graphmark-0.5.0 → graphmark-0.7.0}/LICENSE +0 -0
  22. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/dismiss.py +0 -0
  23. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/export.py +0 -0
  24. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/interfaces.py +0 -0
  25. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/metrics.py +0 -0
  26. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/model.py +0 -0
  27. {graphmark-0.5.0 → graphmark-0.7.0}/src/graphmark/py.typed +0 -0
  28. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/README.md +0 -0
  29. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/config.toml +0 -0
  30. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/expected.json +0 -0
  31. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/daily/2026-07-01.md +0 -0
  32. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/docs/alpha.md +0 -0
  33. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/docs/center.md +0 -0
  34. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/misc/echo.md +0 -0
  35. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/misc/foxtrot.md +0 -0
  36. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/misc/orphan.md +0 -0
  37. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/misc/stub.md +0 -0
  38. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/refs/beta.md +0 -0
  39. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/refs/delta.md +0 -0
  40. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/alt/vault/refs/gamma.md +0 -0
  41. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/dismiss/expected.json +0 -0
  42. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/dismiss/vault/.claude/data/connect-dismissed.json +0 -0
  43. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/dismiss/vault/alpha.md +0 -0
  44. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/dismiss/vault/beta.md +0 -0
  45. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/dismiss/vault/gamma.md +0 -0
  46. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/config.toml +0 -0
  47. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/expected.json +0 -0
  48. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/expected_oog.json +0 -0
  49. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/similar.json +0 -0
  50. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/similar_oog.json +0 -0
  51. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/vault/docs/a.md +0 -0
  52. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/vault/docs/hub.md +0 -0
  53. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/vault/misc/c.md +0 -0
  54. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/vault/misc/d.md +0 -0
  55. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/vault/refs/b.md +0 -0
  56. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/gaps/vault/refs/e.md +0 -0
  57. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/scoped/config.toml +0 -0
  58. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/scoped/expected.json +0 -0
  59. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/scoped/vault/docs/one.md +0 -0
  60. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/scoped/vault/junk/ignored.md +0 -0
  61. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/scoped/vault/misc/excluded.md +0 -0
  62. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/scoped/vault/refs/two.md +0 -0
  63. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/selflink/config.toml +0 -0
  64. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/selflink/expected.json +0 -0
  65. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/selflink/vault/a.md +0 -0
  66. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/selflink/vault/b.md +0 -0
  67. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/config.toml +0 -0
  68. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/expected.json +0 -0
  69. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/vault/brain/alpha.md +0 -0
  70. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/vault/brain/hub.md +0 -0
  71. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/vault/personal/beta.md +0 -0
  72. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/vault/personal/gamma.md +0 -0
  73. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/vault/reference/island.md +0 -0
  74. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/simple/vault/reference/stub.md +0 -0
  75. {graphmark-0.5.0 → graphmark-0.7.0}/tests/fixtures/suggest/README.md +0 -0
  76. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_build_filters.py +0 -0
  77. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_check_policy.py +0 -0
  78. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_cli.py +0 -0
  79. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_config.py +0 -0
  80. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_degenerate.py +0 -0
  81. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_dismiss.py +0 -0
  82. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_export.py +0 -0
  83. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_gaps.py +0 -0
  84. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_gaps_banding.py +0 -0
  85. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_gaps_oog.py +0 -0
  86. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_gaps_params.py +0 -0
  87. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_graph.py +0 -0
  88. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_graph_catalogs.py +0 -0
  89. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_metrics.py +0 -0
  90. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_model.py +0 -0
  91. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_packaging.py +0 -0
  92. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_pagerank.py +0 -0
  93. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_scoped.py +0 -0
  94. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_selflink.py +0 -0
  95. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_smoke.py +0 -0
  96. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_suggestions.py +0 -0
  97. {graphmark-0.5.0 → graphmark-0.7.0}/tests/test_unresolved.py +0 -0
@@ -1,6 +1,251 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v0.7.0 (2026-07-25)
5
+
6
+ ### Documentation
7
+
8
+ - Record the nine-vault corpus study ([#134](https://github.com/cdcoonce/graphmark/pull/134),
9
+ [`7495934`](https://github.com/cdcoonce/graphmark/commit/749593468e3d57913d89fc00942179786f5f5128))
10
+
11
+ graphmark has had exactly one real vault, and a coverage run showed the problem is worse than n=1:
12
+ that vault now has zero broken links, so it never executes the error handling at all —
13
+ suggest_notes entirely, the ambiguous / missing / out-of-scope verdicts, unresolved recording, and
14
+ diagnose(). 54% of the package is unexercised by it. The healthier it gets, the less it validates.
15
+
16
+ Nine third-party vaults, zero crashes — the first evidence for the README's 'any Obsidian-family
17
+ vault' claim. kepano's vault is 74% .base links, which independently justifies #101 and shows the
18
+ reference vault understated that class by 7x. Third-party vaults sit at 1.8-27% missing against
19
+ the reference vault's 0%.
20
+
21
+ That range confirms #127's closure against real data rather than argument: the largest
22
+ false-positive class this package has had moved missing by 0.4%, which no threshold can separate
23
+ from ordinary variation.
24
+
25
+ No new defects. Two suspicious distributions were both graphmark being right, and the second was my
26
+ own scoping error — I excluded English template directory names but not the Spanish 'Plantillas',
27
+ which is the methodological lesson worth recording for anyone repeating this.
28
+
29
+ - **roadmap**: Close Track E, open Track F — auditable link accounting
30
+ ([#128](https://github.com/cdcoonce/graphmark/pull/128),
31
+ [`4ca84de`](https://github.com/cdcoonce/graphmark/commit/4ca84de110dd288cd2778ccdc48a3b558367b269))
32
+
33
+ * docs(roadmap): close Track E, open Track F — auditable link accounting (#124-#127)
34
+
35
+ afk-driver --expand reads this file verbatim, so it has to describe where the work actually is.
36
+ Track E is closed at 0.6.0 (aliases were its last piece), and the baseline line still claimed
37
+ 0.3.4.
38
+
39
+ Track F names the real problem, which is not any individual bug but how bugs get found: all seven
40
+ correctness defects in this package's history came from a human reading link lists on the single
41
+ reference vault, six of them in one day. The frozen oracle is a ratchet, not a detector — it has
42
+ never surfaced anything new — and the one consumer's seam actively conceals package defects,
43
+ having hidden a 23-link alias error for six releases.
44
+
45
+ The mechanism of the hiding is that the buckets are silent: build sorts every display into one of
46
+ six reasons and reports one of them, and six of the seven bugs were mis-bucketing. Printing the
47
+ distribution would have made the alias gap obvious at a glance — zero alias-resolved beside 23
48
+ unresolved is visibly wrong.
49
+
50
+ So the epic is to make the package's own answers auditable: every display in exactly one named
51
+ bucket, counted, reported, and bound by a property-tested conservation law. Sliced #124-#127, with
52
+ the detector (#126) as the point of the exercise and its catch rate as the evidence.
53
+
54
+ Records what is deliberately deferred behind it and why: the Track D GitHub Action is an adoption
55
+ play this repo has already decided against, and shipping a gate that fails other people's builds
56
+ while our own accounting is unauditable is backwards ordering. Generality work is real but is a
57
+ feature list, not an epic — and Track F is what will say which parts of it matter.
58
+
59
+ * docs(roadmap): truth up Track D — seven classes, and the Action waits on Track F
60
+
61
+ Track D still read '0.3.4' and 'four false-positive classes', and promised the GitHub Action as the
62
+ next step, which now contradicts Track F's deliberate deferral. afk reads this file verbatim, so a
63
+ contradiction in it is a contradiction injected into the expander's prompt.
64
+
65
+ ### Features
66
+
67
+ - **cli**: Graphmark links — surface the classification distribution (#125)
68
+ ([#131](https://github.com/cdcoonce/graphmark/pull/131),
69
+ [`3ccf11c`](https://github.com/cdcoonce/graphmark/commit/3ccf11c26028c03739cfa88e67119c230645a22e))
70
+
71
+ Track F slice 2. Slice 1 made the classification countable; this makes it readable. Counts sitting
72
+ in a Python object are worthless to a vault owner, and that gap is not cosmetic: the six-release
73
+ frontmatter-alias defect was legible in this distribution the whole time — 23 links reported
74
+ broken beside zero resolved via alias — and nobody saw it because no surface printed it.
75
+
76
+ `graphmark links` emits the block as JSON on stdout with a one-line summary on stderr, so stdout
77
+ stays pipeable. `check`'s report carries the same block under `links`, appended after `checks` so
78
+ consumers already parsing that report keep working, and provably unable to change the verdict — a
79
+ test pins that a passing and a breaching run produce identical `links`.
80
+
81
+ The byte-stability oracle in test_check.py is updated rather than sidestepped, and now pins a
82
+ cross-check worth having: max_unresolved_links' actual equals counts.missing, so the gate's
83
+ flagship number and the distribution behind it cannot silently disagree.
84
+
85
+ Filed #130 along the way: every CLI example in the README fails. --config and --root live on the
86
+ parent parser, so argparse only accepts them before the subcommand, while the README documents the
87
+ opposite in all ten examples. It survived because the suite exclusively uses the working form, so
88
+ nothing exercised the documented one — the same shape as the rest of Track F, and the reason
89
+ #130's acceptance criteria require every README example to be executed by a test.
90
+
91
+ Mutation testing caught that the report's zero-fill was untested: build() seeds all six keys, so
92
+ only a directly constructed graph exercises it. Covered now.
93
+
94
+ - **graph**: Per-reason link counts and the conservation law (#124)
95
+ ([#129](https://github.com/cdcoonce/graphmark/pull/129),
96
+ [`4ba2ab6`](https://github.com/cdcoonce/graphmark/commit/4ba2ab65b32654af98f3987f2688c18af23c7f02))
97
+
98
+ Track F slice 1. build sorted every extracted display into one of the six DIAGNOSIS_REASONS and then
99
+ kept exactly one bucket plus the edges. The other outcomes were decided and discarded, and that
100
+ silence is why six of the seven correctness bugs in this package's history went unnoticed: each
101
+ was a mis-bucketing, and nothing in the output made an implausible distribution visible.
102
+
103
+ graph.link_counts accounts for every display, one bucket each, with all six keys always present in
104
+ DIAGNOSIS_REASONS order — a zero is a finding, so it must be reported rather than absent.
105
+ graph.alias_resolved counts resolutions reached through an alias, which is not a DIAGNOSIS_REASONS
106
+ value but is the distinction that would have made #119 visible.
107
+
108
+ LinkDiagnosis gains `via` ("stem" or "alias") so the counter reads the classifier's own verdict
109
+ instead of re-deriving it. Re-deriving is how the two would eventually disagree, which is the
110
+ failure this repo has spent Track E removing.
111
+
112
+ The conservation law — sum(link_counts.values()) equals the extractor's total — is asserted on a
113
+ vault exercising all six outcomes, on the frozen fixtures, and against the pre-existing surface
114
+ (unresolved occurrences == ambiguous + missing), so the new tally cannot drift from the old one.
115
+
116
+ On the live 521-note vault the payoff is legible in one line. Healthy: missing 0, alias-resolved 23.
117
+ The same vault with aliases disabled, which is what the six-release defect actually looked like:
118
+ missing 23, alias-resolved 0. Same 6226 total either way — nothing vanished, 23 links were in the
119
+ wrong bucket, and now you can see that.
120
+
121
+ Purely additive: no metric changes, frozen fixtures byte-identical.
122
+
123
+ ### Testing
124
+
125
+ - Property-based vault generation — Track F's detector (#126)
126
+ ([#132](https://github.com/cdcoonce/graphmark/pull/132),
127
+ [`cd76410`](https://github.com/cdcoonce/graphmark/commit/cd76410087157677f6f6515c94d11057060063eb))
128
+
129
+ The frozen oracle prevents regression and has never surfaced anything new, because fixtures only
130
+ encode shapes somebody already thought of, and all seven historical bugs were shapes nobody
131
+ thought of. This generates vaults nobody designed and asserts what must hold for any content at
132
+ all.
133
+
134
+ Two layers, and the second is the one that matters.
135
+
136
+ STRUCTURAL invariants over generated vaults: conservation (every extracted display lands in a
137
+ bucket), edges name real notes and never exceed the resolved count, self-links never become edges,
138
+ back_links mirror out_links, unresolved is exactly ambiguous+missing, aliases never shadow a real
139
+ note name, and build is deterministic — the headline claim of this package, asserted nowhere until
140
+ now.
141
+
142
+ Those all passed on first run, which was the finding. Every one of the seven bugs kept conservation
143
+ intact; each merely filed a link in the WRONG bucket. So the structural layer would have caught
144
+ none of them, and shipping only that would have been a detector that cannot see the thing it
145
+ exists for.
146
+
147
+ METAMORPHIC relations close that gap. Obsidian treats [[X]], [[X|alias]], [[X#Section]] and [[X.md]]
148
+ as the same link, so each rewrite must leave the counts and edges identical. Re-injecting the real
149
+ defects confirms the layer works: #104 (.md), #98 (intra-note), #101 (non-note file), #119
150
+ (aliases) and the path-qualified whitespace bug each fail a property.
151
+
152
+ Two of those properties were over-specified on first write — they compared `unresolved`, which
153
+ echoes the RAW display, so a rewrite legitimately changes it. Comparing it asserts a rewrite does
154
+ not rewrite anything. They now compare counts and edges, with the reason documented at the helper.
155
+
156
+ The whitespace property also had to be sharpened: normalization collapses whitespace on its own, so
157
+ a padded BARE display resolves either way and cannot detect the defect. Only the path-suffix
158
+ branch is sensitive, which is exactly where the 13 live links were reported broken while pointing
159
+ at real notes.
160
+
161
+ hypothesis is a dev dependency only; the shipped runtime dep is still networkx alone. Bounded and
162
+ derandomized so CI stays fast and failures reproduce.
163
+
164
+
165
+ ## v0.6.0 (2026-07-25)
166
+
167
+ ### Bug Fixes
168
+
169
+ - **parse**: Parse block-style frontmatter lists (#118)
170
+ ([#120](https://github.com/cdcoonce/graphmark/pull/120),
171
+ [`723c517`](https://github.com/cdcoonce/graphmark/commit/723c517d30732286fd0e6005996fb36d577042f5))
172
+
173
+ * chore(release): 0.3.4 [skip ci]
174
+
175
+ * chore(release): 0.4.0 [skip ci]
176
+
177
+ * chore(release): 0.5.0 [skip ci]
178
+
179
+ * fix(parse): parse block-style frontmatter lists (#118)
180
+
181
+ _parse_frontmatter handled scalars, quoted strings and inline lists, but a block list's item lines
182
+ contain no colon, so the loop skipped them and the bare `key:` line stored "". Every block-style
183
+ property in a real vault — aliases:, tags: — silently became an empty string instead of a list.
184
+
185
+ Block form is what Obsidian's own Properties UI writes, so this is the common case, not the edge
186
+ case, and Document.frontmatter is public: a consumer reading doc.frontmatter["tags"] got "" rather
187
+ than a list. Not an error, just quietly wrong data.
188
+
189
+ Item lines are matched on the leading dash BEFORE the key/value split, so an item containing a colon
190
+ ("- Note: A Subtitle") stays an item. A block closes at the next key rather than merely pausing —
191
+ without that, a stray indented line later in a malformed note would silently grow the earlier
192
+ list, which is misattribution rather than the promised fail-soft drop. That distinction survived
193
+ the first four mutations and now has its own test.
194
+
195
+ A `key:` with no items still reads as "" — an empty value, not an empty list — so nothing that
196
+ parsed before changes shape.
197
+
198
+ Parity: fixture notes use inline or scalar frontmatter only, so no expected.json can move. A test
199
+ asserts that property directly rather than leaving it as a claim in the commit message.
200
+
201
+ Still a targeted scan, not a YAML dependency: this runs over every note in a vault and a note
202
+ someone is mid-edit must not take the graph down.
203
+
204
+ ---------
205
+
206
+ Co-authored-by: semantic-release <semantic-release>
207
+
208
+ ### Features
209
+
210
+ - **graph**: Resolve frontmatter aliases in-package (#119)
211
+ ([#121](https://github.com/cdcoonce/graphmark/pull/121),
212
+ [`05bb6ce`](https://github.com/cdcoonce/graphmark/commit/05bb6ced17656a3fb3d1d1798068763b26b68588))
213
+
214
+ graphmark never read frontmatter during resolution, so every link written against an Obsidian
215
+ `aliases:` entry was reported broken. Measured on a real 521-note vault: stock graphmark reported
216
+ 23 broken links where the actual count was 0, and dropped 17 edges with them. A 100%
217
+ false-positive rate in max_unresolved_links — the flagship threshold of graphmark check, the one
218
+ product this repo offers outward. Larger than the four false-positive classes already fixed
219
+ (#98/#101/#104/#107) combined.
220
+
221
+ This reverses a documented decision. the-vault's AliasResolver says "naming policy belongs to the
222
+ seam, so the fallback lives here rather than in the graph algorithm". That holds for idiosyncratic
223
+ conventions; aliases: is core Obsidian, and this package claims to work on any Obsidian-family
224
+ vault. Human-triaged: move it in-package, on by default, since a default that silently produces
225
+ wrong answers is not fixed by a knob nobody knows to flip. resolve_aliases = false restores the
226
+ old behavior.
227
+
228
+ That AliasResolver is the oracle, and the live-vault differential is exact: stock graphmark now
229
+ reports the same broken-link set as the reference implementation, note for note — 0 and 0, from a
230
+ 51-entry alias map.
231
+
232
+ Its conservative rules are preserved. An alias colliding with any real note name is dropped at index
233
+ time, not merely outranked, so a note's own title can never be hijacked and an already-ambiguous
234
+ basename can't be rescued into resolving. An alias claimed by two notes resolves to nothing. A
235
+ slash-bearing alias is refused when the map is built, because normalization turns "/" into a space
236
+ and would otherwise make it reachable from a slash-free display — the lookup-side guard alone does
237
+ not cover that, which mutation testing caught.
238
+
239
+ One honest note: rule 1 (resolver before alias) is structurally unreachable given the other two
240
+ rules — no display can match both a catalog key and an alias key — so mutating the order leaves
241
+ the suite green. It is kept as insurance against a future relaxation and is documented as untested
242
+ rather than dressed up as covered.
243
+
244
+ Parity: this changes what resolves, so it is the most parity-sensitive change since extraction. It
245
+ is safe only because no frozen fixture declares aliases; a test asserts that property directly so
246
+ it cannot go stale.
247
+
248
+
4
249
  ## v0.5.0 (2026-07-25)
5
250
 
6
251
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphmark
3
- Version: 0.5.0
3
+ Version: 0.7.0
4
4
  Summary: Deterministic knowledge-graph analysis for markdown / [[wikilink]] vaults.
5
5
  Project-URL: Homepage, https://github.com/cdcoonce/graphmark
6
6
  Project-URL: Repository, https://github.com/cdcoonce/graphmark
@@ -21,6 +21,7 @@ Classifier: Typing :: Typed
21
21
  Requires-Python: >=3.11
22
22
  Requires-Dist: networkx>=3.0
23
23
  Provides-Extra: dev
24
+ Requires-Dist: hypothesis>=6.100; extra == 'dev'
24
25
  Requires-Dist: pytest>=8.0; extra == 'dev'
25
26
  Requires-Dist: ruff>=0.6; extra == 'dev'
26
27
  Description-Content-Type: text/markdown
@@ -84,12 +85,32 @@ graphmark siloed --root /path/to/vault
84
85
  graphmark neighborhood --note a/b.md --depth 2 --root /path/to/vault
85
86
  graphmark pagerank --n 10 --alpha 0.85 --root /path/to/vault
86
87
  graphmark export dot --root /path/to/vault > graph.dot
88
+ graphmark links --root /path/to/vault
87
89
  graphmark check --config vault.toml
88
90
  ```
89
91
 
90
92
  Exit codes: `0` success, `1` a `check` threshold breach, `2` a usage or config error. Nothing else
91
93
  uses `1`, so CI can trust it.
92
94
 
95
+ ## `graphmark links` — how every link was classified
96
+
97
+ ```console
98
+ $ graphmark --root /path/to/vault links
99
+ {"total": 6226, "counts": {"resolved": 6169, "ambiguous": 0, "non-note-file": 17, "out-of-scope-note": 0, "missing": 0, "intra-note": 40}, "alias_resolved": 23}
100
+ resolved 6169 · ambiguous 0 · non-note-file 17 · out-of-scope-note 0 · missing 0 · intra-note 40 · alias-resolved 23
101
+ ```
102
+
103
+ JSON on stdout, the one-line summary on stderr, so the output stays pipeable.
104
+
105
+ Every wikilink lands in exactly one bucket and the buckets sum to `total` — nothing is silently
106
+ dropped. All six reasons are always present, because a zero is a finding: the line above with
107
+ `missing 23 · alias-resolved 0` instead is what a real defect looked like before frontmatter aliases
108
+ resolved, on the same vault with the same 6226 total. Reading the distribution is the fastest way to
109
+ notice the tool is wrong about your vault.
110
+
111
+ The same block appears in `check`'s report under `links`, as context for the verdict. It never
112
+ changes the verdict.
113
+
93
114
  ## `graphmark check` — vault health as a CI gate
94
115
 
95
116
  Declare thresholds in the config's `[check]` table, then run `graphmark check` as a build step. It
@@ -185,8 +206,28 @@ graphmark.to_dot(graph) # Graphviz DOT
185
206
  graph.unresolved # {rel_path: [broken link displays]}
186
207
  graph.catalog # {normalized stem: [rel_paths]} — 2+ means ambiguous
187
208
  graph.out_of_scope # same, for markdown outside the configured scope
209
+ graph.aliases # {normalized alias: rel_path} — frontmatter aliases
210
+ graph.link_counts # {reason: occurrences} — every link, one bucket each
211
+ graph.alias_resolved # how many resolutions came via an alias
212
+ ```
213
+
214
+ `link_counts` accounts for **every** display the extractor produced, one bucket each, and always
215
+ carries all six `DIAGNOSIS_REASONS` — a zero is a finding, not a non-event. The buckets sum to the
216
+ extraction count, so nothing is silently dropped. Reading the distribution is the fastest way to
217
+ notice the tool is wrong about your vault:
218
+
219
+ ```
220
+ resolved 6169 · ambiguous 0 · non-note-file 17 · out-of-scope-note 0 · missing 0 · intra-note 40 · alias-resolved 23
221
+ ```
222
+
223
+ versus the same vault with alias resolution disabled — the shape of a real defect that once shipped:
224
+
225
+ ```
226
+ resolved 6146 · ... · missing 23 · ... · alias-resolved 0
188
227
  ```
189
228
 
229
+ Same total, 23 links in the wrong bucket.
230
+
190
231
  `catalog` and `out_of_scope` are the resolution state the build consulted. They are what you need to
191
232
  explain a link rather than just resolve it — which notes a bare `[[link]]` collided with, or whether
192
233
  a link that failed to resolve points at a real file you deliberately excluded. Value lists are
@@ -253,10 +294,40 @@ Both constants were calibrated against a human-annotated baseline of a real vaul
253
294
  rather than chosen by taste — see [`tests/fixtures/suggest/README.md`](tests/fixtures/suggest/README.md)
254
295
  for the method and the measured result.
255
296
 
297
+ ## Frontmatter aliases
298
+
299
+ Obsidian's `aliases:` property declares additional real names for a note, so links written against
300
+ one resolve like any other link. Block, inline and scalar forms all work:
301
+
302
+ ```yaml
303
+ ---
304
+ aliases:
305
+ - Mood Tracker
306
+ - mood-tracker
307
+ ---
308
+ ```
309
+
310
+ `[[Mood Tracker]]` now resolves to `2026-04-11-mood-tracker.md` and produces a real edge. On a
311
+ 521-note vault this was the difference between **23 reported broken links and 0** — every one of the
312
+ 23 a false positive, plus 17 edges that were silently missing.
313
+
314
+ Three rules keep it conservative:
315
+
316
+ - **A real note name always wins.** An alias can never hijack a link to a note that actually bears
317
+ that name.
318
+ - **An alias that collides with any real note name is dropped entirely** — not merely outranked, so
319
+ an already-ambiguous basename can't be rescued into resolving by someone's alias.
320
+ - **An alias claimed by two notes resolves to nothing**, the same refusal applied to colliding
321
+ basenames.
322
+
323
+ Set `resolve_aliases = false` for strict basename-only resolution. `graph.aliases` exposes the
324
+ resolved map.
325
+
256
326
  ## Configuration
257
327
 
258
328
  ```toml
259
329
  root = "." # required unless --root is passed
330
+ resolve_aliases = true # resolve frontmatter aliases: (default true)
260
331
  scoped_folders = ["brain", "work"] # limit the vault to these top-level folders
261
332
  excluded_dirs = [".git", "templates"] # skip notes under these directories
262
333
  rules_files = ["CLAUDE.md", "CLAUDE.local.md"] # agent-rules files, not vault content
@@ -57,12 +57,32 @@ graphmark siloed --root /path/to/vault
57
57
  graphmark neighborhood --note a/b.md --depth 2 --root /path/to/vault
58
58
  graphmark pagerank --n 10 --alpha 0.85 --root /path/to/vault
59
59
  graphmark export dot --root /path/to/vault > graph.dot
60
+ graphmark links --root /path/to/vault
60
61
  graphmark check --config vault.toml
61
62
  ```
62
63
 
63
64
  Exit codes: `0` success, `1` a `check` threshold breach, `2` a usage or config error. Nothing else
64
65
  uses `1`, so CI can trust it.
65
66
 
67
+ ## `graphmark links` — how every link was classified
68
+
69
+ ```console
70
+ $ graphmark --root /path/to/vault links
71
+ {"total": 6226, "counts": {"resolved": 6169, "ambiguous": 0, "non-note-file": 17, "out-of-scope-note": 0, "missing": 0, "intra-note": 40}, "alias_resolved": 23}
72
+ resolved 6169 · ambiguous 0 · non-note-file 17 · out-of-scope-note 0 · missing 0 · intra-note 40 · alias-resolved 23
73
+ ```
74
+
75
+ JSON on stdout, the one-line summary on stderr, so the output stays pipeable.
76
+
77
+ Every wikilink lands in exactly one bucket and the buckets sum to `total` — nothing is silently
78
+ dropped. All six reasons are always present, because a zero is a finding: the line above with
79
+ `missing 23 · alias-resolved 0` instead is what a real defect looked like before frontmatter aliases
80
+ resolved, on the same vault with the same 6226 total. Reading the distribution is the fastest way to
81
+ notice the tool is wrong about your vault.
82
+
83
+ The same block appears in `check`'s report under `links`, as context for the verdict. It never
84
+ changes the verdict.
85
+
66
86
  ## `graphmark check` — vault health as a CI gate
67
87
 
68
88
  Declare thresholds in the config's `[check]` table, then run `graphmark check` as a build step. It
@@ -158,8 +178,28 @@ graphmark.to_dot(graph) # Graphviz DOT
158
178
  graph.unresolved # {rel_path: [broken link displays]}
159
179
  graph.catalog # {normalized stem: [rel_paths]} — 2+ means ambiguous
160
180
  graph.out_of_scope # same, for markdown outside the configured scope
181
+ graph.aliases # {normalized alias: rel_path} — frontmatter aliases
182
+ graph.link_counts # {reason: occurrences} — every link, one bucket each
183
+ graph.alias_resolved # how many resolutions came via an alias
184
+ ```
185
+
186
+ `link_counts` accounts for **every** display the extractor produced, one bucket each, and always
187
+ carries all six `DIAGNOSIS_REASONS` — a zero is a finding, not a non-event. The buckets sum to the
188
+ extraction count, so nothing is silently dropped. Reading the distribution is the fastest way to
189
+ notice the tool is wrong about your vault:
190
+
191
+ ```
192
+ resolved 6169 · ambiguous 0 · non-note-file 17 · out-of-scope-note 0 · missing 0 · intra-note 40 · alias-resolved 23
193
+ ```
194
+
195
+ versus the same vault with alias resolution disabled — the shape of a real defect that once shipped:
196
+
197
+ ```
198
+ resolved 6146 · ... · missing 23 · ... · alias-resolved 0
161
199
  ```
162
200
 
201
+ Same total, 23 links in the wrong bucket.
202
+
163
203
  `catalog` and `out_of_scope` are the resolution state the build consulted. They are what you need to
164
204
  explain a link rather than just resolve it — which notes a bare `[[link]]` collided with, or whether
165
205
  a link that failed to resolve points at a real file you deliberately excluded. Value lists are
@@ -226,10 +266,40 @@ Both constants were calibrated against a human-annotated baseline of a real vaul
226
266
  rather than chosen by taste — see [`tests/fixtures/suggest/README.md`](tests/fixtures/suggest/README.md)
227
267
  for the method and the measured result.
228
268
 
269
+ ## Frontmatter aliases
270
+
271
+ Obsidian's `aliases:` property declares additional real names for a note, so links written against
272
+ one resolve like any other link. Block, inline and scalar forms all work:
273
+
274
+ ```yaml
275
+ ---
276
+ aliases:
277
+ - Mood Tracker
278
+ - mood-tracker
279
+ ---
280
+ ```
281
+
282
+ `[[Mood Tracker]]` now resolves to `2026-04-11-mood-tracker.md` and produces a real edge. On a
283
+ 521-note vault this was the difference between **23 reported broken links and 0** — every one of the
284
+ 23 a false positive, plus 17 edges that were silently missing.
285
+
286
+ Three rules keep it conservative:
287
+
288
+ - **A real note name always wins.** An alias can never hijack a link to a note that actually bears
289
+ that name.
290
+ - **An alias that collides with any real note name is dropped entirely** — not merely outranked, so
291
+ an already-ambiguous basename can't be rescued into resolving by someone's alias.
292
+ - **An alias claimed by two notes resolves to nothing**, the same refusal applied to colliding
293
+ basenames.
294
+
295
+ Set `resolve_aliases = false` for strict basename-only resolution. `graph.aliases` exposes the
296
+ resolved map.
297
+
229
298
  ## Configuration
230
299
 
231
300
  ```toml
232
301
  root = "." # required unless --root is passed
302
+ resolve_aliases = true # resolve frontmatter aliases: (default true)
233
303
  scoped_folders = ["brain", "work"] # limit the vault to these top-level folders
234
304
  excluded_dirs = [".git", "templates"] # skip notes under these directories
235
305
  rules_files = ["CLAUDE.md", "CLAUDE.local.md"] # agent-rules files, not vault content
@@ -22,13 +22,14 @@ story** — the priority consumer is the owner's vault seam (`graph_cli.py`), no
22
22
 
23
23
  ## What's shipped (baseline — do not re-propose)
24
24
 
25
- - **The full engine, v0.3.4 on PyPI**: `parse.py` (wikilink extraction, code-span skipping),
26
- `graph.py` (catalog + `NormalizeResolver` + `VaultGraph.build` + `unresolved`), `metrics.py`
27
- (stats, orphans, hubs, clusters, bridges, siloed_notes, neighborhood, pure-python pagerank,
28
- gaps), `check.py` (policy evaluation), `export.py` (JSON/DOT), `cli.py`, `config.py`
29
- (`VaultConfig` + `CheckPolicy` + `load_config`), and `dismiss.py` (content-hash weaklink
30
- dismissal store). Tracks A, C and D are all closed — read their sections before proposing
31
- anything in those areas.
25
+ - **The full engine, v0.6.0 on PyPI**: `parse.py` (wikilink extraction, code-span skipping,
26
+ frontmatter incl. block lists), `graph.py` (catalog + `NormalizeResolver` + `VaultGraph.build` +
27
+ `unresolved` + `diagnose`/`LinkDiagnosis` + frontmatter aliases), `metrics.py` (stats, orphans,
28
+ hubs, clusters, bridges, siloed_notes, neighborhood, pure-python pagerank, gaps), `check.py`
29
+ (policy evaluation), `export.py` (JSON/DOT), `cli.py`, `config.py` (`VaultConfig` +
30
+ `CheckPolicy` + `load_config`), and `dismiss.py` (content-hash weaklink dismissal store).
31
+ Tracks A, C, D and E are all closed — read their sections before proposing anything in those
32
+ areas.
32
33
  - **Six frozen differential fixtures** — simple, alt, scoped, selflink, gaps (+ out-of-graph),
33
34
  dismiss — plus live-vault parity diffs against the reference engine.
34
35
  - **`gaps()` with injected similarity** — graphmark owns the deterministic ranking/filtering
@@ -63,14 +64,17 @@ Shipped: `graph.unresolved`, the `[check]` policy block (`max_orphans` /
63
64
  reserved for breach and a byte-stable JSON report, `graphmark.build()` + curated top-level
64
65
  re-exports, and a README rewritten around the real surface.
65
66
 
66
- _Where we are (0.3.4):_ the gate works and the vault dogfoods it. The remaining risk is the
67
- **credibility of its flagship number**. Four false-positive classes have been found and fixed by
68
- triaging a real vault against the metric — same-note anchors (#98, 19% of the count),
69
- non-markdown targets (#101, 10%), the `.md` extension (#104), and links to notes that exist but
70
- are out of graph scope (#107, 7%). A threshold nobody trusts is not a gate.
67
+ _Where we are (0.6.0):_ the gate works and the vault dogfoods it. The remaining risk is the
68
+ **credibility of its flagship number**. Seven false-positive classes have been found and fixed
69
+ same-note anchors (#98, 19% of the count), non-markdown targets (#101, 10%), whitespace-padded
70
+ displays, the `.md` extension (#104), out-of-scope notes (#107, 7%), frontmatter aliases (#119,
71
+ **23 phantom breaks against an actual 0**), and Unicode NFD/NFC (#123). A threshold nobody trusts
72
+ is not a gate.
71
73
 
72
- _Where we're going:_ keep truthing the metric against live vaults, then the thin GitHub Action
73
- wrapper but only once the count is trustworthy enough to fail someone's build.
74
+ _Where we're going:_ **Track F, not the GitHub Action.** Every one of those seven was found by a
75
+ human reading link lists on one vault, which does not scale and has no reason to be finished. The
76
+ Action ships once the accounting underneath it is auditable — see Track F for why that ordering is
77
+ deliberate.
74
78
 
75
79
  ### Track E — One resolver: absorb the consumer's second link stack (feature track)
76
80
 
@@ -97,6 +101,55 @@ point of it). The consumer-side deletion is hand-coded in the vault; the package
97
101
 
98
102
  _Constraint:_ this is additive. Nothing here may change what resolves or what an edge is.
99
103
 
104
+ **CLOSED at v0.6.0.** #110/#111/#112 shipped, and frontmatter aliases moved in-package (#119) —
105
+ the last piece of the consumer's parallel stack. the-workshop#474 deletes the consumer side.
106
+
107
+ ### Track F — Auditable link accounting (the current epic)
108
+
109
+ _The problem is not any individual bug; it is how they get found._ Every correctness bug in this
110
+ package's history was found the same way: a human reading link lists from **one** vault. Seven so
111
+ far — #98 same-note anchors, #101 non-markdown targets, #104 the `.md` extension, #107 out-of-scope
112
+ notes, #119 frontmatter aliases, #123 Unicode NFD/NFC, plus the whitespace-padded displays fixed
113
+ alongside #107. Six of those seven landed in a single day of hand-triage.
114
+
115
+ The frozen differential oracle is a **ratchet, not a detector.** It prevents regression superbly and
116
+ has never once surfaced something new. Worse, the single consumer's seam actively _conceals_
117
+ package defects: its `AliasResolver` hid a 23-link error for six releases, because the only vault
118
+ that could have exposed the gap had already patched around it.
119
+
120
+ _Why the bugs hide:_ the buckets are silent. `build` sorts every extracted display into one of the
121
+ six `DIAGNOSIS_REASONS`, then reports **one** of them. A vault owner sees `N unresolved` and nothing
122
+ about what was suppressed — and six of the seven bugs were _mis-bucketing_, a link filed as
123
+ `unresolved` that belonged in `resolved` or the reverse. Had graphmark printed
124
+
125
+ ```
126
+ 3677 edges · 23 unresolved · 0 alias-resolved · 12 out-of-scope · 8 non-note-file · 19 intra-note
127
+ ```
128
+
129
+ the alias gap would have been obvious at a glance: zero alias-resolved beside 23 unresolved is
130
+ visibly wrong. Nobody could see it, so nobody saw it for six releases.
131
+
132
+ _Where we're going:_ **every extracted display lands in exactly one named bucket; the buckets are
133
+ counted, reported, and bound by a property-tested conservation law.** The aim is not another metric
134
+ — it is to make the package's own answers auditable, so an implausible distribution is visible to
135
+ its owner without a day of triage. That is the mechanism that scales past one vault and one human,
136
+ and it is the strongest possible expression of the "public correctness story" identity.
137
+
138
+ Sliced as #124 (per-reason counts + the conservation law), #125 (`graphmark links` surfaces the
139
+ distribution), #126 (property-based vault generation — **the detector**; expect it to fail on first
140
+ run, and file what it finds), #127 (implausibility heuristics — advisory only, **not
141
+ autonomous-safe past the exact checks**, since the statistical thresholds need the same human
142
+ calibration gate #112 used).
143
+
144
+ Track F's own success measure is not slices merged: it is **bugs found by machinery rather than by
145
+ a human reading link lists.** #126's catch rate is the evidence.
146
+
147
+ _Deliberately deferred behind this:_ the Track D GitHub Action. It is an adoption play, and adoption
148
+ is not this repo's game; more to the point, shipping a gate that fails other people's builds while
149
+ the tool's own accounting is unauditable is backwards ordering. Generality work (Windows paths,
150
+ markdown-style `[text](note.md)` links for wikilink-disabled vaults, non-my-brain schemas) is real
151
+ but is a feature list, not an epic — and this track is what will tell us which parts of it matter.
152
+
100
153
  ### Track B — Judgment the oracle can't cover (human-validated)
101
154
 
102
155
  - New fixtures on a **different schema** than my-brain have hand-authored expected values → a human
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "graphmark"
3
- version = "0.5.0"
3
+ version = "0.7.0"
4
4
  description = "Deterministic knowledge-graph analysis for markdown / [[wikilink]] vaults."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -27,7 +27,7 @@ Repository = "https://github.com/cdcoonce/graphmark"
27
27
  Issues = "https://github.com/cdcoonce/graphmark/issues"
28
28
 
29
29
  [project.optional-dependencies]
30
- dev = ["pytest>=8.0", "ruff>=0.6"]
30
+ dev = ["pytest>=8.0", "ruff>=0.6", "hypothesis>=6.100"]
31
31
 
32
32
  [project.scripts]
33
33
  graphmark = "graphmark.cli:main"
@@ -17,7 +17,7 @@ from __future__ import annotations
17
17
  from importlib.metadata import PackageNotFoundError, version
18
18
  from pathlib import Path
19
19
 
20
- from graphmark.check import run_check, unresolved_link_count
20
+ from graphmark.check import links_report, run_check, unresolved_link_count
21
21
  from graphmark.config import CheckPolicy, VaultConfig, load_config
22
22
  from graphmark.dismiss import (
23
23
  active_dismissed_sigs,
@@ -33,6 +33,7 @@ from graphmark.graph import (
33
33
  LinkDiagnosis,
34
34
  NormalizeResolver,
35
35
  VaultGraph,
36
+ build_aliases,
36
37
  build_catalog,
37
38
  candidates_for,
38
39
  diagnose,
@@ -112,6 +113,7 @@ __all__ = [
112
113
  "active_dismissed_sigs",
113
114
  "bridges",
114
115
  "build",
116
+ "build_aliases",
115
117
  "build_catalog",
116
118
  "candidates_for",
117
119
  "diagnose",
@@ -126,6 +128,7 @@ __all__ = [
126
128
  "pagerank",
127
129
  "parse_document",
128
130
  "record_dismissal",
131
+ "links_report",
129
132
  "run_check",
130
133
  "siloed_notes",
131
134
  "stats",