CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat(repo): the page notices when it contradicts itself #5588

MergedXSccantynz wants to mergefeat/rendered-fact-crosscheckmainopened 1d ago
ccantynzcommented 1d ago

ccantynz/Vapron rendered "Updated 9d ago" in its header, directly above a file list whose newest entry read "19 days ago". Same repository, same question — when did something last happen here — ten days apart, on one screen.

Nothing noticed. The owner did, by eye. That's the part this fixes — not the number, which is already corrected, but that a person was the detector.

Why nothing caught it

Every individual signal was internally consistent. The column was a real column, the commit dates were real dates, nothing threw, no test failed. The contradiction existed only between two derivations of one fact, and nothing was looking there.

Same shape as the rest of this week: a typecheck reporting a bare exit code, a healer filing 405 identical shrugs, a gate crediting a check that never ran, an MX accepting mail it discarded.

What it does

The repo home page compares the two freshness numbers it's about to print, and records a finding when they disagree by more than twelve hours.

Both values are already computed there — so this adds no query, no git call, no I/O to the render path. The only work is a fire-and-forget write when a contradiction is found, deduplicated by the error store's fingerprint.

Twelve hours rather than minutes because the two are derived differently on purpose: a push lands commits authored earlier, a merge carries old dates. Hours of gap is normal, and a check that fires on normal gets muted — at which point it protects nothing. Vapron's gap was ten days.

Reported, never repaired

Quietly adjusting a rendered value would erase the evidence that something upstream is wrong — exactly how the original survived, because the page looked fine.

Deciding which value is right stays in repo-freshness.ts, where the precedence rule and corroboration test live. This asks the smaller question — do these two numbers contradict each other — and is honest about not answering the larger one.

Absence is never disagreement: a fact with no value is skipped, and fewer than two known values yields no opinion. "We could not compute this" isn't a contradiction, and reporting it would fill the log with pages that simply had nothing to show.

Tests

Seven, including the literal Vapron timestamps and the threshold boundary in both directions.

Verified by mutation: widening the tolerance past the real gap makes the check go quiet on the exact bug it exists for — and fails the suite.

ccantynzAI Reviewcommented 1d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

gluecron[bot]🤖 botAI Reviewcommented 1d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts