---
title: Limits
description: What is open or only partly closed, stated as plainly as what is built.
sidebar:
  icon: triangle-alert
---

## Rollback requirements

| # | Topic | Status | What remains |
|---|---|---|---|
| R1 | Green job after an automatic rollback | Closed | `verify-deployment.sh` fails the job unless this run's revision is primary and `COMPLETED`. |
| R2 | Failures the 5xx alarm cannot see | Partly | Task 3 counts every suggestion request by outcome. The alarm `<name>-suggestion-failure-ratio` notifies between releases and rolls back a release that breaks suggestions. Not verified in AWS, and it needs 10 suggestion requests in 5 minutes to judge. |
| R3 | No traffic, no alarm | Partly | Generated traffic gives the 5xx alarm data during the wait, but only for `GET /api/document/1`. It sends no suggestions, so in a quiet environment the suggestion alarm has no data during a rollout and the smoke test is the check. |
| R4 | Alarm already in ALARM | Partly | Rollback does not rely on the alarm. A fix-forward deploy started during an incident also runs without alarm protection, by ECS design. |
| R5 | What "previous" means | Closed | "Current" is the newest release record, not a reading of ECS. If a release fails before ECS changes anything, its record still counts as current. |
| R6 | Code, not configuration | Partly | Documented. A Terraform revert of task settings reaches the tasks only with the next release. |
| R7 | Rollback skips CI | Closed | Only a SHA with a `success` record in that environment is accepted. |
| R8 | Target must exist | Partly | Checked before any change. The ECR lifecycle policy (newest 30 images) can still delete an old target. |
| R9 | Next merge ships the bad commit | Closed | Freeze until `unfreeze.yml` runs. |
| R10 | Rollback waits in a queue | Closed | A pending deploy is replaced by a newer one (the default queue), not queued behind it. |
| R11 | Two artifacts, one release | Rule only | The N−1 client rule is enforced only by code review. |
| R12 | Data | Open | Every release erases saved documents until the app moves off in-memory SQLite. |
| R13 | First release | Partly | Designed for: a missing `bootstrap` image and no healthy task. Not run against a real account. |
| R14 | Time | Estimate | 10 to 15 minutes after approval is a sum of estimates, not a measurement. |

## Pipeline and security

- **Dependency gates are red today.** pip-audit, Trivy and npm audit fail on the current pins. See [Quality gates](/quality-gates#results-on-todays-code).
- **Terraform applies in dev and staging run without approval.** The apply role trusts the same Environment as the deploy role, and app deploys there must be automatic. The PR plan review is the only gate. A main-branch plan job in those Environments also holds administrator credentials without a human gate.
- **Prod approves Terraform twice**, once for the plan job and once for the apply job, because GitHub asks before each job that names a protected Environment.
- **Required reviewers need a public repository or GitHub Enterprise.** On a private repository on Free, Pro or Team, the prod gate does not apply.
- **No automatic rollback after a failed smoke test.** The job fails and a person runs `rollback.yml`.
- **Re-run failed jobs, not all jobs.** "Re-run all jobs" rebuilds the image. The rebuild gets a new digest, and the immutable ECR tag (the SHA) then rejects it. `push-image.sh` fails loudly.
- **The smoke test calls OpenAI** once per release in every environment. That costs money, and an OpenAI outage blocks releases.
- **The npm and pip audits are not deterministic.** A new advisory can fail a PR that changed nothing related.
- **The plan role is assumable by any pull request from this repository**, with the PR's own version of `terraform.yml`. It is read-only, but `ReadOnlyAccess` reads a lot. This is the trust design from Task 1.

## Not verified against a live system

No AWS credentials or GitHub repository were used. These behaviours come from documentation, not from a run:

- That a job with `environment.deployment: false` gets the subject `environment:<env>`. GitHub documents that such a job has the Environment's secrets, variables and reviewers.
- That the REST API creates a Deployment with `ref` set to a SHA in an Environment that has a deployment branch policy. If it refuses, the release stops at "Start release record", before any change.
- Every AWS CLI call, checked against the deploy-role policy by reading, not by running.

## Found in the application

Fixed in Task 3: the WebSocket handler's `print` of the exception text (now one JSON event with the exception type, see [Signals](/signals#logs)), and CORS `*` with credentials (now an allow-list from `CORS_ALLOWED_ORIGINS`, empty by default, see [Security](/security#controls)).

Not fixed:

- **`get_ai` reads `model` and `api_key` from the WebSocket query string.** FastAPI treats the default parameters of the dependency in `app/internal/ai.py` as query parameters, so a client can pick the OpenAI model, and with it the cost. That file is out of scope for changes.
- **`greenlet` is not pinned.** SQLAlchemy pulls it in, so builds are not fully reproducible.
- **Python 3.10 reached end of life in October 2026.** The image stays on 3.10 to match the pins. The apt, libapt-pkg and zlib findings come from the pinned base image's Debian layers, so a newer base image digest is part of the upgrade.
