Skip to content

feat(image-generation): prepare isolated default-off FlatAI release - #229

Merged
alirezasafaei-dev merged 11 commits into
mainfrom
codex/image-generation-mainline-port
Oct 13, 2026
Merged

alirezasafaei-dev merged 11 commits into
mainfrom
codex/image-generation-mainline-port

Conversation

@alirezasafaei-dev

@alirezasafaei-dev alirezasafaei-dev commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Production follow-up — 2026-10-13

The owner-authorized limited public trial is now enabled on deployed merge SHA 962ec68 through a second canonical blue-green release. The code default remains disabled; only protected production configuration enabled the unchanged trial ceilings. Cloudflare remains chat-only.

Actual public-domain Persian generation completed in 96.701 seconds; the decoded 832×832 JPEG displayed and downloaded, reload recovered the same job, and repeated downloads matched. Secure-cookie, ownership/Origin/consent and no-store acceptance passed. The full site regression passed 36 checks across 58 URLs and the mandatory ten-page/CSS/font health sequence exited zero. A later verified-TLS query confirmed the expired acceptance row was deleted. Five-minute readiness/certificate-boundary monitoring is installed; renewal remains manual and external notifications are not installed.

The prior disabled release remains available for rollback. Existing one-running/three-pending, three-IP/guest-hour, ten-global-hour and twenty-global-day ceilings are unchanged. Provider capacity/integration endorsement remain unestablished; no contact, paid plan, identity rotation, protection bypass or bulk capacity test occurred. Intermittent VPS DNS and external trust-seal warnings remain.

Documentation follow-up: #240, exact head 9a439ae, all 14 checks passed; the first Lighthouse failure and unchanged rerun are preserved. Private media, configuration and operator evidence are outside GitHub. Historical Stage 1 notes below describe the disabled deployment before this bounded activation.


Stage 1 completed on 2026-10-13 after explicit owner approval: merged SHA 962ec68 is live via the canonical blue-green engine. Public image GET/POST return 503 disabled, no-store, no guest cookie; the UI remains in preparation/noindex. No provider jobs or DB migrations were performed.

Post-deploy acceptance: all ten mandatory pages/CSS/font checks and strict production audit passed. Real Chrome desktop/mobile acceptance passed 36/36 checks over 58 URLs, including ten blog posts, twenty footer destinations and actual JSON/Base64/address/salary/loan/cheque/OCR/image-download/contract-preview interactions. A separate mobile lazy-search interaction passed. The resized synthetic JPEG was decoded as 320x69. Uncaught page errors and critical own-origin asset/network errors were zero. All five applicable merged-SHA CI workflows succeeded.

Verdict: LIVE_VERIFICATION_PASS_WITH_WARNINGS. Intermittent server-probe DNS latency and external eNamad badge-image timeouts remain warnings. Expected anonymous auth 401 responses were identified separately. Protected backups and the prior release remain retained; operator logs, media and full local verification reports stay outside GitHub. Public image use/capacity and Stage 2 approval/acceptance remain open.


Premerge reviewed implementation and evidence:

This merged change adds a disabled-by-default FlatAI image workspace with consent, an encrypted durable queue, isolated browser worker, reload recovery, image display and download. It uses Standard through the ordinary visible FlatAI form. Cloudflare remains chat-only.

Candidate: 706cc0f. This final delta documents real lifecycle acceptance; runtime code is unchanged from af97010. Current main 54561b0 is integrated without history rewriting. Matching shell quotes are decoded literally by PM2, preserving release precedence and inspector removal. Native image RPC supports the measured long generation with a bounded whole-exchange deadline, cancellation, bounded image validation and no generation retry.

Validation:

  • Runtime candidate af97010 passed all 17 GitHub checks, local build and 1,892 tests / 254 files. PM2 and RPC failure regressions were observed RED then GREEN. Typecheck, lint, licensing, documentation links, dependency audit and secret scans passed.
  • An actual UI-to-TLS-queue-to-isolated-browser-to-FlatAI journey produced/displayed/downloaded an 832x832 decoded JPEG in 438 seconds. Reload recovered the same job/image and repeated download matched. One sample is not a capacity or prompt-fidelity guarantee.
  • Private optimized Next API/component HTTPS acceptance passed the disabled probe and seven secure-cookie/session/TLS/ownership/Origin/client-IP probes with normal certificate verification and no provider submissions. This is not public-domain/CDN or full-site visual acceptance.
  • The intended host passed guarded UFW reload and Docker restart, including automatic image-stack/TLS availability and recovery through the full disruption window. All 155 browser samples denied host IPv4/IPv6 connections while service DNS/proxy remained reachable; host-positive controls and proc/cgroup-verified browser absence covered intentional shutdown. Largest isolation observation gaps were 0.524/0.545 seconds (two-second acceptance bound); no successful browser-host connection was observed. This is sampled, bounded proof.
  • Exact original unrelated running states/restart policies were restored, all running health checks passed, observer processes were removed and controlled listeners closed. Real queue TLS/least-privilege probes passed 7/7 again from Iran, with matching key/fresh heartbeat; idle-pool probes passed 3/3. Certificate renewal/rollback and cold boot were previously accepted; renewal remains owner-operated.
  • Protected disabled full-environment and exact-image-route no-cache nginx candidates are ready for review and have not been applied. Generated media, credentials, infrastructure coordinates and private operator fixtures remain outside GitHub. Final documentation/fixture review has no remaining actionable P0/P1/P2; DCO and security hooks are intact.

All 17 final GitHub checks succeeded on exact head 706cc0f, including quality/build, four Chromium shards, chat, image tests/container build, CodeQL, Lighthouse, licensing/security/contracts and readiness artifacts. Core CI: https://github.com/alirezasafaei-dev/persiantoolbox/actions/runs/38383301440 ; image CI: https://github.com/alirezasafaei-dev/persiantoolbox/actions/runs/38383301630

Stage 1 is separately owner-approved merge and blue-green deployment with IMAGE_GENERATION_ENABLED=false, preserving full production settings and verified nginx/environment rollback. Public disabled-route and complete mandatory health/assets acceptance follow that operation. Stage 1 submits no provider jobs and does not resolve the provider gate.

Stage 2 public enablement remains NO-GO: permitted unattended multi-user provider use, sustainable capacity, public-domain/CDN acceptance, ongoing monitoring/renewal arrangements and explicit public-trial approval remain open. Original application trial ceilings are 10 globally/hour and 20/day, not provider entitlement. No provider contact, paid-plan purchase, signup/CAPTCHA bypass, IP rotation or hidden API was used. The owner subsequently approved Stage 1. PR229 is merged and production was deployed with the image flag still off. Public enablement remains separately gated.

Release procedure: docs/ops/image-generation-release-checklist.md. Lifecycle witnesses and bounded scope: docs/ai/execution/FLATAI-LIFECYCLE-20261013.md. Earlier runtime evidence: docs/ai/execution/FLATAI-FOLLOWUP-20261012.md.

…ent main

Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
@alirezasafaeigfx

Copy link
Copy Markdown
Collaborator

2026-10-10 diagnostic continuation — 90001f2

  • Confirmed with an isolated one-shot Linux Compose run: Chromium, service DNS and proxy worked; a first-party FlatAI POST returned HTTP 403 and JSON success:false (fields message,code, without provider content/quota indicators), followed by an independent POST 200. No image was produced. This is an application-level rejection; cause remains unproven. Normal Windows Edge also produced no image in a bounded 100-second test despite first-party POST 200s.
  • Added tested, bounded http_403, http_429, http_5xx diagnostics and preserved more specific page failure indicators. Never record prompt/response bodies/cookies/URLs. This does not bypass or fix the FlatAI denial.
  • Full local gate after this change: 1855/1855 Vitest, TypeScript, lint, browser/RPC, egress, production build, secret scan, local-first and docs all pass. DCO commit 90001f2e pushed.
  • Provider access and intended-host acceptance tracked in [image-generation][release gate] FlatAI public usage permission and capacity #230; /tools Lighthouse CLS regression (0.351 in PR vs 0.006 prior main) and existing E2E flakes tracked separately in [quality] Investigate /tools CLS regression and existing flaky E2E before merging image PR #231.
  • Current status NO-GO. Keep Draft, no merge, no deploy, IMAGE_GENERATION_ENABLED off, pending provider permission/rejection reason, successful real image/download, independent security review and final Linux host proof.

Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
@alirezasafaeigfx

