You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): resolve anchor validation and extend experiments test coverage
Fix link_checker _text_to_anchor to match GitHub slugger behavior by
replacing each space individually instead of collapsing consecutive
whitespace. This resolves broken #security--compliance-patterns and
#monitoring--maintenance-patterns anchor validation.
Add 23 new tests covering experiments/README.md: pattern spec compliance,
Mermaid diagram validation, code block syntax, link integrity, and
examples index consistency. Add experimental_pattern_parser.py utility.
Fix notify-failure job: add issues:write permission and upgrade
actions/github-script from v6 to v7.
Add /xaudit-experiments slash command prompt for manual LLM-powered
deep audits of the experiments directory.
Audit and fix the experiments/ directory (experiments/README.md, experiments/NOTES.md, and all experiments/examples/**/README.md plus their supporting files). Run these checks in parallel, then fix what you find:
2
+
3
+
1. Runnable code audit: For every fenced code block (python, bash, yaml, json), verify:
4
+
- Python: imports exist in stdlib/PyPI, function signatures match real APIs, class definitions are syntactically valid. Flag datetime.utcnow(), Pydantic v1 syntax, and other deprecated calls.
5
+
- Bash: commands and flags are real (no fabricated CLI options). Verify referenced file paths (e.g., scripts/promote-test.sh, .ai/hooks/protect-golden.sh) exist on disk where claimed.
6
+
- YAML: valid syntax, correct GitHub Actions schema (uses: keys reference real actions at current major versions), Docker Compose v2 syntax (not v1 version: key).
Prioritize anything that would fail if copy-pasted.
9
+
10
+
2. Pattern spec compliance (against pattern-spec.md): Each pattern in experiments/README.md must have:
11
+
- Two-word Title Case name (per naming rules)
12
+
- Maturity, Description, Related Patterns fields
13
+
- At least one implementation section
14
+
- An Anti-pattern section
15
+
- All Related Patterns hyperlinked with working anchors
16
+
Flag any pattern missing required sections or violating naming rules.
17
+
18
+
3. Internal consistency:
19
+
- Cross-check the experiments/examples/README.md index against actual subdirectories in experiments/examples/ (flag missing or extra entries).
20
+
- Verify that file references in any README (e.g., "see scripts/promote-test.sh") match actual filenames on disk.
21
+
- Check that Mermaid diagram node labels match the pattern names used in prose and the reference table.
22
+
23
+
4. Link integrity: Verify every internal anchor link resolves correctly. Apply GitHub's anchor generation rules:
24
+
- lowercase, spaces to hyphens, strip punctuation except hyphens
25
+
- special chars like & are omitted (not double-dash)
26
+
- duplicate anchors get -1, -2 suffixes
27
+
Flag any broken anchor references.
28
+
29
+
5. Security review of examples: In all Python, Bash, and YAML files under experiments/examples/:
30
+
- No hardcoded credentials, tokens, or API keys
31
+
- Shell scripts quote variables and validate inputs
32
+
- File operations check for path traversal (no unsanitized user input in open()/os.path.join())
33
+
- Claims of read-only or network_mode: none are actually enforced in the code/config
34
+
- File permission claims (e.g., chmod 444) match what the scripts actually set
35
+
36
+
For each issue found, fix it directly in the file rather than just reporting it. After all fixes, provide a summary grouped by check category with file:line references.
0 commit comments