Skip to content

fix(holocron): citation rendering and GitHub permalink source labels#98

Open
th3w1zard1 wants to merge 16 commits into
mainfrom
feat/holocron-topnav-ci-followup
Open

fix(holocron): citation rendering and GitHub permalink source labels#98
th3w1zard1 wants to merge 16 commits into
mainfrom
feat/holocron-topnav-ci-followup

Conversation

@th3w1zard1
Copy link
Copy Markdown
Contributor

Summary

Holocron grounded answers no longer leak raw markdown links or duplicate numbered bibliographies in the visible answer body. Sources cards use GitHub permalink labels (README.md#Ln) instead of mistaken githubusercontent.com/owner/repo paths when passages embed raw CDN URLs.

Follows merged PR #97 (public API status); this PR ships citation presentation and permalink labeling commits that remained on the feature branch.

Changes

  • Answer body: strip spaced [label] (https://…) markdown, preserve [n] citation badges, peel trailing numbered bibliographies only when lines contain URLs.
  • GitHub citations: inferGitHubFilePath ignores URL segments; webCitationDisplayLabel sanitizes malformed blob paths.
  • Holocron UI: shared answer-presentation helpers; merge API sources with parsed lines using permalink URLs for display names.
  • Tests: scripts/answer_presentation.test.mjs, packages/trask/src/github-citation-url.test.ts.

Test plan

  • node --import tsx/esm --test scripts/answer_presentation.test.mjs
  • node --test packages/trask/dist/github-citation-url.test.js
  • Local :4010 reone query — grounded answer, citations [1][5], KotOR.js permalink …/README.md#L1 in provenance
  • CI (pnpm trask:gate:ci, holocron workflows)

Residual review findings

  • Minor: peelEmbeddedNumberedSources may still attach prose after a two-line numbered block to sourceText (CORR-002); single trailing numbered source line is not peeled (CORR-003). Tracked for a follow-up if user reports.

Plan

docs/plans/2026-06-04-008-feat-holocron-citation-permalink-lfg-closeout-plan.md

Harden ci_warm_trask_embed cache probe and attempts validation; grant
build-and-test actions: write so Actions cache can save FastEmbed/Chroma.
Use /projects, /faq, and /formats instead of hash anchors to match
openkotor/site routing.
Holocron browser MCP 5/5 on :4010 with fresh threads; refresh evidence
and mark pass-5 plan completed after PR #96 merge.
…ealth

The qa-webui was stuck on Dispatching because trask-worker proxied to an HF
Space in ERROR (503) with no UI feedback. Add upstream health probing on the
worker, structured API errors, a Holocron backend status banner, bounded retry
failure messages, BASE_URL-safe assets, Spark stub for Pages builds, and CI
scripts that block deploy when /healthz or /api/trask/ask are unhealthy.
Strip spaced markdown links and images from visible answer text while
preserving [n] markers, move trailing numbered bibliography into the
Sources panel when the model omits a heading, and tighten compose-side
markdown cleanup in grounded-evidence.
Strip http URLs before inferring repo file paths, sanitize malformed blob
segments to README.md, and share webCitationDisplayLabel with Holocron via
@openkotor/trask/github-citation-url. Refresh docs/solutions for e2e paths,
gate floor 165, and Holocron source-card contract.
Apply code-review autofix: numbered instructional steps without links
stay in the answer body. Add regression test and LFG closeout plan 008.
When API sources merge with parsed bibliography lines, prefer the
explicit citation URL and webCitationDisplayLabel so KotOR.js cards
show README.md#Ln instead of raw.githubusercontent path noise.
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Offline Playwright gate for five Discord /ask import-smoke embeds via a
static harness; share display audit with verify_trask_discord_live. Holocron
Playwright now rejects githubusercontent source labels and spaced markdown links.
Add plan 010 closeout for Discord harness + Holocron Playwright ladder.
All Playwright gates and agent-browser smoke verified on PR #98 branch.
Prior pushes after 6a54267 only ran CodeQL; empty commit to queue full CI.
Keep webCitationDisplayLabel integration, URL-required bibliography peel,
and permalink merge labels from the citation e2e branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant