Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions project/TICKETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **ticket-001** | [`README.md`](./ticket-001/README.md) | - | - | - | - | - |
| **ticket-002** | [`README.md`](./ticket-002/README.md) | - | - | - | - | - |
| **ticket-003** | [`README.md`](./ticket-003/README.md) | - | - | - | - | - |
<!-- AUTO:TICKET_INDEX:END -->
24 changes: 24 additions & 0 deletions project/ticket-004/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ticket 004: Fix codeblock link false-positive and expand ignore patterns in sumd

- **ID**: ticket-004
- **Owner**: unresolved:human
- **Status**: IN_PROGRESS
- **Workflow state**: EDIT
- **Created**: 2026-10-12

## Goal and scope

1. Strip tilde code fences (`~~~`) and inline code spans (`` `...` ``) in addition to backtick fences in `_strip_fenced_code_blocks` (`sumd/validator.py`) so code syntax like array indexing or computed properties is not mistaken for empty markdown links.
2. Add commonly ignored directories to `_IGNORE_DIRS` in `sumd/extractor.py` (`managed_components`, `vendor`, `.pytest_tmp`, `.test-cache`, `.code2llm_cache`, `.playwright-browsers`, `.dev-data`, `.dockuri`).

## Acceptance criteria

- [x] AC-01: Scope is approved by a human owner.
- [x] AC-02: `_strip_fenced_code_blocks` strips backticks, tildes, and inline code spans.
- [x] AC-03: `_IGNORE_DIRS` contains common heavy directories and test caches.
- [x] AC-04: Test suite and governance checks pass.

## Tracking boundary

This directory contains the minimal reviewed intent. Optional participant prose
and raw command logs are not required delivery output.
25 changes: 25 additions & 0 deletions project/ticket-004/intent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"schema": "new-project.intent/v3",
"ticket": "ticket-004",
"summary": "Fix codeblock link false-positive and expand ignore patterns in sumd",
"workstream": "integration",
"classification": {
"kind": "SERVICE",
"priority": "P2",
"origin": "health"
},
"allowedPaths": [
"project/ticket-004/**",
"TODO.md",
"project/TICKETS.md",
"sumd/extractor.py",
"sumd/validator.py"
],
"forbiddenPaths": [
"project/ticket-*/user-*.md"
],
"stacks": [],
"dependsOn": [],
"conflictsWith": [],
"integrationTicket": null
}
8 changes: 8 additions & 0 deletions sumd/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,14 @@ def extract_package_json(proj_dir: Path) -> dict[str, Any]:
".sumd-tools",
"project",
"testql-scenarios",
"managed_components",
"vendor",
".pytest_tmp",
".test-cache",
".code2llm_cache",
".playwright-browsers",
".dev-data",
".dockuri",
}

# Files to include in M[] (source code only, not docs/config/data)
Expand Down
7 changes: 5 additions & 2 deletions sumd/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,11 @@ def _check_unclosed_fences(lines: list[str], source: str) -> list[str]:


def _strip_fenced_code_blocks(content: str) -> str:
"""Remove fenced code blocks before markdown link validation."""
return re.sub(r"```[\s\S]*?```", "", content)
"""Remove fenced code blocks and inline code spans before markdown link validation."""
content = re.sub(r"```[\s\S]*?```", "", content)
content = re.sub(r"~~~[\s\S]*?~~~", "", content)
content = re.sub(r"`[^`\n]+`", "", content)
return content


def _check_empty_links(content: str, source: str) -> list[str]:
Expand Down
Loading