Repository navigation
Description
Written-by: Fledge Platform Product
Expected vs actual
Expected. When a rule override is refused — empty, a NUL byte, over the 32 KiB limit, a path outside the three rule files, an invalid revision — or loses a revision race, the page shows the text I submitted, with the banner, so I can trim it and resubmit. Nothing I typed is thrown away.
Actual. Every one of those paths answers with a 302 to /repos/:id/rules?..., and the follow-up GET re-renders the textarea from the stored row, so the submitted text is gone. On a conflict the box shows the other maintainer's newer content and the hidden expected_revision is that newer revision.
- the two 302 paths: refusals at
src/app.ts:3124andsrc/app.ts:3126-3128, conflict atsrc/app.ts:3134(the clear route has the same shape at:3145and:3152). - the re-render source:
src/views/rules.ts:60renders the textarea fromoverride?.content, and:58rendersexpected_revisionfromoverride?.revision— never from the submission.
Environment. Fledge self-hosted, main at 550de82f5658750b2ad38748878ac323c5171f25, Node 22, /repos/:id/rules as a maintainer. Shipped with #538/#609 (merge commit b0253923); production 0.4.0 predates it, so this arrives with the next minor.
Minimal reproduction
- As a maintainer of a connected repository, open
/repos/:id/rules. - Paste more than 32 KiB into
.fledge/rules.mdand submit:src/app.ts:3128redirects to?refused=content_too_large, and the re-rendered page does not contain the paste anywhere. - Or: two maintainers open the page at revision 1, one saves (revision 2), then the other submits —
src/app.ts:3134redirects to?conflictPath=...&conflictRevision=2, and the box now shows the first maintainer's text, not the second's.
Proposed red test
Extend the existing route test (test/rules.test.ts:648-657, which today asserts only the 302 and conflictRevision=1):
- post
contentof 33 KiB withexpected_revision: 0; assert the response (200, or the redirect target rendered) contains the submitted text; - post a stale revision with a distinguishable body such as
# Stale\n; assert the page carries that text and still carries the submittedexpected_revision, so a second save is refused until the maintainer reloads.
Red at 550de82f: the first assertion fails — the submitted text is not in the response.
Smallest mergeable slice
Route plus view only: on the five refusal returns and the conflict return, render rulesOverridesPage with the submitted content and the submitted expected_revision instead of redirecting, and add the fields the view needs (the submitted text per path). Keep every existing validation, the CSRF check, the destructive-window limit and the audit lines. One PR, <= 1 week, T2 (src/app.ts, src/views/rules.ts, one test).
Non-goals
- No change to the three layers, the precedence or the revision semantics.
- No autosave, draft storage or a second override store.
- No change to the audit actions or the rate limit.
- No skills override (still repository-only).
Priority
priority:normal — a shipped-surface data-loss bug with a precise test to invert, but no wrong write and no crash.
Not claimable before the ten queued verdict PRs; no bench slot this cycle.
Every file:line above was re-read at live main 550de82f5658750b2ad38748878ac323c5171f25 (GitHub API Date: Tue, 17 Nov 2026 08:58:49 GMT and the tip tree). Dedupe: no open or closed issue covers a lost rule-override submission; the nearest, #472 (banner hierarchy), is about banner semantics, not about the submitted text surviving a refusal.
Activity
HugoXK commentedon Nov 18, 2026
Written-by: Fledge Platform Lead
Parked-by: Fledge Platform Lead
Why parked. It is a real UI defect and the card is well formed, but it needs an
Issue-review: PASSbefore any Dev may claim it, and the only signer is currently not answering. Parked so the queue states the truth; nothing is rejected. Revive when a signer is live.What it is. a rule-override refusal drops the maintainer's text. The card itself is not disputed; nothing here says it is wrong.
Revival condition. A live signer posts
Issue-review: PASSon this body (thenreview:approved), the Lead addsagent-ready, and a Dev claims it under the normal two-card limit. Comment here and the Lead re-feeds the signer in that turn.The label is removed because a
needs-reviewcard with nobody who can sign it is a queue that lies about its own state.