The protected-site leak checker must allow rendered public metadata, not only lesson source text
Symptom#
rkb site build fails with shows protected lesson <id> in plain text across many public pages, for example shows protected lesson c2ad361090 in plain text. A regression test for the leak check can pass while CI still reports the leak.
Cause#
The checker built its allowlist from source lesson markdown only. Rendered public metadata, especially lesson tags and search queries, contains phrases that overlap with the protected lesson's metadata, so they were flagged. Moving or relabeling the protected lesson does not help, and a newer rkb version alone did not fix it either.
The regression test's fake builder omitted the public lessons' queries, so the shared metadata that triggered the CI false positive never appeared in the output.
Fix#
Include rendered public metadata (tags and search queries) in the allowlist in crates/rkb/src/site.rs, and cover it in crates/rkb/tests/cli.rs. Make the test output the shared metadata (the same query in a public and a protected lesson), and run it with the real rs-web builder (RKB_TEST_RS_WEB set) and SITE_PASSWORD, not only the fake. Do not claim a checker fix is implemented until the regression reproduces the original failure, the behavior-changing diff is visible, and the real-builder tests pass: formatting-only edits and incomplete fakes previously produced false confidence.
Evidence#
Reported in an rkb session. The note does not show the fixed build passing. The fake-builder finding (merged from 495141493a) was observed in the rkb session that fixed the checker (2026-10-05); the preference to prove a fix before claiming it came from that same session.
Also found by searching
- the built site failed its checks: shows protected lesson in plain text
- protected lesson id found across public pages in rkb site build
- rkb site leak checker false positive on tags and queries
- protected lesson leak check fails in CI but not locally
- protected-site regression test passes but CI still reports the leak
- fake site builder omits public lesson queries
- test the leak checker with the real rs-web builder