bun test v1.4.4 (38afee6c8)
$ bun test student-tests/security-guards.test.ts student-tests/kv-secrets.test.ts student-tests/public-endpoint.test.ts student-tests/operator-crypto.test.ts student-tests/pki.test.ts student-tests/grpc-probe.test.ts student-tests/transport-negative.test.ts student-tests/command-runner.test.ts student-tests/checkpoint-guards.test.ts student-tests/openobserve-topology.test.ts student-tests/openobserve-config.test.ts student-tests/openobserve-accounts.test.ts student-tests/openobserve-request-path.test.ts student-tests/openobserve-response.test.ts student-tests/openobserve-search-window.test.ts student-tests/openobserve-reader.test.ts student-tests/openobserve-account-workflow.test.ts student-tests/grafana-guards.test.ts student-tests/grafana-datasources.test.ts student-tests/http-fixture.test.ts student-tests/browser-lifecycle.test.ts student-tests/runtime-preparation.test.ts student-tests/sealed-shutdown.test.ts student-tests/failover-proof.test.ts student-tests/git-tracking-proof.test.ts student-tests/replica-snapshot.test.ts student-tests/health-convergence.test.ts

student-tests/grafana-datasources.test.ts:
(pass) native listDTO may omit auth fields; authenticate the exact UID detail and health readers [0.40ms]
(pass) configured root account is rejected before datasource health can masquerade as scoped auth [1.52ms]
(pass) HTTP200 health with error body is not a healthy datasource [0.09ms]

student-tests/failover-proof.test.ts:
(pass) read current receipt contents and bind its stopped replica to the current attempt baseline [0.25ms]
(pass) reject old operation receipt even when a file exists [0.17ms]
(pass) reject foreign attempt receipt even when a file exists [0.02ms]
(pass) reject wrong alias receipt even when a file exists [0.02ms]
(pass) reject wrong container receipt even when a file exists
(pass) reject still running receipt even when a file exists
(pass) reject not initially running receipt even when a file exists
(pass) reject foreign service receipt even when a file exists [0.02ms]
(pass) missing receipt preserves reader error instead of accepting older stable files [0.13ms]
(pass) required read port has no live filesystem fallback [0.04ms]

student-tests/openobserve-response.test.ts:
(pass) HTTP401 text error preserves native HTTP outcome [0.12ms]
(pass) HTTP422 text error preserves native HTTP outcome
(pass) HTTP500 text error preserves native HTTP outcome
(pass) HTTP200 JSON remains parsed [0.04ms]
(pass) HTTP200 malformed success retains the status in its error [0.03ms]

student-tests/http-fixture.test.ts:
(pass) human fixture labels never become invalid API usernames [0.75ms]
(pass) unexpected native HTTP result retains its exact outcome before stable failure [0.52ms]
(pass) diagnostic write failure cannot replace HTTP400 [0.09ms]

student-tests/openobserve-account-workflow.test.ts:
(pass) saved native200 and403 accounts publish only after both account controls [0.32ms]
(pass) positive HTTP401 cannot publish derived credentials [0.07ms]
(pass) positive HTTP503 cannot publish derived credentials [0.02ms]
(pass) positive HTTP201 cannot publish derived credentials
(pass) unexpected deny HTTP200 cannot publish derived credentials [0.06ms]
(pass) unexpected deny HTTP503 cannot publish derived credentials [0.01ms]
(pass) invalid saved query shape user cannot publish or probe [0.07ms]
(pass) invalid saved query shape user cannot publish or probe
(pass) invalid saved query shape token cannot publish or probe
(pass) invalid saved query shape token cannot publish or probe
(pass) extra owner slot never reaches credential publication [0.06ms]
(pass) workflow requires explicit native and publishing ports [0.02ms]
(pass) invalid query token after a healthy ingest control still cannot publish any derived file [0.08ms]

student-tests/replica-snapshot.test.ts:
(pass) read each current UUID through exec in the verified immutable container, without filesystem copy [0.28ms]
(pass) reject process restart while reading the alias [0.08ms]
(pass) reject malformed UUID before any stop operation [0.06ms]
(pass) reject foreign ownership before any command [0.07ms]
(pass) propagate native exec failure without substituting a stale alias [0.07ms]
(pass) require explicit ports without process defaults [0.02ms]

student-tests/openobserve-config.test.ts:
(pass) Collector uses native file auth and distinct stream-name handling for logs/traces versus metrics [1.11ms]
(pass) Grafana queries measured native metric names without legacy namespace or invented suffixes [0.34ms]
(pass) Grafana native plugin provisioning uses measured fields and native Basic auth consumers [0.18ms]
(pass) Grafana mounts native alert rules using the measured datasource and metric names [0.26ms]

student-tests/pki.test.ts:
(pass) issued leaf verifies exact SAN, issuer, validity and matching key [405.89ms]

student-tests/openobserve-accounts.test.ts:
(pass) native service-account success saves exact credential before returning without a human-user API [0.24ms]
(pass) native HTTP401 never publishes an account [0.06ms]
(pass) native HTTP403 never publishes an account [0.01ms]
(pass) native HTTP500 never publishes an account
(pass) invalid native result fails closed code 3 [0.06ms]
(pass) invalid native result fails closed token 0
(pass) invalid native result fails closed token 4097 [0.01ms]
(pass) invalid native result fails closed user 23
(pass) invalid native result fails closed token 4
(pass) account persistence failure stays primary and prevents a success result [0.08ms]

student-tests/checkpoint-guards.test.ts:
(pass) checkpoint second snapshot rejects changed bytes, additions and removals [0.13ms]
(pass) historical evidence never replaces existing different bytes and permits exact identical bytes [0.18ms]
(pass) handover lease rejects a different valid source generation after initial verification [0.44ms]
(pass) handover lease rejects source mutation even when receipt is unchanged [0.17ms]
(pass) historical finalization requires its accepted source and build generation binding [0.13ms]

student-tests/runtime-preparation.test.ts:
(pass) canonical runtime invokes its build exactly once [0.11ms]
(pass) checked cache verifies existing runtime without an implicit build [0.05ms]
(pass) failed cache verification preserves its error and never falls back to a build [0.08ms]
(pass) unknown runtime mode fails before either operational port [0.05ms]
(pass) constructor requires both explicit ports [0.02ms]

student-tests/sealed-shutdown.test.ts:
(pass) fresh running processes with post-seal cause and exit prove all three shutdowns [0.62ms]
(pass) baseline retention failure prevents seal and preserves its original error [0.12ms]
(pass) recheck baseline freshness after diagnostic retention latency before dispatching seal [0.13ms]
(pass) unrelated restart without freshness cause cannot pass sealed acceptance [0.24ms]
(pass) old pre-seal events cannot explain a later unrelated restart [0.21ms]
(pass) future cause events are not accepted [0.13ms]
(pass) cause event alone does not prove process exit or restart [0.13ms]
(pass) malformed baseline freshness fails before seal [0.11ms]
(pass) future baseline freshness fails before seal [0.04ms]
(pass) stale baseline freshness fails before seal [0.03ms]
(pass) all baseline processes must be running before seal [0.09ms]
(pass) freshness read I/O error preserves its primary identity and never seals [0.13ms]
(pass) baseline ages are rechecked after reads immediately before sealing [0.08ms]
(pass) a replaced container cannot satisfy the original process baseline [0.07ms]

student-tests/kv-secrets.test.ts:
(pass) reads the native KVv2 envelope for api [0.17ms]
(pass) reads the native KVv2 envelope for worker [0.02ms]
(pass) rejects missing KVv2 nesting and required fields [0.04ms]
(pass) rejects credentials for another role [0.02ms]
(pass) rejects invalid metadata and denied responses [0.04ms]

student-tests/grafana-guards.test.ts:
(pass) Grafana endpoint uses the verified published loopback binding despite two networks [0.08ms]
(pass) Grafana endpoint rejects foreign, stopped, wildcard, missing and ambiguous bindings [0.15ms]
(pass) real numeric zero is a valid metric sample [0.11ms]
(pass) HTTP200 with datasource error, empty, null, nonfinite or ragged values cannot pass [0.07ms]
(pass) native history first creation binds exact collection and user key [0.05ms]
(pass) existing native history uses versioned PATCH at the same owned key [0.02ms]
(pass) native Grafana evaluator key reordering does not change a rule [0.16ms]

student-tests/openobserve-request-path.test.ts:
(pass) native URLSearchParams PromQL spaces stay valid before any credential or process port [0.10ms]
(pass) rejects invalid request URI "https://foreign/api/default/streams" [0.02ms]
(pass) rejects invalid request URI "/api/foreign/streams"
(pass) rejects invalid request URI "/api/default/streams\r\nX: bad"
(pass) rejects invalid request URI "/api/default/_search#fragment"
(pass) rejects invalid request URI "/api/default/space in path"
(pass) pinned plugin organization editor endpoint remains available [0.01ms]

