sanity fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Fiona-Assistant Specification
|
||||
version: 1.5.1
|
||||
version: 1.5.2
|
||||
title: Project Spec Sheet
|
||||
created: 2026-09-23
|
||||
updated: 2026-10-02
|
||||
@@ -121,7 +121,9 @@ Revision 1.4.0 names the core-file record `corefiles.json`
|
||||
`wiki update` writes that file. Revision 1.5.0 omits markdown
|
||||
files matched by `fiona.wiki.graph.ignore_files` from the graph
|
||||
(*7.1.4.20.*). The shipped list is `*/table_of_contents.md`,
|
||||
because a table of contents links to every page.
|
||||
because a table of contents links to every page. Revision 1.5.2
|
||||
gives that file frontmatter `name` and `version` (*7.3.1.1.1.*)
|
||||
so `fmlint` accepts it.
|
||||
|
||||
Each feature section starts with a `Status` line. Requirements use
|
||||
`- *N.M.K.*`. Each `*acceptance*` sits under the requirement it tests.
|
||||
@@ -2872,8 +2874,9 @@ Requirements for `librarian`.
|
||||
> Status: Implemented
|
||||
|
||||
- *7.3.1.1.* Folder TOC (`librarian toc`).
|
||||
- *7.3.1.1.1.* `table_of_contents.md` has frontmatter `title`,
|
||||
`created`, `updated`, and `type: toc`.
|
||||
- *7.3.1.1.1.* `table_of_contents.md` has frontmatter `name`,
|
||||
`version`, `title`, `created`, `updated`, and `type: toc`.
|
||||
`name` is `Table of Contents` and `version` is `1.0.0`.
|
||||
- *7.3.1.1.2.* Entries list subfolders, file links, and `v<version>`,
|
||||
or `v0.0.0` when version is missing or unreadable.
|
||||
- *7.3.1.1.3.* Headers become nested GitHub-style anchor links.
|
||||
|
||||
@@ -162,15 +162,19 @@ def build_toc(
|
||||
) -> str:
|
||||
"""Build a table of contents that nests folders, files and their headers.
|
||||
|
||||
Generated by CURSOR: 2026-10-02 - frontmatter name and version for fmlint.
|
||||
|
||||
Args:
|
||||
folder: The folder the table of contents covers.
|
||||
files: Relative md file paths to list (as returned by collect_md).
|
||||
max_header_depth: Maximum header level to list per file
|
||||
(3 = h1 through h3). None or 0 mean unlimited.
|
||||
"""
|
||||
# Add YAML frontmatter
|
||||
# CURSOR: name and version are required by fmlint on every markdown file.
|
||||
today = datetime.datetime.now(datetime.UTC).date().isoformat()
|
||||
frontmatter = f"""---
|
||||
name: Table of Contents
|
||||
version: 1.0.0
|
||||
title: Table of Contents
|
||||
created: {today}
|
||||
updated: {today}
|
||||
|
||||
@@ -121,8 +121,8 @@ class TestRunWikiChecks:
|
||||
def test_path_rule_exemption_hides_markdownlint_rules(self, minimal_wiki):
|
||||
"""SPEC 7.1.3.4: path_rule_exemptions filter wiki sanity markdownlint only."""
|
||||
tasks = minimal_wiki / "tasks" / "tasks.md"
|
||||
long_line = "x" * 120
|
||||
_write_md(tasks, "tasks", f"# Tasks\n\n- {long_line}\n")
|
||||
long_line = ("word " * 29) + "words"
|
||||
_write_md(tasks, "tasks", f"# Tasks\n\n{long_line}\n")
|
||||
|
||||
without = run_wiki_checks(str(minimal_wiki))
|
||||
assert without["checks"]["markdownlint"]["violation_count"] > 0
|
||||
|
||||
@@ -355,6 +355,8 @@ class TestBuildToc:
|
||||
|
||||
# Result should include frontmatter and TOC header
|
||||
assert "---" in result, "Result should include frontmatter delimiter"
|
||||
assert "name: Table of Contents" in result, "Result should include name in frontmatter"
|
||||
assert "version: 1.0.0" in result, "Result should include version in frontmatter"
|
||||
assert "title: Table of Contents" in result, "Result should include title in frontmatter"
|
||||
assert "# Table of Contents" in result, "Result should include TOC header"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user