Conversation
Tighten config loading and validation, error classification, SQL table extraction, parser handling of serde-skip fields, and type emission. Remove the unwired email feature and its test mocks.
Auth/session handling (SSE tickets, session revocation, refresh cookie), webhook rate limiting, multipart limits, cron timezone and catch-up, job retry backoff precision and dead-lettering, workflow resume, leader-election zombie eviction, reactor/subscription reliability, and signals session persistence.
Include lockfiles in the template archive and preserve them on new, resolve the forge crate binding via proc-macro-crate, and tighten check/migrate/test/new command paths.
Re-register job/workflow subscriptions and reconnect SSE on auth change, settle the session before subscribing, set the connected-token hash before resolving connect, native SSE jitter, and web-vitals beacon as a JSON blob.
Per-user auth in realtime-todo-list, auth-gated demo panels, idempotent seed migrations, regenerated .sqlx for auth-scoped queries, plain-reqwest webhook loopback, and tuned Playwright timeouts across all six templates.
Resurrect rotted job-queue and change-log tests, cover transactional rollback, job retry/dead-letter, auth/session flows, and per-file feature-gate sentinels.
Pin third-party action and cargo-deny/cargo-audit versions, gate the forge-runtime integration suite, branch-protection preflight, regenerate the workspace .sqlx cache, and update admin-api/security/configuration docs.
eeec2fe to
3f39d86
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch hardens the framework against the security/quality audit (
ISSUES.md) and then overhauls test reliability so the integration suite becomes a trustworthy CI gate — the point being that we can make big changes confidently.The headline of the recent work:
forge-runtime's own integration suite had never run in CI, so it silently rotted — 14 tests were red against shipped code. Making it CI-ready surfaced (and fixed) several real bugs.Real bugs fixed (caught by un-rotting tests)
signals):upsert_sessionminted a fresh UUID for a new session even when the handler had already returned asession_idto the client, so every later event missed its session and spawned an orphan — session continuity was silently broken. The E2E only checked the response payload, so it never caught it.status='running'; nothing finalized a successful run, soforge_cron_runsfilled with stuck rows and the only exit was the 15-min stale-reclaim.application_nameto the project name, but the zombie-preemption guard only terminatesforge-prefixed backends.num_seconds()before the float cast dropped the backoff for the common first retry (1s − jitter ≈ 0.75s), retrying instantly.Test-reliability overhaul
ctx.http()never consults the mock, no-assertion constructor smokes, deadStep*API + its tests, builder round-trips) and the unwired email feature.forge-runtimeintegration tests (jobs queue routing, change_log schema + retention-floor, migration error-chain, signals roundtrip).forge-harness(the real, full-stack integration layer): job retry-then-succeed, dead-letter, and transactional rollback of data + outbox job.workspace-integration): runs theforge-runtimeintegration suite with--features "full,testcontainers"and--test-threads=1. Two non-obvious requirements, both learned by validation: every subsystem is feature-gated (baretestcontainersis a silent no-op), and the suite uses PG instance-global state (advisory locks,pg_terminate_backend, leader election) that can't run concurrently against one database. Serial = 642 pass / 0 fail / 0 ignored (~68s).Verified
cargo clippy --all-targets --all-features --workspace -- -D warningscleancargo fmt --all --checkcleancargo test --workspace(SQLX_OFFLINE) greenforge-runtimeintegration suite green serially against a shared Postgres (642/0/0)users.rs, harness retry/dead-letter/tx-rollback, and the runtime cron/leader/pool regressions validated under testcontainersStill open (tracked in
TEST-AUDIT.md)forge-harnesscoverage (compensation rollback, durable-sleep resume, cron, and the security boundaries: cross-userForbidden, negative SSE auth, 429)cargo llvm-covcoverage gate