student-tests/openobserve-search-window.test.ts:
(pass) actual fractional filesystem mtime serializes native integer microseconds [0.05ms]
(pass) invalid search window NaN 1 fails before a native call [0.02ms]
(pass) invalid search window 1 Infinity fails before a native call
(pass) invalid search window -1 100 fails before a native call
(pass) invalid search window 1 1.7976931348623157e+308 fails before a native call
(pass) invalid search window 10 1 fails before a native call
(pass) invalid search window 1 1 fails before a native call
(pass) invalid search window 1 3600002 fails before a native call

student-tests/health-convergence.test.ts:
(pass) wait for the next healthy tick after unseal instead of trusting stale unhealthy [0.26ms]
(pass) healthy container returns immediately without delaying recovery [0.05ms]
(pass) never healthy fails at the bounded deadline [0.05ms]
(pass) native read failure preserves its original identity [0.07ms]
(pass) unknown state fails closed [0.04ms]
(pass) backward clock is rejected [0.05ms]
(pass) explicit ports are required [0.02ms]

student-tests/openobserve-topology.test.ts:
(pass) telemetry storage is a single OpenObserve instead of Prometheus Loki Tempo and their gateways [0.41ms]
(pass) OpenObserve has its own persistent data and a closed private gateway namespace [0.07ms]
(pass) storage migration retains required neighbors and existing app OTLP contract without OpenObserve secrets [0.10ms]
(pass) Collector and Grafana storage transport targets OpenObserve through the verified gateway [0.14ms]
(pass) Grafana query gateway permits actual editor metadata and guards native request fields [0.05ms]
(pass) Grafana can use an own verified immutable cache alias without changing the canonical image pin [0.07ms]
(pass) Grafana uses its own file-delivered encryption key and secure HTTPS cookies [0.06ms]
(pass) Grafana cannot fetch extra plugin packages outside the approved cached artifacts [0.03ms]

student-tests/command-runner.test.ts:
(pass) secondary diagnostic failures cannot replace command exit and both receipt writers are attempted [0.19ms]
(pass) successful and explicitly allowed command outcomes are returned without diagnostic writes [0.10ms]
(pass) runner requires explicit fake ports and preserves primary execution error [0.07ms]

student-tests/operator-crypto.test.ts:
(pass) operator envelope authenticates ciphertext and hides plaintext [104.26ms]
(pass) operator envelope requires a sufficiently long passphrase [0.06ms]

student-tests/public-endpoint.test.ts:
(pass) selects the actual published loopback listener despite two LB networks [0.09ms]
(pass) rejects invalid published ports [0.05ms]
(pass) rejects unpublished, public, stopped and foreign-resource endpoints [0.07ms]

student-tests/transport-negative.test.ts:
(pass) native explicit revoked-certificate alert is client denial, while an application success is not [0.50ms]
(pass) Bun native certificate-required alert counts as client denial while timeout never does [0.24ms]

student-tests/security-guards.test.ts:
(pass) age rejects future, invalid and stale receipts [0.06ms]
(pass) client role requires exact allowlist membership [0.04ms]
(pass) network endpoints require TLS and an exact intended hostname [0.05ms]

student-tests/git-tracking-proof.test.ts:
(pass) actual producer output is accepted only for matching pinned bytes and current source [0.57ms]
(pass) changed proof bytes are rejected before source inspection [0.11ms]
(pass) missing proof preserves the primary read failure [0.07ms]
(pass) changed source bytes invalidates canonical Git evidence [0.15ms]
(pass) added source entry invalidates canonical Git evidence [0.07ms]
(pass) nonempty private tracking query result never becomes a zero-count proof [0.11ms]
(pass) a weakened query cannot prove the original private-file patterns [0.11ms]
(pass) producer rejects a changing HEAD during capture [0.10ms]
(pass) producer rejects a changing source snapshot [0.09ms]

student-tests/browser-lifecycle.test.ts:
(pass) newPage rejection closes the already acquired context exactly once [0.24ms]
(pass) listener setup failure closes the already acquired context exactly once [0.05ms]
(pass) normal browser work returns its result and closes exactly once [0.04ms]
(pass) cleanup failure is separately reported without replacing the primary error [0.07ms]
(pass) cleanup failure after successful work remains a failure [0.05ms]
(pass) missing ports reject before any browser can be acquired [0.02ms]

student-tests/grpc-probe.test.ts:
(pass) native HTTP2 gRPC probe requires a valid Export response and checks request framing [396.69ms]

student-tests/openobserve-reader.test.ts:
(pass) reader produces fixed historical SQL end and the same PromQL time after three hours [0.83ms]
(pass) fresh reader default uses the explicit clock for both native request forms [0.15ms]
(pass) reader requires explicit native request and clock ports [0.02ms]

 153 pass
 0 fail
 379 expect() calls
Ran 153 tests across 27 files. [957.00ms]
