Skip to content

Commit 11b6e23

Browse files
fix(core): purge legacy i18n templates and resolve Z405 asset link graph bugs (#107)
* fix(cli): purge eradicated i18n configurations from zenzic init templates Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * fix(core): register non-markdown local links in asset graph to prevent Z405 false positives Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * docs: update CHANGELOG and RELEASE for v0.14.1 Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * fix(release): delegate RELEASE.md to bumptool and revert manual bumps Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * chore: remove legacy i18n blocks from template config Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * release: bump version to 0.14.1 Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * docs(gov): purify roadmap of historical milestones and align planned features to v0.15.0 Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * feat(core): implement Z506 to detect malformed frontmatter boundaries Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> * feat(core): implement Z506 to detect malformed frontmatter boundaries Signed-off-by: PythonWoods <gianluca.catalano@gmail.com> --------- Signed-off-by: PythonWoods <gianluca.catalano@gmail.com>
1 parent 9af2b3c commit 11b6e23

16 files changed

Lines changed: 76 additions & 173 deletions

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
[tool.bumpversion]
5-
current_version = "0.14.0"
5+
current_version = "0.14.1"
66
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<pre_l>a|b|rc)(?P<pre_n>\\d+))?"
77
serialize = [
88
"{major}.{minor}.{patch}{pre_l}{pre_n}",

.github/ISSUE_TEMPLATE/security_vulnerability.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ body:
2929
attributes:
3030
label: Zenzic version
3131
description: Output of `zenzic --version`
32-
placeholder: "0.14.0"
32+
placeholder: "0.14.1"
3333
validations:
3434
required: true
3535

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# repos:
99
# - repo: https://github.com/PythonWoods/zenzic
10-
# rev: v0.14.0
10+
# rev: v0.14.1
1111
# hooks:
1212
# - id: zenzic-verify # quality gate — corrisponde a `just verify` lato zenzic
1313
# - id: zenzic-guard # fast staged-file credential scan

.zenzic.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,6 @@ pattern = "(?i)\\bclick here\\b|\\bclicca qui\\b"
157157
message = "Avoid generic link text. Use a meaningful description for accessibility."
158158
severity = "error"
159159

160-
# --- I18N PARITY (Optional) ---
161-
# [i18n]
162-
# enabled = true
163-
# base_lang = "en"
164-
# base_source = "docs"
165-
# strict_parity = true
166-
# require_frontmatter_parity = ["title", "description"]
167-
# [i18n.targets]
168-
# it = "i18n/it/docusaurus-plugin-content-docs/current"
169-
170160
# --- GATE 4: CI/CD (GitHub Actions, Optional) ---
171161
# Add this workflow snippet to .github/workflows/zenzic.yml
172162
#

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ Versions follow [Semantic Versioning](https://semver.org/).
99

1010
---
1111

12+
## [0.14.1] - Unreleased
13+
14+
### Added
15+
16+
- **Semantic Metadata Cross-Validation (Z507)**: Added to the planned roadmap for v0.15.0.
17+
18+
### Fixed
19+
20+
- **Core Link Parsing**: Extended `_MARKDOWN_ASSET_LINK_RE` to parse standard markdown links `[text](url)` and HTML `<a>` tags, resolving false positive `Z405` errors for non-markdown assets.
21+
1222
## [0.14.0] - Unreleased
1323

1424
### Breaking Changes

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ abstract: >-
1515
performs deterministic static analysis using a two-pass reference
1616
pipeline and a RE2-backed credential scanner, with zero subprocess
1717
calls and full SARIF 2.1.0 support for CI/CD integration.
18-
version: 0.14.0
19-
date-released: 2026-06-20
18+
version: 0.14.1
19+
date-released: 2026-06-21
2020
url: "https://zenzic.dev"
2121
repository-code: "https://github.com/PythonWoods/zenzic"
2222
repository-artifact: "https://pypi.org/project/zenzic/"

RELEASE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
| Field | Value |
1010
| :------- | :--------- |
11-
| Version | v0.14.0 |
11+
| Version | v0.14.1 |
1212
| Codename | Magnetite |
13-
| Date | 2026-06-20 |
13+
| Date | 2026-06-21 |
1414
| Status | Stable |
1515

1616
## Release Checklist
@@ -21,7 +21,7 @@ Before tagging, every item must be green:
2121
- [ ] `zenzic lab all` — all 20 scenarios exit with expected code
2222
- [ ] `zenzic score --stamp` committed — badge in README.md reflects current score
2323
- [ ] `zenzic check all .` — zero findings in the repo root
24-
- [ ] `pyproject.toml` version matches the tag (`0.14.0`)
24+
- [ ] `pyproject.toml` version matches the tag (`0.14.1`)
2525
- [ ] `CITATION.cff` version and date updated
2626
- [ ] `CHANGELOG.md``[Unreleased]` section moved to the new version heading
2727
- [ ] Update SECURITY.md support table (Add new release, demote previous to Critical/EOL).
@@ -54,11 +54,11 @@ git checkout main
5454
git pull origin main
5555

5656
# 3. Tag the main branch and push
57-
git tag v0.14.0
57+
git tag v0.14.1
5858
git push origin main --tags
5959
```
6060

61-
- [ ] Create GitHub Release from the tag, using the `## v0.14.0` CHANGELOG section as the release body.
61+
- [ ] Create GitHub Release from the tag, using the `## v0.14.1` CHANGELOG section as the release body.
6262

6363
## Changelog Reference
6464

ROADMAP.md

Lines changed: 28 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -14,118 +14,37 @@ For the current release history, see [CHANGELOG.md](CHANGELOG.md).
1414

1515
---
1616

17-
## v0.8.x
17+
## v0.14.0 (current)
1818

19-
**Theme:** Tiered code governance, frozen security contracts, Sovereign Audit mode.
20-
21-
---
22-
23-
## v0.9.x — Graphite
24-
25-
**Theme:** Governance Engine, DQS Suppression Audit, Tiered Penalty Model.
26-
27-
---
28-
29-
## v0.10.x — Magnetite
30-
31-
**Theme:** Native CI/CD Integration, Orthogonal Filtering, and Debt Eradication.
32-
33-
### Completed
34-
35-
- **Native CI/CD Integration**: Native support for `--ci`, `github-annotations` output format, and automatic header suppression.
36-
- **Orthogonal Filtering**: Runtime filtering via `--only` for targeted, isolated gate checks.
37-
38-
### Planned (WIP)
39-
40-
- **Z407 BROKEN_CODE_REFERENCE — File Integrity Check**: Zenzic will scan Markdown
41-
for backtick-quoted paths (e.g. `` `core/credentials.py` ``) and local file links,
42-
then verify their physical existence in the repository at scan time. Missing targets
43-
raise a Level 4 (Structure) finding. This eliminates "Phantom References" — stale
44-
code paths left behind after refactoring.
45-
46-
> *Zenzic doesn't just check your links; it checks if your documentation knows
47-
> where your code lives.*
48-
49-
Architectural note: the implementation extends `Resolver` with a new
50-
`resolve_code_reference(path: str) -> Finding | None` method, reusing the
51-
existing `_allowed_roots` boundary contract. No new subprocess calls.
52-
53-
- **Dead Suppression Elimination (Z603)**: Detects inline `zenzic:ignore` directives
54-
that do not correspond to any active finding. Prevents projects from accumulating
55-
"phantom debt" — paying the 1-point DQS penalty for a suppression no longer needed
56-
due to code fixes or configuration changes. Analogous to Ruff `RUF100` and ESLint
57-
`--report-unused-disable-directives`. Implementation requires extending the
58-
suppression engine (`suppressions.py`) to track which inline tags are consumed
59-
during the scan lifecycle, then emitting a new `Z603` finding for unclaimed tags.
60-
61-
- **Docusaurus Cross-Instance Resolver**: Upgrade `_docusaurus.py` to natively resolve
62-
root-relative links (e.g., `/developers/page`) across multiple plugin instances,
63-
eliminating the need for Z105 suppressions on inter-plugin routing. This includes
64-
locale-aware prefix resolution (e.g., `/it/developers/`) so that translated pages
65-
can link to sibling plugin instances without triggering Z105. Identified as a
66-
structural gap when auditing `zenzic-doc`: Docusaurus rejects `../` relative paths
67-
across plugin boundaries, forcing authors to use absolute URLs and manual
68-
suppressions.
69-
70-
---
71-
72-
## v0.11.x — Monorepo & DX (current)
73-
74-
**Theme:** File integrity contracts, semantic schema validation, Plugin SDK, config hygiene.
75-
76-
### Completed
77-
78-
- **Monorepo Scalability**: Dynamic root resolution for Docusaurus (`docusaurus_site_root`), allowing Zenzic to operate seamlessly in nested `website/` architectures.
79-
- **Path-Aware Exclusion Engine**: Upgraded `excluded_dirs` to support `.gitignore` slash semantics, enabling strictly repo_root-relative targeting without false positives.
80-
- **Python 3.12+ RE2 Parity**: Custom `translate_glob_to_re2` implementation, eradicating `fnmatch` atomic group crashes and preserving DFA linear-time guarantees.
81-
- **DX Redesign**: Implementation of a visual progress bar and mathematical transparency via the `--breakdown` flag for DQS scoring.
82-
83-
### Planned
84-
85-
- `Z108 STALE_ALLOWLIST_ENTRY` (Issue #70): config-hygiene check for unused `absolute_path_allowlist`
86-
entries (deferred from the v0.7.x cycle to avoid Pillar 3 violation; requires
87-
`zenzic config` command).
88-
- Windows CI matrix parity for all check commands.
89-
90-
- **Logic Site Map (LSM) — Documentation Topology Simplification**: The zenzic-doc
91-
documentation corpus undergoes a formal deduplication pass following the Logic
92-
Site Map protocol. Duplicate conceptual coverage (scoring, configuration reference,
93-
ecosystem) is consolidated into canonical master pages; zombie files and superseded
94-
ADRs are purged. Target: ≥30% reduction in total page count, 100% retention of
95-
information fidelity.
96-
97-
- **Plugin SDK** *(WIP)*: Stable AST adapter and rule APIs with semver guarantee.
98-
Exposure of the two-pass reference pipeline to external rule authors.
99-
Deprecation warnings for any v0.9 unstable API surfaces.
100-
- **Semantic Schemas**: YAML/JSON frontmatter validation against declared schemas
101-
(e.g. `required_fields: [title, description]`). New finding tier `Z7xx`.
102-
- ~~**i18n schema parity (Z907)**~~**CANCELLED (ADR-034):** The Z602/Z907 I18N_PARITY scanner was eradicated in v0.14.0. Bilingual parity enforcement is deferred to future adapter plugins and will not be implemented in the core engine.
103-
- **Configurable finding tiers**: allow projects to promote/demote finding severity
104-
via `[governance]` TOML section, with audit log of all overrides.
105-
106-
---
107-
108-
## v0.12.0 — The Static Purity Pivot (planned)
109-
110-
**Strategic Focus:** Deepen native support for Pure Static Engines (MkDocs, Sphinx, Hugo) where AST parsing guarantees 100% deterministic accuracy without bundler interference.
19+
**Theme:** Surgical removal of dead weight. Zero accumulation of inactive code paths.
11120

112-
### The Great Migration
21+
### Delivered
11322

114-
Tactical Bridge: zenzic-doc migrated to MkDocs Material and then to Zensical — completed in v0.13.0. ADR-020 (Mirror Law) has been deprecated; Zenzic is now English-Only.
23+
- **Zensical Migration & Docusaurus Eradication:** Complete architectural pivot to pure Markdown statics, purging legacy React AST dependencies.
24+
- **RE2 Enforcement:** Python 3.12+ RE2 parity with linear-time guarantees.
25+
- **TOML Strict Validation:** Path-aware exclusion engine and strict configuration hygiene.
26+
- **Z506 MALFORMED_FRONTMATTER:** Native built-in rule detecting malformed YAML frontmatter boundaries.
11527

11628
---
11729

118-
## v0.14.0 — The Great Eradication (in progress)
30+
## v0.15.0 (planned)
11931

120-
**Theme:** Surgical removal of dead weight. Zero accumulation of inactive code paths.
32+
**Theme:** Semantic Validation & Developer Experience.
12133

122-
### Delivered
34+
### Planned Features
12335

124-
- **Z602 I18N_PARITY Engine Eradicated (ADR-034):** `find_i18n_parity()` and 443 lines of bilingual scanner logic removed from the core. Z602 remains in the code namespace as `status="inactive"` for config forward-compatibility. `I18nConfig`/`I18nSource` models removed from `zenzic.models.config`.
125-
- **`LEGACY_TO_CODE` Deleted:** The `Z9xx → Zxxx` migration alias dictionary removed. All canonical code references updated.
126-
- **CodeDefinition.status field:** `NamedTuple` gains a `status: str = "active"` field. INACTIVE codes render as dim in `inspect codes`.
127-
- **Z506 MALFORMED_FRONTMATTER:** New built-in always-active rule that detects malformed YAML frontmatter opening delimiters on line 1. Severity `error`, −5.0 pts (Content). Gallery page and finding-codes reference updated.
128-
- **Breaking Changes:** Full list in CHANGELOG.md under `## [0.14.0]`.
36+
- **The Auto-Fix Engine (`zenzic fix`)**: Semantic `--dry-run` / `--apply` repair semantics for Z1xx and Z3xx findings.
37+
- **Custom Rules API v2 (AST Walker)**: Stable AST adapter and rule APIs with semver guarantee. Exposure of the two-pass reference pipeline to external rule authors.
38+
- **Z507 AUTHOR_NOT_FOUND**: Native support for cross-referencing Markdown frontmatter entities against framework-specific metadata files.
39+
- **The Bridge Architecture (TypeScript Docusaurus Plugin)**: Official plugin interface to support edge-case runtime frameworks outside the core engine.
40+
- **Z108 STALE_ALLOWLIST_ENTRY**: Config-hygiene check for unused `absolute_path_allowlist` entries.
41+
- **Semantic Schemas Validation**: YAML/JSON frontmatter validation against declared schemas (e.g. `required_fields: [title, description]`).
42+
- **Z407 BROKEN_CODE_REFERENCE**: Scan Markdown for backtick-quoted paths and verify their physical existence.
43+
- **Dead Suppression Elimination (Z603)**: Detects inline `zenzic:ignore` directives that do not correspond to any active finding.
44+
- **Configurable Finding Tiers**: Allow projects to promote/demote finding severity via `[governance]` TOML section.
45+
- **Readability & Style Engine**: Integrate pure readability metrics (Flesch-Kincaid) and style checks.
46+
- **Semantic Linting**: Implement AST-based rules to detect semantically duplicate headings and empty sections.
47+
- **Smart Link Graph & Connectivity Analysis**: Build a directed graph of the documentation to detect unlinked pages and navigation cycles.
12948

13049
---
13150

@@ -135,26 +54,12 @@ Tactical Bridge: zenzic-doc migrated to MkDocs Material and then to Zensical —
13554

13655
### Goals
13756

138-
- **API freeze**: all public symbols in `zenzic.rules`, `zenzic.models`, and
139-
`zenzic.core.adapters` enter semver-stable contracts. No breaking changes without
140-
a major version bump.
141-
- **Full Windows parity**: all features (including `signal`-based canary watchdog
142-
replacement) validated on Windows Server and GitHub Actions Windows runners.
57+
- **API freeze**: all public symbols in `zenzic.rules`, `zenzic.models`, and `zenzic.core.adapters` enter semver-stable contracts. No breaking changes without a major version bump.
58+
- **Full Windows parity**: all features (including `signal`-based canary watchdog replacement) validated on Windows Server and GitHub Actions Windows runners.
14359
- **REUSE 4.x compliance**: migrate to REUSE 4.x specification when stable.
144-
- **Formal test coverage floor**: 85%+ branch coverage enforced in CI across all
145-
three supported Python versions (current floor: 80%+ line coverage).
146-
- **Certified plugin ecosystem**: a curated registry of community plugins that meet
147-
the Plugin SDK contract.
148-
- **Determinism audit**: formal proof-of-determinism report published for all
149-
Core (`Z1xx`) and Security (`Z2xx`) finding codes.
150-
- **Auto-Fix Engine (`zenzic fix`)**: semantic `--dry-run` / `--apply` repair
151-
semantics for Z1xx and Z3xx findings. `zenzic fix` never modifies Z2xx
152-
(Security) findings — those require human review. Implementation is pure Python
153-
with zero subprocess calls (Pillar 2 invariant). Status: design phase; no code
154-
merged. Identified as GAP-001 in the Technical Debt Ledger.
155-
- **Readability & Style Engine (Issue #9)**: Integrate pure readability metrics (Flesch-Kincaid) and style checks tailored for technical documentation.
156-
- **Semantic Linting (Issue #8)**: Implement AST-based rules to detect semantically duplicate headings, empty sections, and inconsistent heading jumps.
157-
- **Smart Link Graph & Connectivity Analysis (Issue #7)**: Build a directed graph of the documentation to detect unlinked pages and navigation cycles.
60+
- **Formal test coverage floor**: 85%+ branch coverage enforced in CI across all three supported Python versions.
61+
- **Certified plugin ecosystem**: a curated registry of community plugins that meet the Plugin SDK contract.
62+
- **Determinism audit**: formal proof-of-determinism report published for all Core (`Z1xx`) and Security (`Z2xx`) finding codes.
15863

15964
---
16065

@@ -172,4 +77,4 @@ These constraints apply across every future release:
17277

17378
---
17479

175-
Roadmap last updated: 2026-06-11
80+
Roadmap last updated: 2026-06-21

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build-backend = "hatchling.build"
1313

1414
[project]
1515
name = "zenzic"
16-
version = "0.14.0"
16+
version = "0.14.1"
1717
description = "Engineering-grade, engine-agnostic static analyzer and credential scanner for Markdown documentation"
1818
readme = "README.md"
1919
requires-python = ">=3.10"

src/zenzic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33
"""Zenzic — engine-agnostic static analyzer and credential scanner for Markdown documentation."""
44

5-
__version__ = "0.14.0"
5+
__version__ = "0.14.1"
66
__version_name__ = "Basalt" # Release codename stored separately from the package version.

0 commit comments

Comments
 (0)