Copy link
Copy Markdown
Collaborator

Provider access outcome — 2026-10-10

The ordinary isolated Linux FlatAI form returned 403 with a validated provider-reported JSON data.code=signup_required. A targeted regression test was written first, then PR #229 gained a bounded first-party JSON classifier that returns signup_required (no raw response logging). The real Playwright function in the rebuilt sandbox returned {code:'signup_required', failureReason:'signup_required', stage:'waiting'} on one normal test generation; no image resulted.

Commit: f7cfce08fcd63df9514b87fa6086d68d92a2aa9f. Local validation: 1855/1855 Vitest (second run); typecheck, lint, production build, browser+RPC fixtures (18/18), egress tests, docs, licensing, privacy/local-first and secrets passed. The first saturated test run had 1 five-second timeout in an unrelated redirect test; isolated rerun passed 6/6 before the clean repeat full-suite pass. No deployment/enablement.

FlatAI official Terms last updated Sept 18, 2026 acknowledge some features require an account: https://flatai.org/flat-ai-inc-terms-of-service/ . Its Responsible Use Policy restricts excessive or abusive automation: https://flatai.org/responsible-use/ . Contact team@flatai.org to clarify whether unattended backend browser generation on behalf of PersianToolbox users is authorized and to request resolution of this registration gate. Do not bypass it. NO-GO remains in effect until permitted access and an actual generated/downloaded image on the dedicated Linux host are demonstrated. The unrelated mobile-E2E readiness fix is isolated in draft PR #232.

Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>

Copy link
Copy Markdown
Owner Author

Owner reprioritization — 2026-10-11

FlatAI is again the primary image-generator research and implementation track. The previous Cloudflare-image experiment PR #239 was closed unmerged after owner explicitly instructed “Cloudflare only for chat.” Existing live chat integration is unaffected. Do not silently substitute a new image provider or reinterpret future test approvals as permanent provider replacement.

Preserve the approved architecture: official site normal-form browser interaction with Playwright and a hardened isolated Linux browser/proxy/worker, as already implemented in draft #229. The Linux HTTP 403 provider code signup_required is currently the hard blocker. Earlier Windows observations did not establish consistent successful output, so do not claim that Windows works definitively or guess whether IP, region, session, registration or service policy caused the denial. Carefully reproduce, compare authorized environments, and report evidence without bypassing signup, CAPTCHA, anti-abuse, network identity, rate limits or exposing undocumented internal endpoints.

Owner previously instructed no email to FlatAI. Do not email the provider. Check documented allowed ordinary usage and provider policy independently; if automation is prohibited or signup required, stop and report precise blocker rather than circumvent.

Status: this draft #229 remains OPEN / DRAFT / UNMERGED / UNDEPLOYED, public image generation remains OFF. Before implementation resumed, use issue #230 and current CI/host diagnostics as source-of-truth. Production changes and merge require separate explicit owner approval.

Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
@alirezasafaeigfx alirezasafaeigfx changed the title feat(image-generation): isolated default-off generator (NO-GO pending provider and host proof) feat(image-generation): prepare isolated default-off FlatAI release Oct 13, 2026
Signed-off-by: alirezasafaei-dev <asdevelooper@gmail.com>
@alirezasafaei-dev
alirezasafaei-dev marked this pull request as ready for review October 13, 2026 11:08
@alirezasafaei-dev
alirezasafaei-dev merged commit 962ec68 into main Oct 13, 2026
17 checks passed
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.

2 participants