Skip to content

fix: release validation for usage scans, bucket creation, quotas and bucket UI - #80

Merged
Vonng merged 11 commits into
mainfrom
claude/release-validation-20261104
Nov 4, 2026
Merged

Vonng merged 11 commits into
mainfrom
claude/release-validation-20261104

Conversation

@Vonng

@Vonng Vonng commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Contribution Licensing (no CLA, inbound=outbound, DCO required)

This pull request contributes to PGSTY SILO Console (pgsty/silo-console).
Code contributions are accepted under
GNU AGPL v3.0 or later
(AGPL-3.0-or-later), the same license as SILO Console.
By submitting this pull request I represent that I have the right to contribute
the changes under that license and retain copyright in my original work.
No CLA, copyright assignment, or separate Apache-2.0 license grant is required.
Existing copyright and license notices remain intact; separately licensed
material keeps its applicable terms. Every commit must carry a DCO
Signed-off-by trailer (git commit -s); see
CONTRIBUTING.md.

Description and motivation

Pre-release validation of main after #79 (5175e5c). This re-checks the #75–#78 and #70 fixes against the current code and fixes the new problems it found.

Usage worker

  • Refresh could not restart a limited scan. A limited or failed job keeps its checkpoint, and that checkpoint carries the original scan deadline. Every explicit Refresh resumed it and ended limited again without listing anything. An explicit refresh now discards the checkpoint and partial progress and starts a fresh scan with a new budget. Automatic retries, events and reconciliation still leave limited jobs alone, so over-budget buckets are not re-listed continuously.
  • Change events could be lost while coverage reported healthy. SILO's pubsub.Publish silently drops notifications for a subscriber that stops reading, without ending the stream. The observer read events on the same loop that runs reconciliation and database flushes. The stream is now read on its own goroutine into one pending invalidation per bucket.

Bucket creation

  • Locking or retention combined with versioning exclusions was created without the exclusions. It is now rejected before any bucket exists.
  • New coverage: an existing bucket is never removed, a bucket that became non-empty is reported as possibly remaining, and a browser disconnect after creation still rolls back with an independent context.

Quota and byte formatting

  • The quota editor never set its loading state, so repeated submits wrote repeatedly.
  • "Ei" is removed from both quota forms; even 0.01 Ei exceeds the exact JSON integer range.
  • An existing quota of 8 PiB or more gets a specific explanation pointing to mcli.
  • niceBytes now uses the MDS calculateBytes parser. null, blank, hexadecimal and negative input is N/A, not "0 B" or "16 B".
  • Both helpers carry into the next unit, so 1048575 bytes shows as 1.0 MiB instead of 1024 KiB.

Bucket list usage

  • Saved observations are validated before exact sorting; a malformed byte string is unknown, not a BigInt crash.
  • A temporarily unavailable bucket keeps the current totals already shown. Retained data is dropped, and forbidden or missing buckets still clear everything.
  • A Refresh interrupted by a bucket-list reload is carried into the next run instead of being dropped. Foreground rows no longer stay "running" after an abort.

UI (reviewed at 1440/1024/768/390 px, light/dark, en/zh, with 1000+ buckets)

  • Long names were hard-clipped without an ellipsis.
  • The header row inherited the 64 px body row height.
  • A size sort showed no direction arrow ("Current size" pushed it out of the cell).
  • "Retained: 9.5 MiB" was clipped mid-value.
  • Card metrics shifted between cards.
  • Captions used ad-hoc inline styles rather than the muted caption token.
  • The zh UI showed browser-locale times, ASCII colons and spaces between sentences.
  • The folder-size panel drew a second box inside the listing card.
  • The size column was tuned to one platform's font and clipped on Linux fallback fonts.
  • The phone toolbar overflowed and scrolled the page sideways.

Validation

Run locally against SILO built from current pgsty/silo main and PostgreSQL 18, with Node 24.22.1 and Yarn 4.13.0:

