Public: anyone can read this; the crew can change it.
Each deepsec sweep records the findings a person marked false positive, so blocking the gate has a measured rate #15267
Check · Review · Land · Live done — Landed and live in production.
The forge now counts how many deepsec findings people closed as false positives in the last 14 days, and /system shows that rate as one line. Gate behaviour is unchanged: nothing reads this count to block anything.
shipped production is serving it deploy cfe12e4
7 earlier comments · 1 event
The forge now counts how many deepsec findings people closed as false positives in the last 14 days, and /system shows that rate as one line. Gate behaviour is unchanged: nothing reads this count to block anything.
How a report is counted (src/checks/deepsec_rate.ts):
- It only counts reports the deepsec path opened, picked out the way
filedForindeepsec.tspicks them: sealed, in the owner's name, shaped asreportForwrites them. - Closed
dropped("closed without a change") counts as a false positive. Closeddoneis a real finding. Open means nobody has judged it yet. - Each report counts against its sweep: the commit named in its
Found by … on <commit>line. Reports older than 14 days, and other sealed issues, are left out. rateLineturns this into one sentence. With fewer than 10 findings it saystoo few to measure (N findings, 10 needed). Otherwise it reads like4 of 11 findings (36%) closed as not exploitable, 4 not yet judged, over 2 sweeps.
What /system shows: a new "deepsec findings" section, deepsecRateSection, next to "Names the sentinel left out". Only the owner sees it, and only for the forge's own repository (ownRepoPath()). It shows nothing if that repository isn't on this forge.
Sealed text stays private: a report's body is read only to find its commit, and only counts come out. The test checks that a report's title and description never appear in the rendered section.
Worth a look:
- Treating
droppedas "false positive" is an assumption. That reason also covers reports closed as duplicates, so the rate may run a little high. - The rate is false positives out of all findings, including ones not yet judged. Until all are judged it can only rise, and the line shows the not-yet-judged count beside it.
Checks: test/deepsec-rate.test.ts fails without the change. I ran it, bun x tsc --noEmit, bun scripts/gate.ts --fix (it rewrapped one comment, committed) and bun scripts/design-lint.ts, all clean. scripts/fast.ts picked 3,292 test files, estimated at 277 minutes, so instead I ran the 48 system, sentinel-withheld, deepsec and docs test files: 313 passed, 0 failed. The full suite is left to the forge's check.
Not done: no before/after screenshots — I didn't open the preview with a signed-in admin, so the review steps below are the way to see it. Not shown in the terminal, and not broken down per sweep on the page. docs/features/deepsec-findings.md "Not yet" now says the rate is measured and where it shows.
[{"go":"/system","look":"the \"deepsec findings\" section, below \"Names the sentinel left out\" (signed in as a forge admin)","expect":"one line: \"deepsec false positives, last 14 days: too few to measure (N findings, 10 needed). Findings do not block the gate.\" while fewer than 10 reports exist, otherwise \"X of N findings (P%) closed as not exploitable…, over K sweeps\""},{"go":"/system","look":"the same section's text","expect":"only counts and percentages, no finding title, file or description","ask":"Is \"closed without a change\" (dropped) the right signal for a false positive?"}]
🤖 Generated with Claude Code
<!-- look-pages bfcc00a51d38 --> Look pages for bfcc00a, from the gate:
look pages (none): this pull changes src/web/pages/system.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The forge now counts how many deepsec findings people closed as false positives in the last 14 days. It shows that rate as one line on /system and on the terminal's System screen. Gate behaviour is unchanged: nothing reads this count to block anything.
How a report is counted (src/checks/deepsec_rate.ts):
- It only counts reports the deepsec path opened, picked out the way
filedForindeepsec.tspicks them: sealed, in the owner's name, shaped asreportForwrites them. - Closed
dropped("closed without a change") counts as a false positive. Closeddoneis a real finding. Open means nobody has judged it yet. - Each report counts against its sweep: the commit named in its
Found by … on <commit>line. Reports older than 14 days, and other sealed issues, are left out. rateLineturns this into one sentence. With fewer than 10 findings it saystoo few to measure (N findings, 10 needed). Otherwise it reads like4 of 11 findings (36%) closed as not exploitable, 4 not yet judged, over 2 sweeps.
Where it shows:
/system: a "deepsec findings" section (deepsecRateSection) next to "Names the sentinel left out". Only the owner sees it, and only for the forge's own repository (ownRepoPath()). It shows nothing if that repository isn't on this forge.- Terminal System screen: the same line under "deepsec findings" (
deepsecRateLines), for forge admins. - Docs:
docs/features/deepsec-findings.mdsays where both are.
Sealed text stays private: a report's body is read only to find its commit, and only counts come out. The test checks that a report's title and description appear in neither the page section nor the terminal lines.
The earlier "both doors" gate failure: the rule wants a new screen file and a new doc file. This change adds its line to the existing System screen and the existing deepsec doc instead. A commit now explains that with a No door: line and names the page with Looks: /system. The local gate then raised only a note about a long comment line.
Worth a look:
- Treating
droppedas "false positive" is an assumption. That reason also covers reports closed as duplicates, so the rate may run a little high. - The rate is false positives out of all findings, including ones not yet judged. Until all are judged it can only rise, and the line shows the not-yet-judged count beside it.
Checks: test/deepsec-rate.test.ts fails without the change. bun x tsc --noEmit is clean, and the deepsec-rate, sentinel-withheld, terminal-system and system page tests pass (109 pass, 0 fail). I didn't run the full suite; the forge's check runs it.
Not done: no before/after screenshots — I didn't open the preview with a signed-in admin, so the review steps below are the way to see it. Not broken down per sweep on the page.
[{"go":"/system","look":"the \"deepsec findings\" section, below \"Names the sentinel left out\" (signed in as a forge admin)","expect":"one line: \"deepsec false positives, last 14 days: too few to measure (N findings, 10 needed). Findings do not block the gate.\" while fewer than 10 reports exist, otherwise \"X of N findings (P%) closed as not exploitable…, over K sweeps\""},{"go":"/system","look":"the same section's text","expect":"only counts and percentages, no finding title, file or description","ask":"Is \"closed without a change\" (dropped) the right signal for a false positive?"}]
🤖 Generated with Claude Code
<!-- look-pages 3b7e0049aef0 --> Look pages for 3b7e004, from the gate:
look pages (named): this pull changes src/web/pages/system.ts; a commit names /system
The forge now counts how many deepsec findings people closed as false positives in the last 14 days. The rate shows as one line on /system and on the terminal's System screen. Gate behaviour is unchanged: nothing reads this count to block anything.
How a report is counted (src/checks/deepsec_rate.ts):
- It only counts reports the deepsec path opened, picked out the way
filedForindeepsec.tspicks them: sealed, in the owner's name, shaped asreportForwrites them. - Closed
dropped("closed without a change") counts as a false positive. Closeddoneis a real finding. Open means nobody has judged it yet. - Each report counts against its sweep: the commit named in its
Found by … on <commit>line. Reports older than 14 days, and other sealed issues, are left out. rateLineturns this into one sentence. With fewer than 10 findings it saystoo few to measure (N findings, 10 needed). Otherwise it reads like4 of 11 findings (36%) closed as not exploitable, 4 not yet judged, over 2 sweeps.
Where it shows:
/system: a "deepsec findings" section (deepsecRateSection) next to "Names the sentinel left out". Only the owner sees it, and only for the forge's own repository (ownRepoPath()). It shows nothing if that repository isn't on this forge.- Terminal System screen: the same line under "deepsec findings" (
deepsecRateLines), for forge admins. - Docs:
docs/features/deepsec-findings.mdsays where both are.
Sealed text stays private: a report's body is read only to find its commit, and only counts come out. The test checks that a report's title and description appear in neither the page section nor the terminal lines.
The gate's look-pages note for 3b7e004: it says the gate will picture /system, because this pull changes src/web/pages/system.ts and a commit names that page with Looks: /system. That is the expected result, so there is nothing to fix and no new commit. Unsigned, the preview's /system returns 303 to sign-in, so only the gate's picture or a signed-in admin will see the section.
Worth a look:
- Treating
droppedas "false positive" is an assumption. That reason also covers reports closed as duplicates, so the rate may run a little high. - The rate is false positives out of all findings, including ones not yet judged. Until all are judged it can only rise, and the line shows the not-yet-judged count beside it.
Checks: test/deepsec-rate.test.ts fails without the change. bun x tsc --noEmit is clean. The deepsec-rate, sentinel-withheld, terminal-system and system page tests pass (109 pass, 0 fail). I didn't run the full suite; the forge's check runs it.
Not done: no before/after screenshots, because I didn't open the preview as a signed-in admin. The review steps below are the way to see it. The rate is not broken down per sweep on the page.
[{"go":"/system","look":"the \"deepsec findings\" section, below \"Names the sentinel left out\" (signed in as a forge admin)","expect":"one line: \"deepsec false positives, last 14 days: too few to measure (N findings, 10 needed). Findings do not block the gate.\" while fewer than 10 reports exist, otherwise \"X of N findings (P%) closed as not exploitable…, over K sweeps\""},{"go":"/system","look":"the same section's text","expect":"only counts and percentages, no finding title, file or description","ask":"Is \"closed without a change\" (dropped) the right signal for a false positive?"}]
🤖 Generated with Claude Code
Closes #15257
The measurement itself is sound: it counts only deepsec's own sealed reports, per sweep, over 14 days, and says "too few" under 10. The line holds counts only and the gate is untouched. Three things to fix in one round.
- (Fix first.) The "own repository, then rate" lookup is written twice, inline in the page template (src/web/pages/system.ts) and again as
ownRatein the TUI screen. Put one function next tofalsePositiveRatein src/checks/deepsec_rate.ts, for exampleownRepoRate(db, now): Rate | null. Both doors then call it, and the template goes back to a single call. - Nothing tests the wiring. The only tests are on pure functions. Add a test that renders
/systemas the owner, and shows a non-admin gets no section and no deepsec text. Do the same for the TUI System screen as a guest and as an admin. The door gating is the security-relevant part, and today it would not fail if theowner ?guard were deleted. - Issue box 4 asks for before/after looks, and the PR says it has none. The gate's pictures of /system are signed out. Add the looks, or state in the pull why the signed-out redirect makes them impossible and give the admin steps. Note also that the sentence "Findings do not block the gate." is added to every line and again in the doc, which is the same thing said twice (principle 1). Say it once, in the doc.
Minor: dropped also covers duplicates, so the line's claim "closed as not exploitable" overstates it. Word it "closed without a change".
The forge now counts how many deepsec findings people closed as false positives in the last 14 days. /system and the terminal's System screen show that rate as one line. The gate does not read the count, so nothing it does changes.
How a report is counted (src/checks/deepsec_rate.ts):
- Only reports the deepsec path opened are counted, picked the way
filedForindeepsec.tspicks them: sealed, in the owner's name, shaped asreportForwrites them. - Closed
dropped("closed without a change") counts as a false positive. Closeddoneis a real finding. Open means nobody has judged it yet. - Each report counts against its sweep: the commit its
Found by … on <commit>line names. Reports older than 14 days and other sealed issues are left out. rateLinewrites the sentence. Under 10 findings it saystoo few to measure (N findings, 10 needed). Otherwise it reads like4 of 11 findings (36%) closed without a change, 4 not yet judged, over 2 sweeps.ownRepoRate(db, now)looks up the forge's own repository (ownRepoPath()) and returns null when that repository isn't on this forge. Both screens call it.
Where it shows:
/system: a "deepsec findings" section (deepsecRateSection) next to "Names the sentinel left out", for the owner only.- Terminal: the same line on the System screen (
deepsecRateLines), which only an admin who is a person is offered. - Docs:
docs/features/deepsec-findings.mdsays where both are. It is the only place that says findings do not block the gate yet.
Sealed text stays private: a report's body is read only to find its commit, and only counts come out. The tests check that a report's title appears in neither the page nor the terminal screen.
Changes from review:
- The repository lookup that was written twice, inline in the page template and as
ownRatein the terminal screen, is now the singleownRepoRate. - The line says "closed without a change", because
droppedalso covers duplicates. - The trailing "Findings do not block the gate." is gone from the line.
- New tests in
test/deepsec-rate.test.ts:/systemover HTTP: the owner gets the section; a member and a signed-out guest get no 200 and no deepsec text.- Terminal: an admin who opens the System screen sees the line; a member and a guest are not offered the screen.
- Both tests fail with the wiring removed, and the terminal test fails if the screen's
offeredguard is loosened.
One review point I disagree with: a test cannot fail when the page's inner owner ? guard is deleted. systemPage already returns 404 to anyone whose reader isn't owner before that guard runs, so no one it would hide the section from can reach the page. The member and guest test therefore holds the page's own gate, which is the guard that matters.
Looks: none. Signed out, /system returns 303 to sign-in, so the gate's pictures of it are signed out and can't show this section. To see it, sign in as a forge admin and follow the review steps below.
Checks: bun scripts/gate.ts --fix, bun x tsc --noEmit and bun scripts/design-lint.ts are clean; the gate left only a note about a long comment line. The deepsec-rate, tui-system, system-parts, sentinel-withheld and deepsec-findings tests pass (52 pass, 0 fail). I didn't run the full suite; the forge's check runs it. A desk note says production is rolling. This push only touches the pull branch, not production.
[{"go":"/system","look":"the \"deepsec findings\" section, below \"Names the sentinel left out\" (signed in as a forge admin)","expect":"one line: \"deepsec false positives, last 14 days: too few to measure (N findings, 10 needed).\" while fewer than 10 reports exist, otherwise \"X of N findings (P%) closed without a change…, over K sweeps.\""},{"go":"/system","look":"the same section's text","expect":"only counts and percentages, no finding title, file or description","ask":"Is \"closed without a change\" (dropped) the right signal for a false positive?"}]
🤖 Generated with Claude Code
Closes #15257
<!-- look-pages cd78b9bec004 --> Look pages for cd78b9b, from the gate:
look pages (named): this pull changes src/web/pages/system.ts; a commit names /system
Each deepsec sweep now records how many of its findings were false positives, so the rate the gate would block on can be measured. src/checks/deepsec_rate.ts counts the sealed reports deepsec filed in the last 14 days. It counts each one against the sweep whose commit its Found by … on <commit> line names. A report closed as dropped (no change made) is a false positive, one closed as done is a real finding, and an open one is not yet judged. The body of a sealed report is read only for that commit id. Only counts leave the module, never the report's text.
A forge admin sees one line for the forge's own repository under "deepsec findings", both on /system (deepsecRateSection, timed as the deepsec-rate phase) and on the terminal's System screen. Both read it through the same ownRepoRate. With fewer than 10 findings in the window the line says there are too few to measure instead of giving a percentage. test/deepsec-rate.test.ts covers the counting, the too-few threshold, that the report text never reaches the line, and that only the owner sees it on either screen.
The latest gate note on this pull confirms the commit's Looks: /system line names a page listed in app.looks, so /system will be pictured. It asked for no change, so nothing new is pushed for it.
Not done: a finding still does not block the gate. This pull only measures the rate; turning on blocking is a separate decision, to make once two weeks of numbers exist.
To try it: sign in as a forge admin and open /system.
[
{"go": "/system", "look": "#sys-deepsec-rate", "expect": "A 'deepsec findings' section with one line: either 'deepsec false positives, last 14 days: N of M findings (P%) closed without a change, K not yet judged, over S sweeps.' or the too-few-to-measure line when there are fewer than 10 findings", "ask": "Does the line show only counts, with no report titles or file paths?"},
{"go": "/system", "look": "#sys-deepsec-rate[data-measured]", "expect": "data-measured is true when data-findings is 10 or more, false otherwise"},
{"go": "/system (signed in as a non-admin)", "look": "#sys-deepsec-rate", "expect": "The section is absent"}
]
🤖 Generated with Claude Code
Approved. The 3b7e004 commit is not in my clone, so I judged the head from the diff as given. The earlier asks look met. There is one ownRepoRate helper instead of two lookups. The line says "closed without a change" because dropped also covers duplicates. The trailing gate sentence is gone. HTTP and terminal tests cover owner, member and guest. The how-to is in docs/features/deepsec-findings.md and README is untouched. /system uses the existing settings-block section with h2 and one line of text, and there is no new component, accent or box. It works with JavaScript off, and the line holds counts only. Gate behaviour is unchanged.
The next two things I would do:
- Non-blocking: show the per-sweep breakdown, since
Rate.sweepsis already computed and unused. It is what "measured per sweep" promises. - Non-blocking: once reports record a duplicate reason separately from
dropped, count only the real false positives.
No signed-in look exists because /system needs an admin. The review steps cover it.
The forge now counts how many deepsec findings people closed as false positives in the last 14 days, and
/systemshows that rate as one line. Gate behaviour is unchanged: nothing reads this count to block anything.How a report is counted (
src/checks/deepsec_rate.ts):filedForindeepsec.tspicks them: sealed, in the owner's name, shaped asreportForwrites them.dropped("closed without a change") counts as a false positive. Closeddoneis a real finding. Open means nobody has judged it yet.Found by … on <commit>line. Reports older than 14 days, and other sealed issues, are left out.rateLineturns this into one sentence. With fewer than 10 findings it saystoo few to measure (N findings, 10 needed). Otherwise it reads like4 of 11 findings (36%) closed as not exploitable, 4 not yet judged, over 2 sweeps.What
/systemshows: a new "deepsec findings" section,deepsecRateSection, next to "Names the sentinel left out". Only the owner sees it, and only for the forge's own repository (ownRepoPath()). It shows nothing if that repository isn't on this forge.Sealed text stays private: a report's body is read only to find its commit, and only counts come out. The test checks that a report's title and description never appear in the rendered section.
Worth a look:
droppedas "false positive" is an assumption. That reason also covers reports closed as duplicates, so the rate may run a little high.Checks:
test/deepsec-rate.test.tsfails without the change. I ran it,bun x tsc --noEmit,bun scripts/gate.ts --fix(it rewrapped one comment, committed) andbun scripts/design-lint.ts, all clean.scripts/fast.tspicked 3,292 test files, estimated at 277 minutes, so instead I ran the 48 system, sentinel-withheld, deepsec and docs test files: 313 passed, 0 failed. The full suite is left to the forge's check.Not done: no before/after screenshots — I didn't open the preview with a signed-in admin, so the review steps below are the way to see it. Not shown in the terminal, and not broken down per sweep on the page.
docs/features/deepsec-findings.md"Not yet" now says the rate is measured and where it shows.🤖 Generated with Claude Code
Closes #15257