|
|
249142df2f
|
feat(voyage): vendor markdown-it/highlight.js + playground render-pipeline + scripts/render-artifact.mjs CLI — v4.2 Step 8 [skip-docs]
Vendored libs (locked headless via scripts/vendor-playground-libs.mjs;
plan-critic B3 — never use highlightjs.org website builder):
- playground/lib/markdown-it.min.js — markdown-it@14.1.0 UMD bundle
- playground/lib/markdown-it-front-matter.min.js — markdown-it-front-matter@0.2.4 IIFE-wrapped
- playground/lib/highlight.min.js — highlight.js@11.11.1 (5-lang bundle:
yaml/json/javascript/bash/markdown/diff)
- playground/lib/VENDOR-MANIFEST.json — pin record + audit trail
scripts/vendor-playground-libs.mjs implements the reproducible
CommonJS-to-IIFE wrapping. Re-vendoring requires only:
node scripts/vendor-playground-libs.mjs
Render pipeline in playground/voyage-playground.html (~330 LoC total):
- inline <script src=lib/...> for the three vendored bundles
- markdown-it init with html: true (preserves voyage:anchor comments)
- front-matter plugin with pre-render-then-wrap pattern (research/03)
- paste-import-row textarea + Render/Sample/Clear buttons
- voyage-viewport region with role + aria-live for A11Y
- localStorage key pattern: voyage_ann_<project>__<slug> (risk-assessor H7)
- inline sample plan (mirrors annotation-plan.md fixture)
scripts/render-artifact.mjs CLI (~200 LoC) — brief SC1 + SC11:
- reads input.md, runs same vendored pipeline server-side
- inlines DS CSS + (URL-stripped) highlight.js into output
- zero http://https:// URLs in output (verified by test)
- deterministic: two invocations -> byte-identical sha256
- default output: <input>.html next to input
Test coverage:
- tests/scripts/render-artifact.test.mjs — 5 cases (SC1/SC11)
- tests/playground/voyage-playground.test.mjs — +5 cases (Step 8 extension)
Verify: node --test tests/playground/voyage-playground.test.mjs
tests/scripts/render-artifact.test.mjs -> 18 pass / 0 fail.
Full npm test: 587 pass / 0 fail / 2 skipped (Docker).
Refs plan.md Step 8 + plan-critic B3 + scope-guardian B1.
|
2026-05-09 15:20:17 +02:00 |
|
|
|
2349d1d431
|
feat(voyage): add lib/exporters/textfile-format.mjs — Prometheus text-format pure transform SC #12
Step 9 av v4.1-execute (Wave 2, Session 3).
Pure function transformToPrometheus(records) → Prometheus text-format 0.0.4.
Hard rules:
- NO client-side timestamps (research/01 node_exporter#1284 mitigation)
- Allowlist-redacted records ONLY (caller responsibility — Step 11 enforces)
- UTF-8 metric names normalized: lowercase, [.\\-\\s] → _, voyage_ prefix
- Empty input → empty string output
- Sorted output for determinism (snapshot-test-friendly)
Heuristic metric typing:
- counter: *_total, *_count, *_passed, *_failed, *_skipped
- histogram: *_ms, *_duration, *_p\\d+, *_seconds
- gauge: everything else (Prometheus convention)
Snapshot: tests/fixtures/expected.prom byte-for-byte match.
Regenerate: node scripts/gen-expected-prom.mjs > tests/fixtures/expected.prom
Tester (6 nye, baseline 400 → 406):
- Snapshot byte-for-byte match (SC #12)
- Empty input handling (null, undefined, [])
- Allowlist-redaction sanity (post-bash-stats uten command_excerpt)
- NO client-side timestamps (token-count-assertion per linje)
- normalizeMetricName edge-cases
- Determinism (identisk input → identisk output)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-09 09:30:58 +02:00 |
|
|
|
7a90d348ad
|
feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs]
Session 5 of voyage-rebrand (V6). Operator-authorized cross-plugin scope.
- git mv plugins/ultraplan-local plugins/voyage (rename detected, history preserved)
- .claude-plugin/marketplace.json: voyage entry replaces ultraplan-local
- CLAUDE.md: voyage row in plugin list, voyage in design-system consumer list
- README.md: bulk rename ultra*-local commands -> trek* commands; ultraplan-local refs -> voyage; type discriminators (type: trekbrief/trekreview); session-title pattern (voyage:<command>:<slug>); v4.0.0 release-note paragraph
- plugins/voyage/.claude-plugin/plugin.json: homepage/repository URLs point to monorepo voyage path
- plugins/voyage/verify.sh: drop URL whitelist exception (no longer needed)
Closes voyage-rebrand. bash plugins/voyage/verify.sh PASS 7/7. npm test 361/361.
|
2026-05-05 15:37:52 +02:00 |
|