Skip to content

app/: blob storage and page texts (sc-8900) - #59

Merged
ndbroadbent merged 7 commits into
mainfrom
laravel-ingest
Dec 2, 2026
Merged

ndbroadbent merged 7 commits into
mainfrom
laravel-ingest

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Stacked on #54.

  • Blob store (app::storage::BlobStore). Ported from server/src/blobstore.rs: presigned uploads and downloads, reads checked against the SHA-256, verify, put and delete. It's configured from S3_* (app::config::Storage) and built once per process.
  • Page texts (app::storage::texts). Stored once by SHA-256 with one multi-row insert per batch, and loaded by hash.
  • CI. The app job starts RustFS, as the visual job does, so the storage tests run in CI.
  • No quiet skips. testing::fixtures::blob_store() fails, naming the store, when it isn't running. AGENTS.md gets the rule that a test never skips quietly, since a test that returns early passes in CI. Today's server tests that need blobs do return early in the test job, which runs no S3.

Tests: texts are stored once and load back; a blob round-trips, is verified by hash and is deleted. All of cargo test passes, and clippy is clean.

@visualci-com

visualci-com Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #253 · 331 unchanged · no changes

This PR vs base: nothing since #212, across 4 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent changed the base branch from laravel-data to main December 2, 2026 13:53
…ts HTTP connections belong to that application's runtime (a process-wide client failed with 'error sending request' once a test's runtime ended)
@ndbroadbent
ndbroadbent merged commit 847be2a into main Dec 2, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the laravel-ingest branch December 2, 2026 14:48
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
…uth settings; one Cargo.toml tracing entry; the OAuth discovery test expects the tests' APP_URL (https://app.visualci.test, since #59)
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
… (sc-8900) (#58)

* Auth review follow-ups (sc-8900): /auth/session as today (name, avatar, the one organization) with CORS for the site's exact origin alone and no-store; /auth/providers lists the configured forges; tokens' last_used_at written at most once a minute; a project token stays a member of its own project (can review, as today), documented and tested

* Sign-in, review fixes: the site's signed-in hint (vci_signed_in, plain and readable by its script, on the site's domain) is set at sign-in, renewed or cleared by /auth/session and cleared at logout, as today's; /auth/providers and /login offer a forge only when its OAuth application has its ID and its secret

* Test: OAuth discovery expects the tests' APP_URL (https://app.visualci.test, since #59)

* app/Cargo.toml: one tracing entry (#57's merge listed it twice, so cargo couldn't read the manifest and main's app job failed)
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
…uth settings; one Cargo.toml tracing entry; the OAuth discovery test expects the tests' APP_URL (https://app.visualci.test, since #59)
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
* Routing by hostname, hardened (sc-8900, review of #53): production refuses to boot without all four host URLs; the host check judges a normalised path (percent-decoded, repeated slashes collapsed, lowercased), so /%61pi/v1, //api/v1 and /API/v1 can't reach the API through the app host; tests

* Routing by hostname, review fixes: production boots only when all four host URLs name a host and no two are the same (a bare app.visualci.com fails); in production a request for any other host reaches only /up and the renderers' /internal paths; Laravel's TrustHosts trusts every host, since it would refuse the API and MCP hosts and the pods' probes and route_by_host is the host check; tested in production for an unknown host and a boot that fails

* Routing by hostname: test that a forged Host gets no URL with its name in production (sign-in's callback, OAuth metadata, the device code and redirects are unreachable from it; every other URL comes from the configured host URLs)

* Routing by hostname: production boots with none of the four host URLs (one host serves everything, as a self-hosted VisualCI does, every URL from APP_URL) or all four, each naming a host and no two the same; only some of them is a boot error; tested in production for one host, the partial case, and four

* Routing by hostname on main: production-mode tests get storage and OAuth settings; one Cargo.toml tracing entry; the OAuth discovery test expects the tests' APP_URL (https://app.visualci.test, since #59)
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