Check Result
go test ./... pass
go test -race -p 1 -tags=integration,storageintegration ./pkg/usage ./api -count=1 -timeout=10m pass
make verifiers pass (0 lint issues)
git diff --check clean
yarn typecheck, yarn exec prettier . --check clean
Playwright --project=unit 753 passed
Playwright --project=chromium (Console + usage worker + 4-drive SILO) 96 passed (88 existing + 8 new layout cases)
yarn check:bundle budgets passed

Each new regression test was run against the previous implementation and fails there:

  • two worker integration tests;
  • four bucket-usage hook tests;
  • four table layout tests, against an origin/main Console build.

The layout test runs every width with the default font and with a forced wide font (Verdana, close to the DejaVu Sans that Chromium uses for system-ui on Ubuntu). An earlier CI run caught "Retained: 9.5 MiB" overflowing on Linux fonts. The size column now has a font-relative minimum (15ch), and the retained line may wrap between label and value; the value never clips.

Follow-up after an independent adversarial review:

  • fixed a knip dead-code failure;
  • the observer releases its lease before waiting for the event stream (minio-go's reconnect backoff sleeps without watching the context);
  • the folder-size panel stays visible in folders whose current listing is empty, as on main.

web-app/build is a production rebuild (make build-static).

Compatibility and documentation impact

  • API: POST /api/v1/buckets now returns 400 for locking/retention plus versioning exclusions. That configuration was previously accepted and silently changed. No schema or wire changes otherwise; the int64 quota API is unchanged.
  • Worker: no migration. A manual Refresh on an error/limited bucket now clears its checkpoint and progress.
  • Frontend: bucket and quota UI only; the i18n coverage suite passes.
  • Known, not changed:
    • a backend quota above about 8 EiB still wraps negative in int64 (the browser shows N/A);
    • usage authorization probes run on every status poll for every bucket, as documented;
    • the bucket header and Summary page still show the storage scanner's size beside the list's "Current size".

Checklist

  • All commits are signed off (git commit -s) per the DCO
  • Relevant tests and checks pass
  • Compatibility and UI impact documented
  • Public documentation update opened in pgsty/silo.pgsty.com, if needed — pgsty/silo.pgsty.com#49 (EN/ZH usage guide)

🤖 Generated with Claude Code

Vonng and others added 7 commits November 4, 2026 21:10
A limited or failed scan keeps its checkpoint so automatic retries do not
restart an over-budget listing. That checkpoint carries the original scan
deadline, so every later explicit Refresh resumed it and immediately ended
limited again; the documented "Refresh requests a new metadata scan" never
happened. An explicit refresh now discards the checkpoint and partial
progress and starts a fresh scan with a fresh budget. Events and
reconciliation still leave limited jobs alone.

SILO drops notifications for a subscriber that stops reading, without
ending the stream. The observer read events on the same loop that runs
reconciliation and database flushes, so a slow inventory could lose changes
while coverage reported a reconciled connection. Read the stream on its own
goroutine into one pending invalidation per bucket.

Both regression tests fail on the previous implementation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Object locking cannot exclude prefixes or folders from versioning. The
creation handler silently dropped the exclusions and created a bucket with
a different configuration than requested. Reject the combination before
any bucket is created.

Cover rollback boundaries against a fake S3/admin backend: an existing
bucket is never removed, a bucket that became non-empty is reported as
possibly remaining, and a browser disconnect after creation still rolls
back with an independent context.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Quota editor:
- set the loading state before writing, so repeated submits send one PUT;
- explain why an existing quota of 8 PiB or more is not editable instead of
  showing the generic input error over an empty field;
- offer the same unit list in both quota forms and drop "Ei", where even
  0.01 Ei exceeds the exact JSON integer range and can never be written.

Byte formatting:
- niceBytes now uses calculateBytes' parser, so blank, null, hexadecimal and
  negative input is N/A in both Console and MDS instead of "0 B" or "16 B";
- both helpers carry a value that rounds up to the next unit, so 1048575
  bytes is 1.0 MiB rather than 1024.0 KiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
- Validate saved observations before exact sorting and formatting; a
  malformed byte string is now unknown rather than a BigInt crash.
- Keep the current totals already shown when a bucket is only temporarily
  unavailable. Retained data is dropped until version listing is
  authorized again; forbidden and missing still clear everything.
- A bucket-list change restarts the usage effect. An explicit Refresh that
  had not been delivered is now carried into the next run instead of being
  silently dropped, and foreground rows no longer stay "running" after
  their scan was aborted.

Each regression test fails against the previous hook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Visual review at 1440, 1024, 768 and 390 px in light/dark, en/zh, with
1000+ buckets, found:

- the name cell wrapper defeated the cell ellipsis, hard-clipping long
  bucket names; the name is now its own ellipsized line with a title;
- the header row inherited the 64 px two-line row height;
- renaming "Size" to "Current size" pushed the sort arrow out of the
  clipped header, so a size sort showed no direction;
- status and retained lines used ad-hoc inline styles in foreground
  color; they now share one muted caption style that never wraps;
- the retained line clipped mid-value in narrow size columns; the size
  track is wider at every breakpoint;
- card metrics were sized by content and shifted between cards;
- times used the browser locale in the Chinese UI, the retained label
  hardcoded an ASCII colon and the notice joined Chinese sentences with
  a space;
- the folder-size panel drew a second bordered box inside the listing
  card, used a raw checkbox and browser-locale numbers, and appeared in
  empty folders;
- on phones with touch-sized controls the bucket toolbar overflowed and
  scrolled the page sideways; the primary action now wraps instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
At 1440, 1024, 768 and 390 px (coarse pointer on phones), a size-sorted
table must show the descending arrow inside its header, ellipsize a
63-character bucket name with its full title, show "Retained: 9.5 MiB"
unclipped, keep the header shorter than two-line body rows and never
scroll the page sideways. All four cases fail on the previous build.

Keep the folder-size panel while a listing loads, so rows do not jump
when the panel appears; it is hidden only once the folder is empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Production build (yarn build + optimize-embed.sh) with Node 24.22.1 and
Yarn 4.13.0 from the fixes on this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Vonng added a commit to pgsty/silo.pgsty.com that referenced this pull request Nov 4, 2026
…nd locked exclusions

Document Console usage-scan Refresh after a limit and the locked-bucket versioning-exclusion rejection from pgsty/silo-console#80 (EN/ZH).
Vonng and others added 4 commits November 4, 2026 23:02
- Inline the Chinese locale choice in BucketUsageStatus, following the
  rest of the code base; the exported helper had no other user and failed
  the knip dead-code check in CI.
- Release the observer lease before waiting for the event reader. The
  SDK's reconnect backoff sleeps up to 30 s without watching the context,
  so waiting first could hold the lease and delay a replacement observer.
- Show the folder-size panel even when the current listing is empty, as
  before: a versioned folder whose objects were all deleted still holds
  retained bytes that only this panel can calculate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Production build (yarn build + optimize-embed.sh) with Node 24.22.1 and
Yarn 4.13.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
CI's Linux runner has no Inter, so Chromium falls back to DejaVu Sans
for system-ui. There "Retained: 9.5 MiB" is about 108 px and overflowed
the 101-104 px size column at 1440, 768 and 390 px; the new layout test
caught it. Users without Inter or SF see the same clipping.

- Give the size column a font-relative minimum (15ch), so it grows with
  wider glyphs instead of being tuned to one platform's font.
- Let the retained caption wrap between its label and value as a last
  resort; the value itself never splits or clips.
- Apply the header's semibold weight to its cells rather than the grid
  row, so ch-based tracks resolve against the same font as body rows and
  columns stay aligned.

The layout test now runs every width with the default font and with a
forced wide font (Verdana, close to DejaVu Sans metrics), and also checks
header/body column alignment. With Verdana forced, the previous build
clips at exactly the three widths that failed in CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Production build (yarn build + optimize-embed.sh) with Node 24.22.1 and
Yarn 4.13.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
@Vonng
Vonng merged commit 60e4cbd into main Nov 4, 2026
41 of 42 checks passed
@Vonng
Vonng deleted the claude/release-validation-20261104 branch November 4, 2026 16:27
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