89 Commits
Author SHA1 Message Date
Artyom da2f392442 Propose session cache and load balancer review fixes 2026-11-06 01:46:17 +03:00
Artyom 4513d90e48 Finalize lab 3 report and evidence provenance
Tie the grade 5 claim to the final SQLAlchemy revalidation and measured scaling results. Clarify clean-clone setup, failure timings, historical evidence, and operational constraints; record report-stage checks and evidence audits.
2026-11-06 01:29:44 +03:00
Artyom f591fa64e5 Document SQLAlchemy scaling evidence and archive completed changes 2026-11-06 01:21:26 +03:00
Artyom 55b99a24a4 Preserve failed scaling setup logs with revision metadata 2026-11-06 01:15:19 +03:00
Artyom 3fb741e6a8 Clarify scaling plots and show CPU repeat ranges 2026-11-06 00:58:21 +03:00
Artyom 07965a2fb6 Alternate fixed-rate scaling configurations across repeats 2026-11-06 00:43:04 +03:00
Artyom 57744c532c Cache the immutable message statement and validate scaling evidence 2026-11-05 23:59:54 +03:00
Artyom 05d69ba6ac Preserve scaling data and reject contaminated benchmark attempts 2026-11-05 22:42:51 +03:00
Artyom 74a39fa93e Propose remeasuring SQLAlchemy scaling as an OpenSpec change 2026-11-05 22:40:04 +03:00
Artyom 5c8f605cd3 Archive grade 4 verification and record SQLAlchemy failure evidence 2026-11-05 22:33:29 +03:00
Artyom 252e3e3ffe Measure successful recovery and verify history under load 2026-11-05 22:15:18 +03:00
Artyom 8a7e027925 Propose verifying grade 4 recovery as an OpenSpec change 2026-11-05 22:13:16 +03:00
Artyom ef0b9a385e Archive pool recovery and record current grade 3 evidence 2026-11-05 22:08:14 +03:00
Artyom 0a1f48bd73 Recover stale PostgreSQL connections before starting requests 2026-11-05 21:55:14 +03:00
Artyom 18de595740 Propose restoring PostgreSQL pool recovery as an OpenSpec change 2026-11-05 21:51:20 +03:00
Artyom 7fc911c332 Document SQLAlchemy migration checks and remaining evidence work 2026-11-05 21:41:47 +03:00
Artyom 66c614426c Reject legacy collation and persistence drift before adoption 2026-11-05 21:41:01 +03:00
Artyom 71c643c6d1 Adopt async SQLAlchemy storage and verified Alembic migrations
Keep the message and idempotency receipt in one Core CTE statement with chat-first locking. Preserve rollback, bounded dependency failures, and domain ports.

Replace the SQL runner with Alembic. Adopt legacy databases only after validating their journal and PostgreSQL schema, retain all data, and verify migrations on fresh and populated databases.
2026-11-05 21:38:12 +03:00
ArtyomandClaude Code c376882ce8 Match the tampered migration scenario name in the Alembic delta
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-05 00:47:10 +03:00
ArtyomandClaude Code c5f39dea25 Propose adopting SQLAlchemy and Alembic for the lab 3 storage
User requirement (2026-11-05, labs 3+): all PostgreSQL access goes through
SQLAlchemy 2.x async and migrations run through Alembic. The proposal keeps
every port, zone boundary and observable API behavior in place, moves the
checksum-based migration journal scenario to Alembic revision semantics and
pins the evidence that depends on SQL behavior for regeneration.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-05 00:46:59 +03:00
ArtyomandClaude Opus 5.5 72a1e57467 Archive the second lab 3 review gaps change
The deltas are synced to openspec/specs: a request that outlives the
graceful shutdown gets 503 unavailable in the common error format with
X-Request-Id and X-Instance-Id instead of the bare 500; a lost answer is
retried with the same key both on a live replica and after the replica
holding the request was killed, with one copy and the same id; make up
returns once every running replica is UP in the LB.

Before archiving, on e049c26 from a reset stand: make test, both
failover runs (first write after 2.858 and 2.682 s, 0 failed attempts),
persistence, retry-check, faults and make level4 pass, the clean clone
run follows the launch block verbatim; make check, make lint, 243 own
tests and openspec validate --all --strict pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 06:00:40 +03:00
ArtyomandClaude Opus 5.5 472ce5b9ea Report the second review fixes and the new records
The header names the code and harness commits of the second review
cycle and states that every level 3 and 4 record and the clean clone
run are on e049c26. Row 4.1 now carries the detection ranges and the
SIGTERM window of the current records, the 503 answer to a request
cancelled at shutdown replaces the 500 everywhere, and the launch block
loses the manual LB wait now done by make up and gains retry-check and
storage-evidence, so the clean clone run follows it verbatim. Rows 3.4
rest on the stand reproduction of a lost answer instead of failover runs
that never failed, a new row proves the contract, public tests and task
untouched against upstream and names the CI job, and the level 4
experiments state their repeats, data volume and resource snapshots.

Track 1: errors are attributed to the replicas that returned them, with
a failure column in the pool control table; the pool control states its
fixed variant order and growing base, pool 4 is a lower bound and no
longer compared with 4x1; the write command times are call-weighted over
all statement rows; the 3 600 rps comparison names the uneven foreign
load and rests on lock waits and CPU per request; the limits name the
database sizes behind the series A peaks and what host-others.csv
covers. AGENTS.md lists retry-check and the LB wait of make up.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:59:52 +03:00
ArtyomandClaude Opus 5.5 7f2deec511 Record levels 3 and 4 again after the second review fixes
Every level 3 and 4 record is taken anew on e049c26 from a reset stand:
checks with the upstream diff of the contract, the public tests and the
task (empty) and of .github (only the own CI job), student tests with
the 503 answer to a request cancelled at shutdown, smoke, stack,
storage on the filled database, both failover runs with the
service.draining event, persistence, hooks, faults, limits, lb-check,
the new retry-check, three detection runs, failover-each and both
rolling updates with the database size, a docker stats snapshot and the
tag and id of every replaced image. The clean clone run executes the
launch block of the report verbatim and marks the observations made
between its steps.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:59:38 +03:00
ArtyomandClaude Opus 5.5 e049c265b8 Reproduce a lost answer on the stand and enrich the run records
No failover run ever lost an answer, so the retry of an unconfirmed
write was only covered in process. make retry-check holds the chat row
with SELECT ... FOR UPDATE for 1.5 s (below lock_timeout), sends a
message with a 0.5 s client timeout, finds the replica whose request
waits on the lock in pg_stat_activity and then retries with the same
key and text through the LB, once with that replica alive and once
after docker kill. It checks the 201, a single copy with the id of the
retry answer and, for the live replica, the 201 it logged without a
client; created_at tells which attempt wrote the message. CI runs it.

failover-each and rolling-update now record the database size and a
docker stats snapshot in the background of the action, rolling-update
names the tag and id of every image it replaces, and scaling.py writes
started and the compose-up log marks in UTC with Z; the track README
states that the recorded rows are host time (MSK) and what
host-others.csv covers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:43:44 +03:00
ArtyomandClaude Opus 5.5 fb6ff87bb3 Wait for every replica in make up and check numeric uids in CI
compose up --wait returns once lb is healthy, and lb is healthy with one
replica in rotation; the second one joins after rise 2 checks, about
2.5 s later, so make test-failover right after make up could see a
single X-Instance-Id. make up now runs scripts/lb-wait.sh, which waits
for as many UP servers as there are running api containers.

The CI non-root step compared the third column of docker compose top
with 0, but the daemon prints the user name there (root), so it could
never fail. It now reads the numeric uid of every process of every
container with docker top -eo pid,uid,comm (Docker needs the PID
column); a throwaway root container makes the check fail.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:41:13 +03:00
ArtyomandClaude Opus 5.5 d99a48a5db Put readiness behind a port and log the drain window through Logger
The /health/ready route imported the PostgreSQL adapter and kept the
drain flag in the HTTP layer, which gunicorn_conf imported to raise it.
Readiness is now a port of the shared application layer; its adapter in
shared/infrastructure checks the per-process drain flag and pings
PostgreSQL, and PlatformProvider assembles it. The route only knows the
port, and gunicorn_conf raises the flag through the infrastructure
module. Another critical dependency now changes the adapter and the
provider, not the HTTP layer.

The drain window was logged by a uvicorn logger with a printf string;
it is now the service.draining event of a StructlogLogger with the same
fields as the application, and failover-evidence looks for it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:40:16 +03:00
ArtyomandClaude Opus 5.5 aa1485bd86 Answer requests cancelled at shutdown with 503 in the contract format
After the drain window uvicorn waits for accepted requests for three
seconds and then cancels their tasks. CancelledError is a BaseException,
so neither the pipeline nor ServerErrorMiddleware saw it and uvicorn
answered with its own text/plain 500 without X-Request-Id and
X-Instance-Id. The pipeline now handles the cancellation next to the
request timeout: it logs request.cancelled, sends 503 unavailable in the
common error format when the response has not started and re-raises,
so uvicorn only closes the transport after the buffered answer.

The declared Content-Length check joins the guard as a rejection to keep
the call within the statement limit; behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:39:09 +03:00
ArtyomandClaude Opus 5.5 13e856ebd4 Propose closing the second lab 3 review gaps as an openspec change
The second review found that a request cancelled at the end of the
graceful shutdown gets uvicorn's plain 500 without the contract headers,
that readiness reaches the PostgreSQL adapter and a global flag of the
HTTP layer past the ports, that the drain window is logged past the
Logger port, that make up returns with one replica in rotation and that
the CI non-root check can never fail. The retry of an unconfirmed write
was never exercised on the stand either.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 05:37:31 +03:00
ArtyomandClaude Opus 5.5 5a3e372b08 Name the load of each column in the placement control table
The CPU per request and the lock waiters of the placement control are
taken at 4560 rps; the header now says so instead of leaving the reader
to guess between the two offered rates.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 04:47:39 +03:00
ArtyomandClaude Opus 5.5 d3ee257df1 Archive the lab 3 review gaps change
The deltas are synced to openspec/specs: the order of checks on posting
a message (401, then 400 for the request shape without touching the
chat, then 404 for access, then 400 for the text); three detection runs
with a 0.25 s measurement slack and the replica states after each stop
in failover-each; the upper bound of the track 1 grid with a ceiling on
the first grid point stated as a lower bound; control runs of the pool,
the LB queue and the placement.

Before archiving, on the running stand: make test passes, failover
recovers the first write in 2.78 s with 0 failed attempts, persistence
passes; make check, make lint and 243 own tests pass. All level 3 and 4
records were taken on b1c80ee, after the lab 2 carry over.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 04:47:14 +03:00
ArtyomandClaude Opus 5.5 fa09339388 Report the control runs of track 1
The LB queue does not move the peak of 8x1 (4526, 4677 and 4525 rps for
maxconn 16, 32 and 64, overlapping ranges), and the pool moves it the
other way: 4 connections per worker give 5358 rps, 16 give 3789, while
the lock waiters grow from 14.7 to 102. So the pool is not short, extra
connections only add writers to the hot chat row, which confirms the
coordination cost of the USL fit. On the same CPUs 8x0.5 peaks 7 % below
4x1 and costs 15 % more CPU per request, so the retrograde 8x1 comes from
the number of processes and connections, not from slower vCPUs.

The report also names the cause of the flaky compose up, the WalSync
stall of the dropped attempt, the disturbed control runs, and the
evidence index gets a commit column for track 1. The scenario of the
open change no longer presumes its own outcome.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 04:45:55 +03:00
ArtyomandClaude Opus 5.5 f4833c40c0 Record the control runs of track 1
make track1-control on b1c80ee: 8x1 at 5400 rps with a pool of 4, 8 and
16 connections per worker and an LB maxconn of 16, 32 and 64 per
replica, then 4x1 against 8x0.5 on the same CPUs 7-10, three repeats
with the variants interleaved.

The first placement attempt is kept in aborted/ only as a summary: four
4x1 runs had the write command at 7-34 ms instead of 0.2-0.6 ms, waiting
on WalSync, which the CPU based rejection does not see. The rerun right
after it is the one in control-cpus. The full output of the two failed
compose up attempts names the cause of the flaky switch: all replicas
are recreated at once and lb turns unhealthy without a ready server.

Plots and capacity.md now include both control series.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 04:45:55 +03:00
ArtyomandClaude Opus 5.5 a67bc6526a Report levels 3 and 4 on the code after the lab 2 carry over
The report now names a59e3a3 as the last change of the application code
and b1c80ee as the commit of every level 3 and 4 record, with the new
replica IDs and numbers: three detection runs within the formula without
the measurement slack, failover-each and both rolling updates without a
failed request, 12 stack tests and 243 own tests. The shutdown section
and the timeout chain follow the carried over budget: drain 2 s, then
3 s for accepted requests and a 500 for a stuck one, graceful timeout
6 s, stop hooks 7 s. make validate runs from .venv, faults evidence has
its own target, AGENTS.md lists the control runs of track 1.

The clean clone is taken again on f5fea5c without an explicit BASE_URL.
The track 1 part keeps the review fixes of the H2 verdict, the grid
bounds and the rounded numbers; the control runs follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 03:17:56 +03:00
ArtyomandClaude Opus 5.5 f5fea5c59c Record levels 3 and 4 again after the lab 2 carry over
The carry over of the lab 2 fixes changed the request pipeline, logout,
the worker shutdown budget and the stop hooks, so every level 3 and 4
record is taken again on b1c80ee: checks, own tests, smoke, stack,
storage, failover of both replicas, persistence, hooks, the lab 2 stack
tests, limits and the injected violations, lb-check, three detection
runs, failover-each and both rolling updates under k6.

All of them pass: 243 own tests, 12 stack tests, no failed request under
k6 in failover-each and in both rolling updates.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 02:53:12 +03:00
ArtyomandClaude Opus 5.5 b1c80ee544 Anonymize the repository path in the faults evidence
make faults-evidence wrote the pytest rootdir with the local home
directory, so the committed faults.txt was cleaned by hand and could not
be reproduced by the command from the report. The target now replaces
the repository path with <repo> and still fails when a stack test fails,
since the pipe through sed hides the pytest exit code.

The open review change also records that the lab 2 carry over moved the
default image tag to the compose project.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 02:42:45 +03:00
ArtyomandClaude Opus 5.5 ac15b2ff62 Archive the carry over of the lab 2 fixes change
Lab 3 now stands on the finished lab 2. The deltas are synced to
openspec/specs: the zones meet only in the schema and Valkey is needed
only to confirm a logout; an outsider does not wait for a chat lock;
an empty cursor is 400 on history and on the chat list; a stuck request
at SIGTERM gets 500 from the server itself within the 6 s budget, which
still leaves 3 s after the drain window for the database timeouts; a
chunked body is limited by the bytes received; a logout rejected by
PostgreSQL withdraws its revocation mark. The event publication purpose
follows lab 2.

On a stand rebuilt from empty volumes: make test passes, failover
recovers the first write in 3.1 s with 0 failed attempts, persistence
passes, test-faults 12 passed including the full restart with logout
and the shortened session after an API restart, detection passes all
four scenarios with SIGTERM detected in 0.82 s and the stop done in
2.44 s, and the cache evidence finds a tombstone and a key that does
not outlive its session.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 02:38:45 +03:00
ArtyomandClaude Opus 5.5 a59e3a39a8 Carry over the lab 2 fixes made after 8cddb09
Brings the system changes of lab 2 from 8cddb09..102579e onto the lab 3
code, resolving each conflict by meaning:

- the request pipeline counts the body bytes actually received, so a
  chunked body over the limit gets 413 instead of reaching the app;
- logout revokes through a SessionRevocations port and withdraws the
  mark when PostgreSQL rejects the delete, so 503 means the session
  still works; PostgresSessionDirectory loses its no-op invalidate;
- an empty cursor is 400 on history and on the chat list;
- EventBus.project and the test that allowed importing an event across
  zones are gone, the config rules speak of the schema foreign key;
- the worker waits one second less than the rest of the shutdown
  budget, so it cancels a stuck request with 500 and exits 0 instead
  of being killed by the gunicorn master. Lab 3 keeps 3 s after the
  drain window for the database timeouts, so SHUTDOWN_TIMEOUT_SECONDS
  becomes 6 s and the stop hooks wait 7 s, still under the 8 s grace;
- the lab 3 single statement post already locks the chat only for a
  member, so lab 2's LOCK_CHAT edit is not needed; its test is kept;
- lab 2 tests come along with Idempotency-Key where lab 3 needs it;
  the short TTL after restart runs without api-shortttl by shortening
  the session in the database; test_drain adds a stuck request;
- make validate uses .venv with openapi-spec-validator, PYTEST_ARGS,
  faults-evidence, down with the bench profile, the image is tagged by
  the compose project, start probes every 200 ms, cache evidence fails
  without a tombstone and checks the key expiry, kdf.txt shows the
  seed stub apart.

The track 2 tooling of lab 2 (track.py, postgres-restore and the
database argument of migrate) and its evidence scripts stay out.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 02:32:49 +03:00
ArtyomandClaude Opus 5.5 79a52bab58 Propose carrying over the lab 2 fixes as an openspec change
Lab 3 was carried over from lab 2 at 8cddb09, and lab 2 changed up to
102579e after two reviews. The change brings those system fixes here:
the chunked body limit, a worker that cancels a stuck request before
the master kills it, a logout that withdraws its revocation mark when
PostgreSQL rejects it, the empty cursor, the zone rule kept to the
schema and the toolchain and stand tests. To keep the lab 3 rule that
draining leaves the database timeouts their full 3 s, the shutdown
budget grows from 5 to 6 s and the stop hooks from 6 to 7 s.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 02:32:12 +03:00
ArtyomandClaude Opus 5.5 6fafc8a784 Record a clean clone run without an explicit BASE_URL
The launch block of the report now works verbatim with a changed
LB_HTTP_PORT: in a fresh clone with port 18083 make test, both
failovers, persistence and storage-evidence pass without BASE_URL, the
second failover stops the other replica after one shifting request, and
storage-evidence lists only the volumes of the clone project.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:26:05 +03:00
ArtyomandClaude Opus 5.5 e722cb357d Record levels 3 and 4 again on the final code
Every level 3 and level 4 file in evidence was taken on e00eb6c, before
track 1 rewrote the message write into one statement under the chat
lock. The runs are repeated on a02d442: smoke, stack, storage, both
failovers (the second after one shifting request), persistence, hooks,
the lab 2 fault tests, limits and injected violations, 20 same-key races,
three detection runs, failover-each under k6 and both rolling updates.
All pass. checks.txt adds the real output of make check, make validate
and make lint, and student-tests.txt includes the new access order test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:24:11 +03:00
ArtyomandClaude Opus 5.5 a02d442085 Trim the scaling cost proposal to the word limit
The openspec rules keep a proposal within 400 words; the archived track 1
proposal had 405. Three phrasings outside the hypotheses are shortened,
the hypotheses stay as they were written before the runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:13:01 +03:00
ArtyomandClaude Opus 5.5 956d24a701 Repeat detection, add track 1 control runs and isolate image tags
BASE_URL defaults to the published port of lb from docker compose, so
the targets work with a changed LB_HTTP_PORT. rolling-update FROM_REV
and track1-compare tag the old revision by its commit instead of the
shared mtusi-messenger tag, which a parallel clone could overwrite.
detection runs three times to show the spread, failover-each records
docker ps -a of the replicas right after the stop, and failover-evidence
takes SHIFT to move round robin to the other replica. track1-control
varies the pool and the balancer queue at 8x1 and compares 8x0.5 with
4x1 on the same CPUs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:55 +03:00
ArtyomandClaude Opus 5.5 16b6b28ea9 Keep the full output of a failed compose up in track 1 runs
The orchestrator printed only the last 500 characters of stderr before
retrying, which hid the cause of a flaky up on eight replicas. The whole
output of each failed attempt now goes to compose-up-failed.log next to
summary.csv.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:55 +03:00
ArtyomandClaude Opus 5.5 0ce7d6ecf0 Make storage and limits evidence reproducible from any clone
storage-evidence listed volumes by the name mtusi2026lab3, so a clone in
another directory recorded the volumes of the main stand; it now takes
the project name from docker compose config and filters by its label.
make limits wrote only the date, while every evidence file promises the
date and the commit in its first line; the commit is added.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:55 +03:00
ArtyomandClaude Opus 5.5 d4a3124a32 List gunicorn_conf in the module map of the openspec context
Since level 4 the module holds platform behaviour, the drain window on
SIGTERM, so the architecture map names it next to main and migrate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:45 +03:00
ArtyomandClaude Opus 5.5 e9242816a5 Drop the type ignore comment from error classification
ty accepts the lookup without it, and the project keeps code free of
comments.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:45 +03:00
ArtyomandClaude Opus 5.5 a761b718b8 Check the request shape before chat access on posting a message
FastAPI rejects a missing Idempotency-Key, extra fields and wrong types
with 400 before the handler runs, so an outsider gets the same 400 for
an existing and a missing chat; only a bad text, checked by the domain,
makes the handler look up membership and answer 404. The new test pins
that order so it is a recorded rule rather than an accident.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:45 +03:00
ArtyomandClaude Opus 5.5 be17939ddb Propose closing the lab 3 review gaps as an openspec change
An independent review of the grade 5 submission found that the level 4
measurements under load and the fault tests were taken on the code
before track 1 rewrote the message write, that the claim that the pool
and the balancer are not the bottleneck rests on reasoning alone, and
that the retrograde 8x1 result is not separated from running on other
vCPUs. Some evidence tooling also writes data of another compose
project or cannot reproduce a committed file.

The change records the order of checks on posting a message (401,
request shape 400, access 404, text 400), requires three detection runs
with the 0.25 s measurement tolerance, a docker ps of replicas after
each stop in failover-each, an upper bound of the rate grid, and control
runs that vary the pool, the balancer queue and the CPU placement one at
a time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 23:12:16 +03:00
ArtyomandClaude Opus 5.5 e425a9d236 Finalize the lab 3 report against recorded evidence
Rerun the clean clone pass on the final commit in its own compose project:
secrets, config, up with migrations on empty volumes, readiness, smoke,
replica spread and same key races, failover, persistence, repeated
migrations, down keeping volumes and reset-data removing them. Record the
student tests by name and the limits policy on the final code.

Check every figure of the report against evidence files and fix the ones
that drifted: data set sizes, the share of the chat lock statement, the
WAL waits, the aborted series, the disturbed steps, the restart timing
and the image ID of the rolling update. State which commit each evidence
file was taken on, answer the defense questions, index evidence/ and
bring AGENTS.md and the openspec context up to date for lab 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 03:13:24 +03:00
ArtyomandClaude Opus 5.5 e88673dfec Archive the scaling cost change
Track 1 of grade 5 is closed. At a fixed 4 CPU / 2 GiB the 1x4, 2x2
and 4x1 layouts peak at 5 375, 4 964 and 4 724 rps: within the
hypothesised 15 percent, yet smaller replicas cost a third more CPU
per request and reach a long tail earlier. Growing one-CPU replicas
gives 1 720, 2 936, 4 724 and only 4 260 rps at eight, a retrograde
curve with USL sigma 0.014 and kappa 0.038. The saturation point is
the chat row lock in PostgreSQL: at eight replicas 47.5 of 64
connections wait for it while the API, the balancer and the database
CPU still have room. Writing a message with one statement removed the
application round trips from under the lock: p95 at 3 600 rps fell
from 64.5 to 3.7 ms and the peak rose by 15 % with the same resources.

The new lab3-scaling-cost spec is synced to openspec/specs, with the
compare scenario stated as measured: below the knee fewer lock waits
and a lower p95, past it a higher peak. AGENTS.md lists make track1
and make plots. The neighbour CPU sampler is stopped and its file
closed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:42:38 +03:00
ArtyomandClaude Opus 5.5 3e63b16ca6 Report track 1 with plots and the checks after the improvement
make plots draws throughput and latency against offered load for both
series and the comparison, CPU per component, peak RPS against API
CPU with the USL fit and the improved 8x1 point, and the utilisation of
every link at each peak; capacity.md tabulates the ceilings.

after-checks.txt holds the level 3 and 4 checks on the new image:
student tests 240 passed, smoke PASS, 20 same-key races of 8 through
the balancer with 160 x 201 and one copy each, failover with 131
writes and no failure in 2.73 s, persistence PASS.

REPORT.md gains the track section: hypotheses as stated before the
runs, the method and its equal-resource rules, both series in tables,
the saturation point with database, balancer and pool figures, the
USL reading, the before and after table, conclusions per hypothesis
and the limits of a shared single host. The idempotent send section
now describes the one-statement write, the evidence table has the
track rows and the commands are in the clean clone section.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:42:08 +03:00
ArtyomandClaude Opus 5.5 dde113b4ed Record the before and after comparison of track 1
8x1 with the image of edc091d (before) and the one-statement write
(after), alternating per repeat, three repeats at 3 600, 5 400 and
8 100 rps. At 3 600 rps, below the knee, p95 falls from 64.5 ms
(35.7..142.5) to 3.7 ms (2.8..5.4) and p99 from 122 to 13 ms; the API
spends 391 instead of 457 % CPU and PostgreSQL 102 instead of 137 %;
connections waiting for a chat lock drop from 12.8 to 0.15 and none is
idle in transaction any more. Past the knee the peak rises from 4 252
(4 054..4 396) to 4 894 rps (4 494..5 104), +15 %, and at 8 100 rps
from 4 104 to 4 841 (+18 %); the ranges do not overlap. Saturated, the
lock holders now wait for the WAL flush (LWLock WALWrite) instead of
the application.

The switch to the after image for the third repeat failed in compose
while another lab was running tests on the shared VM, so that repeat
was run alone with --first-repeat 3 on the same database; apply now
retries compose up twice and prints its stderr. Two after rows were
still marked disturbed after three reruns and are kept; they are the
lower ones.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:37:34 +03:00
ArtyomandClaude Opus 5.5 296e070eba Add the before and after comparison of track 1
make track1-compare builds the image of BEFORE_REV, the last commit
without the one-statement write, builds the current one, and runs 8x1
at 3 600, 5 400 and 8 100 rps with the two images alternating per
repeat, so drift of the shared VM affects both alike. make track1 runs
the host snapshot, both series, the comparison and the plots.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:06:49 +03:00
ArtyomandClaude Opus 5.5 22f0e6244d Post a message with one statement under the chat lock
Sending a message used to be BEGIN, a SELECT ... FOR UPDATE of the
chat with its members, a lookup of the idempotency key, the insert CTE
and COMMIT. Three of those round trips ran under the chat row lock, and
each one waited for the replica's event loop, so under load the lock
holders sat idle in transaction while everyone else queued behind
them.

The new MessageLog port has one PostgreSQL adapter that does it all in
a single statement with an implicit transaction: lock the chat row
joined with the sender's membership, stamp the message with the later
of the replica clock and the last message plus one microsecond, claim
the key (overwriting it only if it has expired), insert the message
only when the key was claimed, and move last_message_at. The foreign
key from the key to the message is checked at the end of the statement,
so the key may be written first. When the key is already taken the
adapter reads the stored result with a second statement outside the
lock, which also covers a concurrent duplicate that waited for the
first one; the handler then replays it or answers 409 as before.

The chat aggregate no longer takes part in posting, so its post,
membership and last_message_at members and their unit tests are gone;
Message.posted() builds the event. An invalid text is still answered
404 for an outsider: only then the handler reads the membership. A new
API test pins the clock rule against a real database: a lagging
replica clock gets the last stamp plus one microsecond, a clock ahead
is kept. The concurrency, same-key race, expiry and access tests pass
unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:06:49 +03:00
ArtyomandClaude Opus 5.5 edc091dbc4 Choose a one-statement message write as the track 1 improvement
Series B located the bottleneck. At eight replicas the API has 40 % of
its CPU spare and the balancer 60 % of a core, yet three quarters of
the pool connections wait for a chat row lock: the locking SELECT of
the chat averages 14.2 ms and the lock holders sit idle in transaction
while the replica's event loop gets round to the next statement. The
critical section, three round trips long, is what more replicas
lengthen.

The design now records the choice: one CTE that locks the chat with
the membership check, stamps the message no earlier than the last one,
claims the idempotency key and inserts the message, committed by the
statement itself, so the lock never waits for the application. A taken
key is read back by a second statement outside the lock. The price is
that the chat aggregate no longer guards posting; the rules move into
the adapter's SQL and are held by integration tests. The rejected
alternatives and the before/after plan are listed, and the spec gains
the observable requirement of a short critical section.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:06:10 +03:00
ArtyomandClaude Opus 5.5 3bdc8fad23 Record the growth series of track 1
One to eight replicas of 1 CPU, 512 MiB and one worker each, three
repeats per rate; the 4x1 point comes from series A. Peak successful
RPS: 1 720 for one replica, 2 936 for two, 4 724 for four and only
4 260 for eight, lower than four. Up to two replicas the API is the
limit (101 % and 201 % of its CPU). At eight replicas the API uses 473
of its 800 % and the balancer 40 % of a core, while PostgreSQL is at
178 of 200 %, 47.5 of the 64 pool connections wait for a chat row lock
and the balancer queue holds 744 requests. The locking SELECT ... FOR
UPDATE of the chat takes 14.2 ms on average, 97 % of all statement
time of the step, and about 7 connections sit idle in transaction:
the lock holders wait for the application between round trips.

A universal scalability law fit over 1, 2, 4 and 8 CPUs gives
sigma 0.014 and kappa 0.038, a peak near five replicas and a decline
after it. No step of this series was rejected as disturbed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 01:05:39 +03:00
ArtyomandClaude Opus 5.5 be19abf364 Record the fixed budget series of track 1
1x4, 2x2 and 4x1 at 4 CPU and 2 GiB of API, workers equal to CPUs,
32 pool connections and 128 balancer slots in every layout, three
repeats from 600 to 6 830 rps. All three keep up with the offered
load up to 4 560 rps; the peaks are 5 375 rps for 1x4 (5 332..5 384),
4 964 for 2x2 (4 894..5 104) and 4 724 for 4x1 (4 686..4 794). At the
peak the API uses 95 % of its four CPUs in every layout, PostgreSQL
82..89 % of its two, the balancer 40 % of one, and about half of the
32 database connections wait for the lock on a chat row.

Smaller replicas cost more: at 3 040 rps the API burns 215 % CPU as
1x4, 243 % as 2x2 and about 280 % as 4x1, and p95 at 4 560 rps grows
from 9 to 69 and 150 ms.

The first attempt was aborted when a neighbour's image build froze the
Docker API; its summary is kept under aborted/. Twelve steps of the
rerun were rejected as disturbed and repeated. A config's SLO capacity
now needs a majority of saturated repeats, since a median is robust to
one disturbed repeat and "any repeat" is not. Series B starts at 450
rps per CPU.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-29 00:31:43 +03:00
ArtyomandClaude Opus 5.5 67f6d6866e Reject steps disturbed by foreign load on the shared VM
The first run of series A was spoiled by other stands on the same
Docker VM: an image build of another lab is invisible to docker stats,
yet it took CPU from the pinned replicas, doubled their CPU per request
and stalled the Docker API for fifteen minutes in the middle of two
steps.

docker-stats.sh now also samples the VM-wide /proc/stat counters, so a
step records the CPU of the whole VM, the part not used by this
project, the largest gap between samples and its wall time. A step
with more than one foreign core, a gap over 10 s or a k6 run 90 s
longer than its load is written to disturbed.csv and repeated after
the VM has been quiet for 15 s, up to three times. On a quiet VM the
foreign part is 2 % of a core at 600 rps and 25 % at 4 560 rps, which
is Docker networking and the samplers themselves.

The growth series starts at 300 rps per CPU and searches up to 9 000,
so its knees are found with fewer idle steps. The plots fit the
universal scalability law to the growth series.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 22:18:14 +03:00
ArtyomandClaude Opus 5.5 e8804b05d0 Plot track 1 series and tabulate the ceilings
tools/plot_track1.py reads any set of summary.csv files and draws, per
series, successful RPS, p95 and p99 against the offered rate and CPU
per component against its limit, plus two cross-series charts: peak
successful RPS against total API CPU with the linear growth line, and
the utilisation of API, PostgreSQL, balancer and the share of the pool
waiting on a lock at each config's peak. A point is the median of the
repeats, the whiskers are min and max. capacity.csv and capacity.md
hold the SLO capacity, the peak and the resource figures at the peak.

Colours follow the config across charts, every line also has its own
marker and a direct label. matplotlib comes through uv run --with, so
the tool lives in tools/ and stays out of the 3.9 scripts; make plots
runs it, make lint covers it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:35:05 +03:00
ArtyomandClaude Opus 5.5 8ea1996063 Add the series orchestrator and samplers for track 1
scripts/scaling.py applies a replicas x CPU layout through compose
variables: workers equal to the replica CPUs, a pool of 8 per worker,
a balancer queue of 32 per worker so every layout of a series offers
the same concurrency to the API, and the replicas pinned to CPUs 7 and
up, next to PostgreSQL on 0-1, the balancer on 2, Valkey on 3 and k6
on 4-6 with 3 CPU and 1 GiB. For every offered rate it runs k6 three
times and stops a config after two steps saturated in all repeats.

Each step keeps its raw data: k6 summary, docker stats, HAProxy
statistics and pg_stat_activity sampled every second, and the top of
pg_stat_statements. The summary row carries CPU per component,
PostgreSQL active, idle, idle in transaction and lock waiting backends,
the balancer queue and the database size. Several variants alternate
per repeat for before and after runs. host-snapshot.sh records every
container on the host before a series.

make track1-a and track1-b run the fixed budget and the growth series
from an empty database.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:25:23 +03:00
ArtyomandClaude Opus 5.5 107fbbbe15 Let measurements pin each component to its own CPUs
Track 1 compares replica layouts that must get exactly the same CPUs,
and the load generator, balancer, Valkey and PostgreSQL must not steal
cycles from the replicas or from each other. Every service now takes
an optional cpuset from LB_CPUSET, API_CPUSET, PG_CPUSET,
VALKEY_CPUSET and K6_CPUSET. They are empty by default and compose
drops an empty cpuset, so the ordinary stand is unchanged and make
limits still passes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:25:23 +03:00
ArtyomandClaude Opus 5.5 d8d551aae4 Propose the scaling cost track as an openspec change
Track 1 of grade 5 asks to compare one, two and four API replicas at a
fixed total CPU and memory budget, to grow resources until a shared
dependency saturates, to show with database, balancer and pool metrics
why more replicas stop helping, and to confirm one improvement with a
before and after measurement.

The hypotheses are stated before any run: at 4 CPU / 2 GiB the 1x4,
2x2 and 4x1 layouts reach the same ceiling within 15 percent; with one
CPU per replica throughput grows almost linearly up to four replicas
and by less than 1.5 times from four to eight, because PostgreSQL
saturates on the chat row lock held across three round trips and on
CPU, while the balancer stays far from its limit.

The new lab3-scaling-cost capability fixes the method: open-model k6
with the level 4 profile, three repeats per point, equal workers, pool
and balancer concurrency across layouts, CPU pinning per component,
raw samples per step, plots from summary files, and an improvement
chosen only after the bottleneck is found.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:16:19 +03:00
ArtyomandClaude Opus 5.5 61c0c28a43 Archive the failover operations change
Grade 4 of lab 3 is closed. A replica on SIGTERM first answers 503 on
readiness for a two second window, longer than the 1.5 s worst
detection, and only then closes its listener and finishes accepted
requests within five seconds; the balancer lets a replica back only
after two passed checks. A test pins the timeout chain to compose,
HAProxy and the stop hook. make detection measured 0.71 s for SIGTERM
(before the process exited at 2.49 s), 0.67 s for a killed process,
2.76 s for a hung one and 1.23 s until no replica was left with
PostgreSQL down. make failover-each stopped and restored each replica
under k6 at 100 rps with no errors and no balancer retries, make
lb-check ran 20 same-key races of 8, make limits checks limits and
isolation against a policy, and make rolling-update replaced the
level 3 image with the current one under load with capacity kept at
two and no errors, migrate running once. The new
lab3-failover-operations spec is synced, and the lab 1 operability
and lab 2 dependency failure specs carry their deltas.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:08:15 +03:00
ArtyomandClaude Opus 5.5 a9aab2727f Record level 4 evidence and extend the report
Evidence from a freshly recreated stand at the current code: the four
detection cases with their declared maxima, failover-each for both
replicas under k6 at 100 rps (no errors, no balancer retries, the
stopped replica never served during its outage), the 20 round
same-key race, the limits and isolation check with a run against
deliberate violations, and two rolling updates under load: from the
level 3 image, where the old replicas without a drain window caused
54 redispatches and 2 response errors that the balancer retried, and
between two current builds with all counters at zero. Level 3 runs
are refreshed on the new code: smoke, stack view, both failovers with
the drain sequence in the replica log, hooks with the longer stop,
persistence, stack fault tests and own tests with the shutdown and
timeout chain output.

The report gains the shutdown order, the check period and worst
detection per failure with measurements, the timeout chain, rows 4.1
to 4.4, level 4 rows of the failure table, the k6 role, the new
variables and the updated limitations; AGENTS.md lists the commands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:07:51 +03:00
ArtyomandClaude Opus 5.5 6107c1aa34 Show the drain sequence of the stopped replica in failover evidence
The failover evidence printed the last six log lines of the stopped
replica, which no longer reach back to the signal now that shutdown
starts with a two second drain window. It now filters the replica log
since the start of the run for the signal, the drain message, the 503
readiness answers, the listener shutdown and the process exit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 20:07:44 +03:00
ArtyomandClaude Opus 5.5 e00eb6c878 Keep probe logs out of the ignored log pattern
The repository ignores *.log, so the action log of a load run (with
the rolling update replacement lines) and the k6 output would never
reach evidence/. The probe now writes action.txt and k6/k6.txt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:52:55 +03:00
ArtyomandClaude Opus 5.5 eb04fc10e3 Give every level 4 check one make target
make limits, make lb-check (now 20 rounds of 8 parallel posts with one
key), make detection, make failover-each and make rolling-update each
write their file in evidence/ and fail on a violated check; make
level4 runs them in order. RATE sets the k6 arrival rate (100 rps by
default). make rolling-update builds the image before the load starts
so the build does not skew the measurement; with FROM_REV=<commit> it
first builds the image tag from git archive of that commit and
recreates the replicas on it, so the update is a real change of
version, and it writes to evidence/rolling-from-<commit>. Lint covers
scripts/limits.py. CI acceptance runs make limits and make detection.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:52:29 +03:00
ArtyomandClaude Opus 5.5 3584501de8 Check that the balancer drops every replica while PostgreSQL is down
The stack test for a stopped PostgreSQL asked for liveness 200 through
the balancer, which only held while the balancer had not noticed the
outage yet. Now the protected endpoints and readiness through the LB
must answer 503 unavailable within 2 s, liveness is checked inside a
replica with docker exec, the balancer must report zero UP servers
within 2 s and answer liveness itself with 503 in the contract error
format, the request id echoed and no X-Instance-Id. After PostgreSQL
starts again every replica must be back in rotation without a restart.

Stand helpers read the number of UP servers from the HAProxy stats,
excluding the backend summary row, and reach a replica by container
id, which survives the renumbering after a rolling update.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:52:29 +03:00
ArtyomandClaude Opus 5.5 572204950a Replace replicas one by one under load
scripts/rolling-update.sh runs migrate once before touching any
replica, then for each old replica scales the service to N+1 without
recreating the others, waits until the new container is healthy and
the balancer sees N+1 UP servers, and only then stops the old one
with docker stop -t 6 (so it drains) and removes it. The log names
the hostname and image of the old and the new replica of every step,
which is what the report quotes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:52:19 +03:00
ArtyomandClaude Opus 5.5 5adb8719d4 Check limits and isolation against a declared policy
scripts/limits.py states which secrets, volumes and networks each
service needs and that only lb publishes ports, on loopback. It
compares that policy with docker compose config (with the bench
profile, so k6 is covered) and with docker inspect of the running
containers: CPU and memory limits declared and applied, no
container_name, no published port on any API replica, a read-only
root filesystem for the API, and which networks are internal. It
prints both tables and every violation and exits non-zero on any.

The stack evidence script no longer reaches replicas through
docker compose exec or port, which assume container number 1 and
break after a rolling update renumbers the replicas.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:52:09 +03:00
ArtyomandClaude Opus 5.5 d5f8a7c25c Measure detection and fail every replica in turn under load
scripts/detection.sh runs four failures one after another and brings
the stand back between them: SIGTERM through docker stop -t 6 (the
balancer must exclude the replica within 1.5 s and before the process
exits after its drain window), docker kill (1.5 s), docker pause for a
hung process (3.5 s, the check timeout counts twice) and stopping
PostgreSQL (all replicas out within 1.5 s, the balancer answers 503
itself). A 0.25 s slack covers the docker CLI and the 50 ms polling.
Each run writes evidence/detection/<case>.json and the script fails
if any case exceeds its declared maximum.

scripts/failover-each.sh stops every replica in turn with stop-one.sh,
keeps it down for 10 s and restores it, all inside one k6 load window,
and collects a summary with RPS, errors, latency, detection, rejoin,
probe recovery and balancer retry counters per replica.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:52:09 +03:00
ArtyomandClaude Opus 5.5 711c9c98dc Add the k6 load profile and the load and detect probe modes
The k6 profile from the prepared kit runs an open model against the
balancer from the edge network: constant arrival rate, 80 % keyed
message posts and 20 % history reads over 20 synthetic users and 10
chats, metrics only for the measure phase, and no setup data (tokens)
in summary.json. scripts/k6.sh runs it with the host uid so the
summary is writable on Linux too.

scripts/probe.py gains three things. check --rounds repeats the
same-key race with a new key per round and counts rounds with
identical bodies, one stored copy and 409 on another body. load runs
an action under k6 while a probe posts every 0.1 s and resends the
same key after a failure and a poller reads the number of UP servers;
it writes the action log, the probe and LB traces, the delta of the
backend retry, redispatch and error counters, and a verdict: dip for
a replica that leaves and returns, replace for a rolling update that
must keep capacity and end on new replicas only. detect runs the
action in the background and polls the balancer at the same time, so
a drain that ends after the exclusion is visible, and checks the
declared maximum, the LB answer after detection and the time to
restore.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:51:59 +03:00
ArtyomandClaude Opus 5.5 502c7d8ace Keep a returning replica out of rotation until its checks pass
The first failover-each run had no errors, yet the balancer counted
19 and 49 redispatches. The HAProxy log showed why: when a stopped
container comes back into Docker DNS, its server-template slot leaves
MAINT (resolution) as UP/READY at once, before any health check, so
requests went to a gunicorn that was not listening yet and were
redispatched to the other replica.

default-server now sets init-state fully-down (HAProxy 3.1+): at start,
on discovery through DNS and on leaving maintenance a server stays DOWN
until rise 2 checks pass. A rerun under 100 rps shows zero retries and
redispatches for both replicas; rejoining takes about a second longer.
The design and the failover spec of the change record the finding.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:51:49 +03:00
ArtyomandClaude Opus 5.5 85ed37914d Pin the timeout chain in the stand and test it
The API service now names every timeout that the chain depends on:
DRAIN_SECONDS, DB_ACQUIRE_TIMEOUT_SECONDS and DB_COMMAND_TIMEOUT_SECONDS
join REQUEST_TIMEOUT_SECONDS and SHUTDOWN_TIMEOUT_SECONDS in compose,
and the image gets the drain default. A unit test reads the compose
defaults, the HAProxy check and timeout settings and the stop hook
timeout, and checks that the chain shrinks inwards: LB server 10 s >
request 8 s > pool wait plus statement 3 s, readiness 0.8 s < check
1 s, drain 2 s > worst detection 1.5 s, shutdown 5 s leaves 3 s for
accepted requests, and shutdown < hook 6 s < stop_grace_period 8 s
< 10 s. It also pins the declared detection maxima: 1.5 s for a 503
or a refused connection and 3.5 s for a hung replica.

The k6 load generator joins the stand under the bench profile: pinned
by digest, edge network only, 2 CPU and 512 MiB, no secrets.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:33:55 +03:00
ArtyomandClaude Opus 5.5 6fb4587ef6 Leave the rotation before closing the listener on SIGTERM
On SIGTERM gunicorn closed the listener at once, so a request already
queued on the closing socket reached the balancer as a dropped
connection after sending: a retry for GET and keyed messages, a 502
for user, chat and login posts. Now each worker first raises a
draining flag and keeps serving for DRAIN_SECONDS (2 s by default,
above the 1.5 s worst detection of a 503): readiness answers 503
unavailable, liveness stays 200, and the balancer takes the replica
out while it is still healthy. Only then uvicorn closes the listener
and finishes accepted requests within SHUTDOWN_TIMEOUT_SECONDS minus
the window, so gunicorn graceful_timeout stays 5 s.

The worker runs a uvicorn Server subclass whose main loop adds the
window after the exit signal; UvicornWorker._serve is overridden to
use it. Tests check readiness under the flag and run real gunicorn on
a free port: during the window ready is 503 and live 200, the port
closes after the window, a registration accepted before SIGTERM and
finished after the port closed still gets 201, and the master exits
with code 0 before the shutdown limit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:33:02 +03:00
ArtyomandClaude Opus 5.5 6e4c387e50 Answer readiness within the balancer check timeout
The readiness ping waited up to one second for a pooled connection and
one more second for SELECT 1, while HAProxy gives a check one second.
With a busy pool the balancer saw a check timeout instead of an
explicit 503. The ping now waits 0.4 s for a connection and 0.4 s for
the query, so the worst answer, 0.8 s, still arrives inside the check.
Other queries keep the pool acquire and command timeouts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:33:01 +03:00
ArtyomandClaude Opus 5.5 1ae4b770ae Propose failover operations as an openspec change
Level 4 of lab 3 asks for health checks, timeouts and SIGTERM handling
that agree with each other, a stated check period and worst detection
time, stopping every replica in turn under load with RPS, errors and
recovery time, a parallel race on one idempotency key, limits and
port and secret isolation, and a rolling update under load with
migrations run once.

The new lab3-failover-operations capability covers those guarantees.
The lab 1 operability delta makes a replica leave the rotation first
on SIGTERM: readiness answers 503 for a drain window longer than the
balancer detection time, and only then the listener closes. The lab 2
dependency failure delta states that the balancer drops every replica
and answers 503 itself while PostgreSQL is down. The design adds the
measurement tooling from the prepared kit: k6 under a bench profile,
probe load and detect modes, detection, failover-each, limits and
rolling update scripts with one make target each.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 19:30:27 +03:00
ArtyomandClaude Opus 5.5 8d28d45d55 Archive the load-balanced replicas and idempotent messages change
Grade 3 of lab 3 is closed: the stand runs two API replicas of one
compose service behind HAProxy as the only published entry point,
one token reaches both replicas by X-Instance-Id, stopping either
replica with scripts/stop-one.sh keeps writes going within 1.2-1.7 s
without errors or duplicates, eight concurrent posts with one key give
one message, and make test, the persistence scenario with
scripts/restart.sh, the failover scenario, lint, own tests, check,
validate and the lab 2 stack fault tests pass. The new
lab3-load-balancing and lab3-idempotent-messages specs are synced, and
the lab 1 history and operability specs and the lab 2 storage spec
carry their deltas.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:53:26 +03:00
ArtyomandClaude Opus 5.5 957eabdfc3 Record level 3 evidence and fill in the report
Save sanitized outputs from a stand started from a clean state: the
clean clone run, smoke through the balancer, the stack view with the
replica hostnames, ports, networks, limits and the balancer server
states, the probe with two replicas behind one token and the eight
way race on one key, a failover run for each replica with the
container left exited and its graceful shutdown log, the hook
negative cases and the balancer answer without replicas, the
persistence run with StartedAt of every container before and after,
schema, migration rerun, KDF prefix, ignore rules, own tests and the
lab 2 stack fault tests through the balancer, plus the environment.

The report covers the clean clone start, the architecture, the
X-Instance-Id and idempotency decisions, the balancer settings, the
role to service table, the mapping of .env.example to the real
variables, one evidence row per level 3 criterion and the carried
lab 2 minimum, and the failure table for level 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:53:11 +03:00
ArtyomandClaude Opus 5.5 0796e291b7 Restart containers in place in the restart hook
After make up, which builds with --build, a plain up in the restart
hook saw a different service hash and recreated migrate and the API
replicas instead of starting the stopped ones, so the replicas came
back with new hostnames. The hook now passes --no-recreate: lb and the
replicas are the same containers restarted, migrate reruns in its old
container, and only volumes and data carry state across the restart.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:47:06 +03:00
ArtyomandClaude Opus 5.5 ae8fb0a48e Record which replica stops and which services restart
scripts/failover-evidence.sh lists the api containers by hostname, the
X-Instance-Id they answer with, before and after make test-failover,
names the container left exited, keeps its last log lines with the
gunicorn graceful shutdown, then restores it and lists the replicas
again. scripts/evidence-stack.sh records the compose config check,
published ports, the missing port of a replica, hostnames, networks,
limits, process users, the balancer view of every server and the
alternating X-Instance-Id through the balancer, plus the environment
and image versions. The persistence and storage evidence scripts now
list every replica and the idempotency key table.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:44:03 +03:00
ArtyomandClaude Opus 5.5 ceb266ed05 Add the stop-one, restart and restore hooks and an LB probe
scripts/stop-one.sh maps TARGET_INSTANCE_ID to the api container whose
hostname matches, stops only it with docker stop -t 6 and leaves it
stopped; an unknown id exits 3 and touches nothing. scripts/restart.sh
replaces the lab 2 hook: it stops lb and the replicas, restarts
PostgreSQL and Valkey with their volumes and brings the stand back
with up --wait, which also reruns the idempotent migrate job.
scripts/restore.sh starts stopped replicas without recreating them
and scripts/lb-wait.sh waits until the balancer statistics show every
replica UP again, so the next failover run sees two replicas.

scripts/probe.py check (stdlib, Python 3.9 syntax) counts X-Instance-Id
over 40 calls with one token and races 8 posts with one key through
the balancer. make restore and make lb-check run them, ruff covers the
probe, and the CI acceptance job runs the failover test and the probe.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:43:52 +03:00
ArtyomandClaude Opus 5.5 dc2015473f Run the API as replicas behind HAProxy
compose.yaml now runs one api service with API_REPLICAS replicas and
no published ports, container name or hostname, behind lb, HAProxy
3.2.26 LTS pinned by digest and the only service with ports, bound to
127.0.0.1 (LB_HTTP_PORT for HTTP, LB_STATS_PORT for read-only stats).
The balancer finds replicas through Docker DNS with a server template,
checks GET /health/ready every second (fall 2, rise 2), balances round
robin without stickiness, retries connection failures on another
replica and allows a retry after a sent request only for GET and for
message posts carrying Idempotency-Key, never for users, chats or
login. Its own 502/503/504 answers use the contract error body with
the forwarded X-Request-Id.

The network is split into edge and an internal backend, every service
gets CPU and memory limits, the API runs read-only with a tmpfs /tmp,
two workers per replica, an 8 s request limit and a 5 s graceful stop
inside an 8 s stop_grace_period. Only api builds the image, migrate
reuses it once before the replicas start. PostgreSQL loads
pg_stat_statements and allows 200 connections. The short TTL instance
of lab 2 published the API around the balancer and is removed; its
expiry check stays as an in-process test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:43:43 +03:00
ArtyomandClaude Opus 5.5 7bf28fc6ed Make message posts idempotent with Idempotency-Key
POST /api/v1/chats/{chat_id}/messages now requires the header, checked
at the HTTP boundary (1-128 of [A-Za-z0-9._:-], else 400). The handler
keeps the lab 2 order under the chat row lock: membership, then text,
then the receipt for (chat, sender, key) younger than
IDEMPOTENCY_TTL_SECONDS. A receipt with the same fingerprint replays
the stored message, a different one is 409 conflict; without a
receipt one statement inserts the message, the key row and the chat
mark, so both commit or neither does. Concurrent retries wait on the
same row lock and then read the committed receipt. The fingerprint is
SHA-256 of the canonical JSON of the parsed body, so layout does not
matter, and only 201 answers are ever stored.

A lock timeout now counts as a dependency failure and answers 503
instead of 500, so a retry with the same key is safe.

Own tests cover replay, a different layout of the same JSON, conflict,
missing and malformed keys, rejected attempts that leave the key free,
scope by user and chat, revalidation after logout and for outsiders,
expiry, and eight concurrent retries through two app instances
sharing one PostgreSQL. Every earlier message post sends a fresh key.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:36:15 +03:00
ArtyomandClaude Opus 5.5 a18e7b320b Add the idempotency key table as an additive migration
Migration 0002 stores one row per accepted message key: the chat, the
sender, the key, the SHA-256 fingerprint of the request and the
message. The primary key (chat_id, user_id, key) is the key scope of
the contract, the composite foreign key keeps the row inside the
messaging tables, as messages already do, and CHECK constraints repeat
the key format and the fingerprint length. Nothing existing changes,
so the lab 2 code keeps running on the new schema.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:33:11 +03:00
ArtyomandClaude Opus 5.5 bf0f0b4c07 Name the serving replica in every response
The platform settings default the instance id to the container
hostname, computed once per process, so every gunicorn worker of a
replica reports the same value and it matches docker ps. The request
pipeline stamps X-Instance-Id next to X-Request-Id on every response
it sends, and the unhandled error handler adds it itself, because the
500 answer is produced outside the pipeline.

Own tests cover 200, 204, 400, 401, 404, the hidden 405, 413 and 500
with a fixed instance id, and the hostname default. The application
version follows the contract version 1.3.0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:32:36 +03:00
ArtyomandClaude Opus 5.5 9db7a24362 Propose load-balanced replicas and idempotent messages as an openspec change
Plan the grade 3 cycle of lab 3 on top of the carried-over lab 2
solution: run the API as several replicas of one compose service
behind HAProxy as the only published entry point, stamp every API
response with X-Instance-Id taken from the container hostname, require
Idempotency-Key on message posts and keep the key and the message in
one PostgreSQL transaction, and add explicit stop-one, restart and
restore hooks.

The design fixes the balancer settings and retry policy, the
idempotency table, the lookup order under the chat row lock, the
request fingerprint and the shutdown budget. Delta specs add the
lab3-load-balancing and lab3-idempotent-messages capabilities and
modify message posting, request identification, shutdown, container
delivery, migrations, restart and the reproducible stand.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:31:41 +03:00
ArtyomandClaude Opus 5.5 416ce4f9db Carry over the lab 2 solution
Bring the application, own tests, Dockerfile, toolchain, compose
stack, migrations, secret generator, restart hook, evidence scripts and
CI job from the lab 2 solution commit 8cddb09 unchanged, merge the lab
2 Makefile targets into the lab 3 skeleton Makefile without touching
its targets, and append the lab 2 solution variables to the skeleton
.env.example. The package version follows the contract version 1.3.0.

This is the starting point of the lab 3 cycle: lint, own tests and the
offline skeleton check pass before any lab 3 change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:26:15 +03:00
ArtyomandClaude Opus 5.5 0ec2f9dae3 Carry over the agent context and openspec history from lab 2
Bring the Claude Code settings, the lint hook, the opsx commands and
skills, the architecture notes, the lab 1 and lab 2 specs and the
archived lab 1 and lab 2 changes into the lab 3 skeleton, so lab 3
continues the same spec history instead of starting from scratch.

Rewrite AGENTS.md and the openspec context and rules for lab 3:
HAProxy in front of several stateless API replicas, X-Instance-Id on
every response, a mandatory Idempotency-Key for messages shared by all
replicas through PostgreSQL, explicit stop-one and restart hooks, Out
of scope moved to labs 4-7 plus Swarm and HA storage, and rules on
retry policy, timeout chains and replica-local state.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 11:23:53 +03:00
2757 changed files with 299306 additions and 19 deletions
+181
View File
@@ -0,0 +1,181 @@
---
name: "OPSX: Apply"
description: "Implement tasks from an OpenSpec change (Experimental)"
allowed-tools: Bash(openspec:*)
category: "Workflow"
tags: ["workflow", "artifacts", "experimental"]
---
Implement tasks from an OpenSpec change.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
2. **Check status to understand the schema**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
3. **Get apply instructions**
```bash
openspec instructions apply --change "<name>" --json
```
This returns:
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
- Optional `context`: current required project instruction input from the selected root
- Optional `operationGuidance`: current advisory guidance for apply
**Handle states:**
- If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` (if it is not installed, run `openspec status --change "<name>" --json` to see the next artifact and `openspec instructions <artifact-id> --change "<name>" --json` for how to create it)
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation
Treat `context` as a required prompt-level input. Read and consider it, and
apply relevant project facts, conventions, and constraints while implementing.
Treat `operationGuidance` as optional additive advice. Read and consider every
entry, and follow entries that are applicable and compatible with the built-in
workflow.
Keep both fields separate from CLI-returned state, missing artifacts, tasks,
progress, `contextFiles`, and the built-in `instruction`. They are not
evidence of task completion, do not replace the built-in instruction, and do
not permit bypassing a blocked state. If context conflicts with the built-in
instruction, an explicit user choice, or a CLI-controlled value, report the
conflict and preserve the controlling value. If guidance is inapplicable or
conflicts with those controlling inputs, do not follow it and explain why.
These are prompt-level behavior contracts, not enforceable checks.
4. **Read context files**
Read every file path listed under `contextFiles` from the apply instructions output.
The files depend on the schema being used:
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output
Do not copy `context` or `operationGuidance` verbatim into implementation
files or planning artifacts unless the user separately asks for that content.
5. **Show current progress**
Display:
- Schema being used
- Progress: "N/M tasks complete"
- Remaining tasks overview
- Dynamic instruction from CLI
6. **Implement tasks (loop until done or blocked)**
For each pending task:
- Show which task is being worked on
- Make the code changes required
- Keep changes minimal and focused
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
- Continue to next task
**Pause if:**
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- Error or blocker encountered → report and wait for guidance
- User interrupts
7. **On completion or pause, show status**
Display:
- Tasks completed this session
- Overall progress: "N/M tasks complete"
- If all done: suggest archive
- If paused: explain why and wait for guidance
**Output During Implementation**
```
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
```
**Output On Completion**
```
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! You can archive this change with `/opsx:archive`.
```
**Output On Pause (Issue Encountered)**
```
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
```
**Guardrails**
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- Use contextFiles from CLI output, don't assume specific file names
- Do not use context or operation guidance as proof that a task is complete
- Apply relevant project context; report conflicts with controlling workflow inputs
- Consider every guidance entry; explain any inapplicable or conflicting advice
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
**Fluid Workflow Integration**
This skill supports the "actions on a change" model:
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
+225
View File
@@ -0,0 +1,225 @@
---
name: "OPSX: Archive"
description: "Archive a completed change in the experimental workflow"
allowed-tools: Bash(openspec:*)
category: "Workflow"
tags: ["workflow", "archive", "experimental"]
---
Archive a completed change in the experimental workflow.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
**Input**: Optionally specify a change name after `/opsx:archive` (e.g., `/opsx:archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
When prompting, show only active changes (not already archived).
Include the schema used for each change if available.
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:archive <other>`).
**Load current archive inputs before the existing archive checks:**
After resolving the selected change and planning root, run:
```bash
openspec instructions archive --change "<name>" --json
```
Keep the same selected-root flags on this command. This lookup is advisory and
optional: it only supplies extra prompt inputs, so it must never block archiving.
If it exits non-zero or returns invalid JSON — for example on an older CLI that
does not support this command yet — continue the archive workflow with no
context and no operation guidance. Do not report an error and do not stop.
A successful response may omit both optional fields. Treat `context` as a
required prompt-level input: read and consider it, and apply relevant project
facts, conventions, and constraints. Treat `operationGuidance` as optional
additive advice: read and consider every entry, and follow entries that are
applicable and compatible with the built-in archive workflow.
Keep both fields separate from built-in steps, explicit user choices, resolved
paths, CLI checks, and command contracts. If context conflicts with one of those
controlling inputs, report the conflict and preserve the controlling value. If
guidance is inapplicable or conflicts with a controlling input, do not follow it
and explain why. Do not infer replacement paths, skipped prompts, or flags from
either field, and do not copy their text verbatim into specs, change artifacts,
or archive summaries unless the user separately asks for it. These are
prompt-level behavior contracts, not enforceable checks.
2. **Check artifact completion status**
Run `openspec status --change "<name>" --json` to check artifact completion.
Parse the JSON to understand:
- `schemaName`: The workflow being used
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
- `artifacts`: List of artifacts with their status (`done`, `skipped`, or other)
**If any artifacts are neither `done` nor `skipped`** (skipped artifacts satisfy the requirement - the change declares skip_specs):
- Display warning listing incomplete artifacts
- Prompt user for confirmation to continue
- Proceed if user confirms
3. **Check task completion status**
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
**If incomplete tasks found:**
- Display warning showing count of incomplete tasks
- Prompt user for confirmation to continue
- Proceed if user confirms
**If no tasks file exists:** Proceed without task-related warning.
4. **Assess delta spec sync state**
Use `artifactPaths.specs.existingOutputPaths` from status JSON as the only
delta-spec source. If the `specs` entry is missing or
`existingOutputPaths` is empty, proceed without a sync prompt and do not infer
delta specs from other artifacts.
**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (use the store-aware `planningHome.root` from step 2, not a hardcoded repo path)
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting
**Prompt options:**
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
Route on the answer:
- "Cancel" — stop, do not archive
- "Archive without syncing" or "Archive now" — proceed to archive
- "Sync now" or "Sync anyway" — sync, then verify (below)
- Anything else — ask again rather than archiving
Before a selected sync writes any main spec, run
`openspec instructions specs --change "<name>" --json` once with the same
selected-root flags. Require a zero exit status and valid artifact-instruction
JSON. If the lookup fails or returns invalid JSON, report the error and stop
before writing any main spec or moving the change. A valid response with omitted
`rules` is the no-rules case. Apply returned `rules` only to the content and
form of main specs produced by this merge; do not use them as archive guidance,
change CLI behavior, or copy the rule text into any output file.
Then run the `/opsx:sync` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching `specs` instructions again. Do not delegate it to a background task — step 5 would move `changeRoot` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
Then re-run the comparison from the top of this step against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
- ADDED requirements present
- MODIFIED requirements carrying the scenario and description changes named in the delta, with their other scenarios intact
- REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving `## Requirements` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
- RENAMED requirements present under the new name and absent under the old one
If the sync failed, or any capability does not match, report what differs and stop — do not archive. Nothing has moved and `changeRoot` is intact, so the user can fix the mismatch or re-run the sync and start the archive again.
5. **Perform the archive**
Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
```bash
mkdir -p "<planningHome.changesDir>/archive"
```
Generate the target name: use the change name as-is when it already starts with a `YYYY-MM-DD-` prefix; otherwise prepend the current date as `YYYY-MM-DD-<change-name>`. Never stack a second date (same rule as `openspec archive`).
**Check if target already exists:**
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move `changeRoot` to the archive directory
```bash
mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
```
6. **Display summary**
Show archive completion summary including:
- Change name
- Schema that was used
- Archive location
- Spec sync status (synced / sync skipped / no delta specs)
- Note about any warnings (incomplete artifacts/tasks)
**Output On Success**
```markdown
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
**Specs:** ✓ Synced to main specs
All artifacts complete. All tasks complete.
```
**Output On Success (No Delta Specs)**
```markdown
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
**Specs:** No delta specs
All artifacts complete. All tasks complete.
```
**Output On Success With Warnings**
```markdown
## Archive Complete (with warnings)
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
**Specs:** Sync skipped (user chose to skip)
**Warnings:**
- Archived with 2 incomplete artifacts
- Archived with 3 incomplete tasks
- Delta spec sync was skipped (user chose to skip)
Review the archive if this was not intentional.
```
**Output On Error (Archive Exists)**
```markdown
## Archive Failed
**Change:** <change-name>
**Target:** the archive path derived from `planningHome.changesDir`/<target-name>/
Target archive directory already exists.
**Options:**
1. Rename the existing archive
2. Delete the existing archive if it's a duplicate
3. Wait until a different date to archive
```
**Guardrails**
- Announce the selected change; prompt for selection when it is ambiguous
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, run the `/opsx:sync` workflow inline (agent-driven)
- Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving `changeRoot`
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
- Apply relevant runtime context and report conflicts; operation guidance remains advisory
- Consider every guidance entry and explain any inapplicable or conflicting advice
- Existing CLI checks, resolved paths, prompts, and command contracts are unchanged
- Artifact rules constrain only the specs being written and are never operation guidance
- Never copy runtime context, operation guidance, or artifact-rule text verbatim into output files
+193
View File
@@ -0,0 +1,193 @@
---
name: "OPSX: Explore"
description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
allowed-tools: Bash(openspec:*)
category: "Workflow"
tags: ["workflow", "explore", "experimental", "thinking"]
---
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing. For a new change, scaffold it first as described below.
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
- A vague idea: "real-time collaboration"
- A specific problem: "the auth system is getting unwieldy"
- A change name: "add-dark-mode" (to explore in context of that change)
- A comparison: "postgres vs sqlite for this"
- Nothing (just enter explore mode)
---
## The Stance
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
- **Adaptive** - Follow interesting threads, pivot when new information emerges
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
---
## What You Might Do
Depending on what the user brings, you might:
**Explore the problem space**
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
**Investigate the codebase**
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
**Compare options**
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
**Visualize**
```
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
├─────────────────────────────────────────┤
│ │
│ ┌────────┐ ┌────────┐ │
│ │ State │────────▶│ State │ │
│ │ A │ │ B │ │
│ └────────┘ └────────┘ │
│ │
│ System diagrams, state machines, │
│ data flows, architecture sketches, │
│ dependency graphs, comparison tables │
│ │
└─────────────────────────────────────────┘
```
**Surface risks and unknowns**
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
---
## OpenSpec Awareness
You have full context of the OpenSpec system. Use it naturally, don't force it.
### Check for context
At the start, quickly check what exists:
```bash
openspec list --json
```
This tells you:
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
Then read the project's own context from the resolved root - `<root.path>/openspec/config.yaml` (or `config.yml`). Use the `root.path` returned above, and skip this if neither file exists:
- `context`: project background - tech stack, conventions, constraints
- `rules`: keyed by artifact id - the entries for an artifact apply only when you write that artifact
Ground your thinking in these. They are constraints for you to follow, not content to reproduce: do NOT copy them into the conversation or into any artifact you create.
If the user mentioned a specific change name, read its artifacts for context.
### When no change exists
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create a proposal?"
- Or keep exploring - no pressure to formalize
If the user asks you to capture the exploration as a new change, transition seamlessly into the requested capture:
1. Run `openspec new change "<name>"` (with `--store <id>` when applicable) before creating any artifacts. Never create a new change directory under `openspec/changes/` by hand; the CLI scaffold creates required metadata such as `.openspec.yaml`. Keep the selected `--store <id>` on every applicable follow-up `status` and `instructions` command.
2. Run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store), then process the requested artifacts in dependency order. For each requested artifact that is `ready`, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store). Before creating a requested artifact, evaluate any condition in its own `instruction` against the explored change; record a deliberate skip instead when the condition does not apply. If a requested artifact is blocked by a direct prerequisite the user did not request, run `openspec instructions "<prerequisite-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) for that prerequisite whether it is `ready` or `blocked`. If its own `instruction` states a condition, evaluate that condition against the explored change and record a deliberate skip only when the condition does not apply. If the condition applies, or the prerequisite is not conditional, treat it as a normal prerequisite and ask before expanding the capture. Do not create an unrequested prerequisite unless the user approves.
3. Follow the returned `template` and `instruction` fields. Read completed dependency files listed in `dependencies`, and apply `context` and `rules` as constraints without copying them into the artifact. If the instruction delegates creation to a specific skill or command, invoke it; otherwise write the artifact to `resolvedOutputPath`, using the instruction to choose a concrete path when it is a glob. Verify that the selected concrete output exists.
4. After creating each artifact, re-run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) and continue until every requested artifact is `done`, `skipped`, or was deliberately skipped because its own `instruction` stated a condition that did not apply. Tell the user about a deliberate conditional skip, remember it, and do not reconsider it. Dependencies are enablers, not gates: if a requested artifact is still `blocked` only because you deliberately skipped a conditional prerequisite, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) despite the blocked status, then create it using step 3 only when those recorded conditional skips are its sole missing dependencies. If a requested artifact is blocked by a prerequisite the user did not ask to capture and cannot be conditionally skipped, explain that dependency and ask before expanding the capture.
Capture the artifact(s) the user requested without asking them to invoke another workflow command. If they asked only to start a change, stop after scaffolding and show its status.
### When a change exists
If the user mentions a change or you detect one is relevant:
1. **Resolve and read existing artifacts for context**
- Run `openspec status --change "<name>" --json`.
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
2. **Reference them naturally in conversation**
- "Your design mentions using Redis, but we just realized SQLite fits better..."
- "The proposal scopes this to premium users, but we're now thinking everyone..."
3. **Offer to capture when decisions are made**
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
| Insight Type | Where to Capture |
|----------------------------|-------------------------------------|
| New requirement discovered | `specs/<capability-path>/spec.md` |
| Requirement changed | `specs/<capability-path>/spec.md` |
| Design decision made | `design.md` |
| Scope changed | `proposal.md` |
| New work identified | `tasks.md` |
| Assumption invalidated | Relevant artifact |
Example offers:
- "That's a design decision. Capture it in design.md?"
- "This is a new requirement. Add it to specs?"
- "This changes scope. Update the proposal?"
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
---
## What You Don't Have To Do
- Follow a script
- Ask the same questions every time
- Produce a specific artifact
- Reach a conclusion
- Stay on topic if a tangent is valuable
- Be brief (this is thinking time)
---
## Ending Discovery
There's no required ending. Discovery might:
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
- **Result in artifact updates**: "Updated design.md with these decisions"
- **Just provide clarity**: User has what they need, moves on
- **Continue later**: "We can pick this up anytime"
When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
---
## Guardrails
- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
- **Don't fake understanding** - If something is unclear, dig deeper
- **Don't rush** - Discovery is thinking time, not task time
- **Don't force structure** - Let patterns emerge naturally
- **Don't auto-capture** - Offer to save insights, don't just do it
- **Don't manually scaffold changes** - Never create a new change directory under `openspec/changes/` by hand. Always use `openspec new change "<name>"` (with `--store <id>` when applicable) so required metadata such as `.openspec.yaml` is created before writing artifacts.
- **Do visualize** - A good diagram is worth many paragraphs
- **Do explore the codebase** - Ground discussions in reality
- **Do question assumptions** - Including the user's and your own
+145
View File
@@ -0,0 +1,145 @@
---
name: "OPSX: Propose"
description: "Propose a new change - create it and generate all artifacts in one step"
allowed-tools: Bash(openspec:*)
category: "Workflow"
tags: ["workflow", "artifacts", "experimental"]
---
Propose a new change - create the change and generate all artifacts in one step.
**Planning boundary**: This workflow creates planning artifacts only. The user request that selected or triggered this workflow authorizes planning only, even if it asks to build or fix something. Do not edit project code. After the planning artifacts are complete, stop. Do not start implementation in the same response, even if the initial request asks for it. Wait for a new user request after the artifacts are presented; then start the apply workflow.
I'll create a change with the artifacts your schema defines. With the default spec-driven schema that is:
- proposal.md (what & why)
- `specs/<capability-path>/spec.md` (what the system must do - a delta, not the main spec)
- design.md (how)
- tasks.md (implementation steps)
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
When the user is ready to implement, they must start the apply workflow explicitly.
---
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: The argument after `/opsx:propose` is the change name (kebab-case), OR a description of what the user wants to build.
**Steps**
1. **Understand the request and clarify material ambiguity**
If no input is provided, ask the user (open-ended, no preset options):
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
If the request contains ambiguity that would materially affect scope, externally observable behavior, compatibility, or acceptance criteria, ask the user before creating the change. For minor details, make a reasonable assumption and record it in the planning artifacts.
2. **Determine the workflow schema**
Use the configured default schema unless the user explicitly requests a different workflow.
**Use a different schema only if the user:**
- Explicitly requests a specific schema by name → use `--schema <schema-name>`
- Asks to "show workflows" or asks "what workflows" exist → resolve the authoritative root by running `openspec context --json` from the current working directory. If the user explicitly selected a registered store, use `openspec context --json --store "<store-id>"`. Then run `openspec schemas --json` with its working directory set to the returned `root.path` and let them choose. This preserves roots selected by a local `store:` pointer or the global `defaultStore`; `schemas` does not accept `--store`. If context reports only `no_openspec_root`, run `openspec schemas --json` from the current working directory instead. Do not use this fallback for invalid or unavailable stores.
Otherwise, omit `--schema` to preserve the configured default.
3. **Create the change directory**
Choose one schema form below. If a registered store is selected, append `--store "<store-id>"` to that command and each later OpenSpec command shown below that accepts `--store`.
Using the configured default:
```bash
openspec new change "<name>"
```
Using an explicitly requested schema:
```bash
openspec new change "<name>" --schema "<schema-name>"
```
This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
4. **Get the artifact build order**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts, each with its `status` and its `requires` edges (the artifact IDs it directly depends on)
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
5. **Create every artifact in the required set**
Use a todo list to track progress through the artifacts.
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. **For each artifact that is `ready` (dependencies satisfied)**:
- Get instructions:
```bash
openspec instructions <artifact-id> --change "<name>" --json
```
- The instructions JSON includes:
- `context`: Project background (constraints for you - do NOT include in output)
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
- `template`: The structure to use for your output file
- `instruction`: Schema-specific guidance for this artifact type
- `skipped`/`warning`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
- `dependencies`: Completed artifacts to read for context
- Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
- If the `instruction` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at `resolvedOutputPath`
- Otherwise create the artifact file using `template` as the structure and write it to `resolvedOutputPath`. If `resolvedOutputPath` is a glob, follow `instruction` to choose the concrete file path
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
- Show brief progress: "Created <artifact-id>"
b. **Continue until every artifact in the required set exists (not just `apply.requires`)**
- After creating each artifact, re-run `openspec status --change "<name>" --json`
- The required set is `applyRequires` plus every artifact reachable from those by following the `requires` edges in `status --json` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
- `status` is file-existence only, so an `applyRequires` artifact reading `done` does NOT mean its dependencies exist - writing `tasks.md` early marks `tasks` done while `specs` was never written. Use each artifact's `requires` edges, not its `status`, to build the required set: a `done` artifact still lists what it depends on
- An artifact already reading `status: "skipped"` is satisfied: the change declares `skip_specs` in `.openspec.yaml`, so its files must NOT exist. Never try to create one
- Create every artifact in the required set that is missing, then re-check - creating one can unblock others
- Skip one only when `status` already reports it `skipped`, or when its own `instruction` says it is conditional: run `openspec instructions <artifact-id> --change "<name>" --json` and skip only if its `instruction` field marks it optional (e.g. "create only if..."). Spec-driven's `design.md` qualifies; `specs` qualifies only via the `skipped` status above, never by your own judgment. Tell the user, and do not reconsider it
- Dependencies are enablers, not gates: if a required artifact is still `blocked` only because you skipped a conditional dependency, write it anyway
- Stop when every artifact in the required set is `done`, `skipped`, or was deliberately skipped
c. **If an artifact requires user input** (unclear context):
- Ask the user to clarify
- Then continue with creation
6. **Show final status**
```bash
openspec status --change "<name>"
```
**Output**
After completing all artifacts, summarize:
- Change name and location
- List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
- What's ready: "All artifacts needed for implementation are ready."
- Prompt: "The artifacts are ready for review. When you are ready, run `/opsx:apply`."
**Artifact Creation Guidelines**
- Follow the `instruction` field from `openspec instructions` for each artifact type - it is the authoritative guidance, even for familiar artifact names
- If the `instruction` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
- The schema defines what each artifact should contain - follow it
- Read dependency artifacts for context before creating new ones
- Use `template` as the structure for your output file - fill in its sections
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
- These guide what you write, but should never appear in the output
**Guardrails**
- The request that invoked this workflow authorizes planning only. Any implementation or apply instruction in that request does not carry forward. Do NOT implement the change, start the apply workflow, or edit project code during this workflow. After presenting the artifacts, stop and wait for a new user request to start the apply workflow
- Create every artifact the apply phase transitively depends on, not just the ids listed in `apply.requires`
- Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
- Ask about ambiguities that would materially change scope, externally observable behavior, compatibility, or acceptance criteria; for minor details, make reasonable assumptions and record them
- If a change with that name already exists, ask if user wants to continue it or create a new one
- Verify each artifact file exists after writing before proceeding to next
+258
View File
@@ -0,0 +1,258 @@
---
name: "OPSX: Sync"
description: "Sync delta specs from a change to main specs"
allowed-tools: Bash(openspec:*)
category: "Workflow"
tags: ["workflow", "specs", "experimental"]
---
Sync delta specs from a change to main specs.
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
**Input**: Optionally specify a change name after `/opsx:sync` (e.g., `/opsx:sync add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
When prompting, show changes that have delta specs (under `specs/` directory).
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:sync <other>`).
2. **Resolve change context**
Run:
```bash
openspec status --change "<name>" --json
```
The JSON includes `planningHome.root`. Main specs live under `<planningHome.root>/openspec/specs/` — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.
3. **Find delta specs**
Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the
only source of delta spec paths. If the `specs` entry is missing or
`existingOutputPaths` is empty, report that there are no delta specs to sync,
do not infer them from other artifacts, and stop without requesting artifact
instructions or writing a main spec.
Sync every path in `existingOutputPaths` unless the caller narrowed the set.
A caller narrows it by naming an explicit list of complete entries from
`existingOutputPaths` — copy those absolute values verbatim. Archive does
this inline, and a user can too (for example, by selecting the entry ending
in `/specs/billing/invoices/spec.md`).
Then sync only the named paths and leave the remaining delta specs untouched:
bulk archive excludes a delta whose implementation it could not find, and
syncing it anyway would write a main spec the caller deliberately withheld.
Carry that narrowed selection through step 4; never widen it back to the full
list. If a named path is not in `existingOutputPaths`, do not sync it —
report it and stop, rather than dropping it silently. If the named list is
empty, report that there is nothing to sync and stop without writing a main
spec.
Each delta spec file contains sections like:
- `## ADDED Requirements` - New requirements to add
- `## MODIFIED Requirements` - Changes to existing requirements
- `## REMOVED Requirements` - Requirements to remove
- `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
If no delta specs found, inform user and stop.
4. **For each delta spec, apply changes to main specs**
Before the first main-spec write, obtain one current specs-rule snapshot:
- If archive invoked this workflow inline and supplied a valid snapshot from
`openspec instructions specs --change "<name>" --json`, reuse it and do not
fetch the same instructions again.
- Otherwise run that command once now with the same selected-root flags.
- If the direct lookup exits non-zero or returns invalid artifact-instruction
JSON, report the error and stop before writing any main spec. Do not treat the
failure as an absent rule set.
- A valid response with omitted `rules` means no artifact rules are configured
and the existing semantic merge continues.
Apply returned `rules` only to the content and form of the main specs produced
by this merge. Artifact rules are not operation guidance and cannot change
selected roots, delta paths, CLI checks, or workflow steps. Use their text as
constraints without copying it verbatim into a main spec or summary.
For each capability delta spec path selected in step 3 — the full `existingOutputPaths` list, or the narrowed subset when a caller supplied one (these may belong to a selected store, not the repo):
a. **Read the delta spec** to understand the intended changes
b. **Read the main spec** at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (may not exist yet)
c. **Apply changes intelligently**:
**ADDED Requirements:**
- If requirement doesn't exist in main spec → add it
- If requirement already exists → update it to match (treat as implicit MODIFIED)
**MODIFIED Requirements:**
- Find the requirement in main spec
- Apply the changes - this can be:
- Adding new scenarios the main spec does not have yet
- Modifying existing scenarios
- Changing the requirement description
- Preserve scenarios/content not mentioned in the delta
**REMOVED Requirements:**
- Remove the entire requirement block from main spec
- Retiring the capability. Delete the whole `spec.md` - and the directory once
nothing else is left in it - only when ALL of these hold:
1. removing the requirements *this run* left no requirement blocks;
2. the rest of the spec is well-formed (it still has a `## Purpose`);
3. the main spec was not already empty before this sync - if you removed
nothing, change nothing;
4. every other nonblank line in the whole file is accounted for as the
title, Purpose, Requirements header, or a canonical requirement's
statement, scenarios, or fenced examples;
5. the change's `.openspec.yaml` declares `retire_capabilities: true`;
6. the `spec.md` resolves inside the real specs root (do not follow a
capability-directory symlink to delete an external file).
If removing the selected requirements would leave no requirement blocks and
any retirement condition is not satisfied, do not modify the main spec. Stop
the sync for that capability, report the blocking condition, and tell the user
how to resolve it. Never write or leave an empty `## Requirements` section.
When only the marker is missing, say that too - it is the one thing the user
can add to make the retirement go through.
- Deleting the file also deletes its `## Purpose`; any other section blocks
retirement. Name Purpose when you report the retirement. Include a pasteable
`git checkout` only when the spec lived in the caller's checkout;
otherwise give checkout-scoped recovery guidance.
**RENAMED Requirements:**
- Find the FROM requirement, rename to TO
**`## Purpose` in the delta:**
- The main spec already has one and it is authoritative - leave it alone
(this is what `openspec archive` does; it warns and moves on)
d. **Create new main spec** if capability doesn't exist yet:
- Create `<planningHome.root>/openspec/specs/<capability-path>/spec.md`
- Add Purpose section: copy the delta's `## Purpose` body verbatim when it has one
(this is what `openspec archive` does); only write a brief TBD placeholder when it does not
- Add Requirements section with the ADDED requirements
- Follow the **Main Spec Format Reference** below
5. **Validate updated main specs**
Run `openspec validate --specs` with the same selected-root flags used earlier.
If validation fails, report the problems and do not claim the sync succeeded.
6. **Show summary**
After applying all changes, summarize:
- Which capabilities were updated
- What changes were made (requirements added/modified/removed/renamed)
- Any new main spec left with a TBD Purpose placeholder, so it gets written
now rather than lingering
- Any capability retired, naming the deleted `spec.md`, its Purpose, and
either a pasteable `git checkout` or checkout-scoped recovery guidance
**Delta Spec Format Reference**
```markdown
## Purpose
Only on a delta that introduces a brand-new capability. Seeds the new main spec.
## ADDED Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
The system SHALL keep doing the existing thing, now also handling A.
#### Scenario: Scenario the main spec already has
- **WHEN** user does X
- **THEN** system does Y
#### Scenario: New scenario to add
- **WHEN** user does A
- **THEN** system does B
## REMOVED Requirements
### Requirement: Deprecated Feature
## RENAMED Requirements
- FROM: `### Requirement: Old Name`
- TO: `### Requirement: New Name`
```
**Main Spec Format Reference**
Main specs are what the delta merges INTO. They must never contain delta operation headers (`## ADDED/MODIFIED/REMOVED/RENAMED Requirements`) - after syncing, every requirement lives under a single `## Requirements` section:
```markdown
# <capability> Specification
## Purpose
Short description of what this capability does and why it exists.
## Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
```
**Key Principle: Intelligent Merging**
Unlike programmatic merging, you merge rather than overwrite:
- A MODIFIED block carries the whole requirement - body plus every scenario that survives the change. `openspec validate` and `openspec archive` both reject one that drops a scenario the main spec still has.
- Keep anything the delta does not mention, in the main spec's existing order
- Use your judgment to merge changes sensibly
**Output On Success**
```markdown
## Specs Synced: <change-name>
Updated main specs:
**<capability-1>**:
- Added requirement: "New Feature"
- Modified requirement: "Existing Feature" (added 1 scenario)
**<capability-2>**:
- Created new spec file
- Added requirement: "Another Feature"
Main specs are now updated. The change remains active - archive when implementation is complete.
```
**Guardrails**
- Read both delta and main specs before making changes
- Preserve existing content not mentioned in delta
- Never copy a delta file into a main spec as-is - merge its content so the main spec keeps the Main Spec Format Reference structure, with no delta operation headers
- If something is unclear, ask for clarification
- Show what you're changing as you go
- The operation should be idempotent - running twice should give same result
- Use only `artifactPaths.specs.existingOutputPaths`; never infer delta specs from unrelated artifacts
- Honor a caller-supplied subset of `existingOutputPaths`; never widen it back to the full list
- Fetch specs instructions once for direct sync, or reuse the archive-supplied snapshot inline
- Stop before every main-spec write on a non-zero or invalid JSON specs-instruction response
- Artifact rules constrain only the specs being written and are never copied into output files
+87
View File
@@ -0,0 +1,87 @@
---
name: "OPSX: Update"
description: "Update a change - revise existing planning artifacts and keep them coherent (Experimental)"
allowed-tools: Bash(openspec:*)
category: "Workflow"
tags: ["workflow", "artifacts", "experimental"]
---
Revise a change's existing planning artifacts and keep them coherent. Never edit code.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: Optionally specify a change name after `/opsx:update` (e.g., `/opsx:update add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
`/opsx:continue` is an expanded-profile workflow and may not be installed. Before suggesting it anywhere below, verify that it is available. If it is unavailable, `openspec status --change "<name>" --json` shows the next artifact and `openspec instructions "<artifact-id>" --change "<name>" --json` explains how to create it.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes sorted by most recently modified, and ask the user to select one
When prompting, present the top 3-4 most recently modified changes as options, showing:
- Change name
- Schema (from `schema` field if present, otherwise "spec-driven")
- Status (e.g., "0/5 tasks", "complete", "no tasks")
- How recently it was modified (from `lastModified` field)
Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to update.
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:update <other>`).
2. **Get the change's artifacts**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to understand current state. The response includes:
- `schemaName`: The workflow schema being used (e.g., "spec-driven")
- `artifacts`: Array of artifacts with their status ("done", "skipped", "ready", "blocked")
- `isPlanningComplete`: Boolean indicating if all planning artifacts are complete. Older CLI versions expose the same value as `isComplete`.
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
The artifact ids and paths come from the active schema - do NOT assume them, and do NOT branch on hardcoded artifact names. Custom schemas must work unchanged.
The files to edit are `artifactPaths.<id>.existingOutputPaths` - the concrete files that exist on disk, already glob-expanded for glob artifacts (e.g. `specs/**/*.md`). Do NOT write to `resolvedOutputPath`: for a glob artifact it is still the glob pattern, not a real file.
3. **Understand the request**
- If the user asked for a specific revision ("the design now uses X"), that is the starting edit.
- If they only said "update" / "make this coherent", treat it as a coherence review: read the existing artifacts and check them against each other for contradictions, gaps, and duplication.
4. **Read and reconcile**
- Read the artifact(s) the request touches and the change's other existing artifacts.
- Apply the requested edit. Then check every other existing artifact against it - in ANY direction: an edit to a later artifact may require revising an earlier one, not only the other way around. Build order is a useful reading order, not a constraint on which artifacts may be revised.
- Note everything that is now inconsistent, missing, or contradictory.
- Revise only files that already exist (`existingOutputPaths`). Do NOT create artifacts that don't exist yet, and do NOT invent new files under a glob artifact - note them and point the user to `/opsx:continue` to create them.
- If the change is already coherent, say so and make no edits.
5. **Confirm and apply, one artifact at a time**
- Show each proposed revision and why. Write only after the user confirms.
- If the user rejects a revision, do not write it - leave that artifact unchanged.
- When a substantial rewrite is needed, get that artifact's rules and template first:
```bash
openspec instructions "<artifact-id>" --change "<name>" --json
```
6. **Point to the next step (guidance only - NEVER act on it)**
- Artifacts still missing -> suggest `/opsx:continue` to create them.
- Change already implemented (tasks checked off / already applied) -> the code may no longer match the revised plan; suggest `/opsx:apply` to carry the delta into code.
- Everything done and implemented -> suggest `/opsx:archive`.
**Output**
After each invocation, show:
- Which artifacts were revised (and which proposed revisions were rejected)
- Anything deferred to `/opsx:continue` (not-yet-created artifacts or files)
- Where the change stands and the recommended next command
**Guardrails**
- Planning artifacts only - NEVER edit implementation code. If the revised plan implies code changes, stop and point to `/opsx:apply`.
- Use the artifact ids and paths reported by `openspec status`; never branch on hardcoded artifact names.
- Edit only the concrete files in `existingOutputPaths`; never write to a glob `resolvedOutputPath`.
- Do not advance the build frontier: no new artifacts, no new files under glob artifacts - that is `/opsx:continue`'s job.
- Confirm every edit with the user before writing.
- If the request changes the change's *intent* rather than refining it, first verify whether the expanded-profile `/opsx:new` workflow is available. If it is, recommend starting fresh with `/opsx:new` (the "Update vs. Start Fresh" heuristic). If it is unavailable, ask for a distinct unused change name and recommend `openspec new change "<new-change-name>"` instead.
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -uo pipefail
ROOT="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
PAYLOAD=$(cat)
FILE=$(printf '%s' "$PAYLOAD" | /usr/bin/python3 -c 'import json,sys
try:
d = json.load(sys.stdin)
except Exception:
sys.exit(0)
t = d.get("tool_input") or {}
r = d.get("tool_response") or {}
p = r.get("filePath") or t.get("file_path") or ""
print(p)
' 2>/dev/null)
case "$FILE" in
"") exit 0 ;;
*.py) ;;
*) exit 0 ;;
esac
case "$FILE" in
"$ROOT"/src/*) ;;
src/*) FILE="$ROOT/$FILE" ;;
*) exit 0 ;;
esac
[ -f "$FILE" ] || exit 0
[ -x "$ROOT/.venv/bin/ruff" ] || exit 0
OUT=$(
cd "$ROOT" || exit 0
"$ROOT/.venv/bin/ruff" check --fix --quiet "$FILE" 2>&1
"$ROOT/.venv/bin/ruff" format --quiet "$FILE" 2>&1
if [ -x "$ROOT/.venv/bin/ty" ]; then
"$ROOT/.venv/bin/ty" check --quiet "$FILE" 2>&1 | grep -v "^All checks passed" || true
fi
)
if [ -n "$OUT" ]; then
printf 'ruff/ty по %s:\n%s\n' "${FILE#"$ROOT"/}" "$OUT" >&2
exit 2
fi
exit 0
+17
View File
@@ -0,0 +1,17 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit|NotebookEdit",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/lint-python.sh",
"timeout": 60,
"statusMessage": "ruff + ty по src/"
}
]
}
]
}
}
@@ -0,0 +1,185 @@
---
name: openspec-apply-change
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.8.0"
---
Implement tasks from an OpenSpec change.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
2. **Check status to understand the schema**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
3. **Get apply instructions**
```bash
openspec instructions apply --change "<name>" --json
```
This returns:
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
- Optional `context`: current required project instruction input from the selected root
- Optional `operationGuidance`: current advisory guidance for apply
**Handle states:**
- If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` (if it is not installed, run `openspec status --change "<name>" --json` to see the next artifact and `openspec instructions <artifact-id> --change "<name>" --json` for how to create it)
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation
Treat `context` as a required prompt-level input. Read and consider it, and
apply relevant project facts, conventions, and constraints while implementing.
Treat `operationGuidance` as optional additive advice. Read and consider every
entry, and follow entries that are applicable and compatible with the built-in
workflow.
Keep both fields separate from CLI-returned state, missing artifacts, tasks,
progress, `contextFiles`, and the built-in `instruction`. They are not
evidence of task completion, do not replace the built-in instruction, and do
not permit bypassing a blocked state. If context conflicts with the built-in
instruction, an explicit user choice, or a CLI-controlled value, report the
conflict and preserve the controlling value. If guidance is inapplicable or
conflicts with those controlling inputs, do not follow it and explain why.
These are prompt-level behavior contracts, not enforceable checks.
4. **Read context files**
Read every file path listed under `contextFiles` from the apply instructions output.
The files depend on the schema being used:
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output
Do not copy `context` or `operationGuidance` verbatim into implementation
files or planning artifacts unless the user separately asks for that content.
5. **Show current progress**
Display:
- Schema being used
- Progress: "N/M tasks complete"
- Remaining tasks overview
- Dynamic instruction from CLI
6. **Implement tasks (loop until done or blocked)**
For each pending task:
- Show which task is being worked on
- Make the code changes required
- Keep changes minimal and focused
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
- Continue to next task
**Pause if:**
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- Error or blocker encountered → report and wait for guidance
- User interrupts
7. **On completion or pause, show status**
Display:
- Tasks completed this session
- Overall progress: "N/M tasks complete"
- If all done: suggest archive
- If paused: explain why and wait for guidance
**Output During Implementation**
```
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
```
**Output On Completion**
```
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! You can archive this change with `/opsx:archive`.
```
**Output On Pause (Issue Encountered)**
```
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
```
**Guardrails**
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- Use contextFiles from CLI output, don't assume specific file names
- Do not use context or operation guidance as proof that a task is complete
- Apply relevant project context; report conflicts with controlling workflow inputs
- Consider every guidance entry; explain any inapplicable or conflicting advice
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
**Fluid Workflow Integration**
This skill supports the "actions on a change" model:
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -0,0 +1,182 @@
---
name: openspec-archive-change
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.8.0"
---
Archive a completed change in the experimental workflow.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
When prompting, show only active changes (not already archived).
Include the schema used for each change if available.
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:archive <other>`).
**Load current archive inputs before the existing archive checks:**
After resolving the selected change and planning root, run:
```bash
openspec instructions archive --change "<name>" --json
```
Keep the same selected-root flags on this command. This lookup is advisory and
optional: it only supplies extra prompt inputs, so it must never block archiving.
If it exits non-zero or returns invalid JSON — for example on an older CLI that
does not support this command yet — continue the archive workflow with no
context and no operation guidance. Do not report an error and do not stop.
A successful response may omit both optional fields. Treat `context` as a
required prompt-level input: read and consider it, and apply relevant project
facts, conventions, and constraints. Treat `operationGuidance` as optional
additive advice: read and consider every entry, and follow entries that are
applicable and compatible with the built-in archive workflow.
Keep both fields separate from built-in steps, explicit user choices, resolved
paths, CLI checks, and command contracts. If context conflicts with one of those
controlling inputs, report the conflict and preserve the controlling value. If
guidance is inapplicable or conflicts with a controlling input, do not follow it
and explain why. Do not infer replacement paths, skipped prompts, or flags from
either field, and do not copy their text verbatim into specs, change artifacts,
or archive summaries unless the user separately asks for it. These are
prompt-level behavior contracts, not enforceable checks.
2. **Check artifact completion status**
Run `openspec status --change "<name>" --json` to check artifact completion.
Parse the JSON to understand:
- `schemaName`: The workflow being used
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
- `artifacts`: List of artifacts with their status (`done`, `skipped`, or other)
**If any artifacts are neither `done` nor `skipped`** (skipped artifacts satisfy the requirement - the change declares skip_specs):
- Display warning listing incomplete artifacts
- Ask the user to confirm they want to proceed
- Proceed if user confirms
3. **Check task completion status**
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
**If incomplete tasks found:**
- Display warning showing count of incomplete tasks
- Ask the user to confirm they want to proceed
- Proceed if user confirms
**If no tasks file exists:** Proceed without task-related warning.
4. **Assess delta spec sync state**
Use `artifactPaths.specs.existingOutputPaths` from status JSON as the only
delta-spec source. If the `specs` entry is missing or
`existingOutputPaths` is empty, proceed without a sync prompt and do not infer
delta specs from other artifacts.
**If delta specs exist:**
- Compare each delta spec with its corresponding main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (use the store-aware `planningHome.root` from step 2, not a hardcoded repo path)
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting
**Prompt options:**
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
Route on the answer:
- "Cancel" — stop, do not archive
- "Archive without syncing" or "Archive now" — proceed to archive
- "Sync now" or "Sync anyway" — sync, then verify (below)
- Anything else — ask again rather than archiving
Before a selected sync writes any main spec, run
`openspec instructions specs --change "<name>" --json` once with the same
selected-root flags. Require a zero exit status and valid artifact-instruction
JSON. If the lookup fails or returns invalid JSON, report the error and stop
before writing any main spec or moving the change. A valid response with omitted
`rules` is the no-rules case. Apply returned `rules` only to the content and
form of main specs produced by this merge; do not use them as archive guidance,
change CLI behavior, or copy the rule text into any output file.
Then run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching `specs` instructions again. Do not delegate it to a background task — step 5 would move `changeRoot` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
Then re-run the comparison from the top of this step against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
- ADDED requirements present
- MODIFIED requirements carrying the scenario and description changes named in the delta, with their other scenarios intact
- REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving `## Requirements` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
- RENAMED requirements present under the new name and absent under the old one
If the sync failed, or any capability does not match, report what differs and stop — do not archive. Nothing has moved and `changeRoot` is intact, so the user can fix the mismatch or re-run the sync and start the archive again.
5. **Perform the archive**
Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
```bash
mkdir -p "<planningHome.changesDir>/archive"
```
Generate the target name: use the change name as-is when it already starts with a `YYYY-MM-DD-` prefix; otherwise prepend the current date as `YYYY-MM-DD-<change-name>`. Never stack a second date (same rule as `openspec archive`).
**Check if target already exists:**
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move `changeRoot` to the archive directory
```bash
mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
```
6. **Display summary**
Show archive completion summary including:
- Change name
- Schema that was used
- Archive location
- Whether specs were synced (if applicable)
- Note about any warnings (incomplete artifacts/tasks)
**Output On Success**
```markdown
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
**Specs:** <"✓ Synced to main specs" only if the step 4 verification passed; otherwise "No delta specs" or "Sync skipped">
<"All artifacts complete. All tasks complete." — or, if archived with warnings, list them instead (e.g. "Archived with 2 incomplete tasks")>
```
**Guardrails**
- Announce the selected change; prompt for selection when it is ambiguous
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven)
- Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving `changeRoot`
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
- Apply relevant runtime context and report conflicts; operation guidance remains advisory
- Consider every guidance entry and explain any inapplicable or conflicting advice
- Existing CLI checks, resolved paths, prompts, and command contracts are unchanged
- Artifact rules constrain only the specs being written and are never operation guidance
- Never copy runtime context, operation guidance, or artifact-rule text verbatim into output files
+308
View File
@@ -0,0 +1,308 @@
---
name: openspec-explore
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.8.0"
---
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing. For a new change, scaffold it first as described below.
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
---
## The Stance
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
- **Adaptive** - Follow interesting threads, pivot when new information emerges
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
---
## What You Might Do
Depending on what the user brings, you might:
**Explore the problem space**
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
**Investigate the codebase**
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
**Compare options**
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
**Visualize**
```
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
├─────────────────────────────────────────┤
│ │
│ ┌────────┐ ┌────────┐ │
│ │ State │────────▶│ State │ │
│ │ A │ │ B │ │
│ └────────┘ └────────┘ │
│ │
│ System diagrams, state machines, │
│ data flows, architecture sketches, │
│ dependency graphs, comparison tables │
│ │
└─────────────────────────────────────────┘
```
**Surface risks and unknowns**
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
---
## OpenSpec Awareness
You have full context of the OpenSpec system. Use it naturally, don't force it.
### Check for context
At the start, quickly check what exists:
```bash
openspec list --json
```
This tells you:
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
Then read the project's own context from the resolved root - `<root.path>/openspec/config.yaml` (or `config.yml`). Use the `root.path` returned above, and skip this if neither file exists:
- `context`: project background - tech stack, conventions, constraints
- `rules`: keyed by artifact id - the entries for an artifact apply only when you write that artifact
Ground your thinking in these. They are constraints for you to follow, not content to reproduce: do NOT copy them into the conversation or into any artifact you create.
### When no change exists
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create a proposal?"
- Or keep exploring - no pressure to formalize
If the user asks you to capture the exploration as a new change, transition seamlessly into the requested capture:
1. Run `openspec new change "<name>"` (with `--store <id>` when applicable) before creating any artifacts. Never create a new change directory under `openspec/changes/` by hand; the CLI scaffold creates required metadata such as `.openspec.yaml`. Keep the selected `--store <id>` on every applicable follow-up `status` and `instructions` command.
2. Run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store), then process the requested artifacts in dependency order. For each requested artifact that is `ready`, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store). Before creating a requested artifact, evaluate any condition in its own `instruction` against the explored change; record a deliberate skip instead when the condition does not apply. If a requested artifact is blocked by a direct prerequisite the user did not request, run `openspec instructions "<prerequisite-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) for that prerequisite whether it is `ready` or `blocked`. If its own `instruction` states a condition, evaluate that condition against the explored change and record a deliberate skip only when the condition does not apply. If the condition applies, or the prerequisite is not conditional, treat it as a normal prerequisite and ask before expanding the capture. Do not create an unrequested prerequisite unless the user approves.
3. Follow the returned `template` and `instruction` fields. Read completed dependency files listed in `dependencies`, and apply `context` and `rules` as constraints without copying them into the artifact. If the instruction delegates creation to a specific skill or command, invoke it; otherwise write the artifact to `resolvedOutputPath`, using the instruction to choose a concrete path when it is a glob. Verify that the selected concrete output exists.
4. After creating each artifact, re-run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) and continue until every requested artifact is `done`, `skipped`, or was deliberately skipped because its own `instruction` stated a condition that did not apply. Tell the user about a deliberate conditional skip, remember it, and do not reconsider it. Dependencies are enablers, not gates: if a requested artifact is still `blocked` only because you deliberately skipped a conditional prerequisite, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) despite the blocked status, then create it using step 3 only when those recorded conditional skips are its sole missing dependencies. If a requested artifact is blocked by a prerequisite the user did not ask to capture and cannot be conditionally skipped, explain that dependency and ask before expanding the capture.
Capture the artifact(s) the user requested without asking them to invoke another workflow command. If they asked only to start a change, stop after scaffolding and show its status.
### When a change exists
If the user mentions a change or you detect one is relevant:
1. **Resolve and read existing artifacts for context**
- Run `openspec status --change "<name>" --json`.
- Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
- Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
2. **Reference them naturally in conversation**
- "Your design mentions using Redis, but we just realized SQLite fits better..."
- "The proposal scopes this to premium users, but we're now thinking everyone..."
3. **Offer to capture when decisions are made**
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
| Insight Type | Where to Capture |
|----------------------------|-------------------------------------|
| New requirement discovered | `specs/<capability-path>/spec.md` |
| Requirement changed | `specs/<capability-path>/spec.md` |
| Design decision made | `design.md` |
| Scope changed | `proposal.md` |
| New work identified | `tasks.md` |
| Assumption invalidated | Relevant artifact |
Example offers:
- "That's a design decision. Capture it in design.md?"
- "This is a new requirement. Add it to specs?"
- "This changes scope. Update the proposal?"
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
---
## What You Don't Have To Do
- Follow a script
- Ask the same questions every time
- Produce a specific artifact
- Reach a conclusion
- Stay on topic if a tangent is valuable
- Be brief (this is thinking time)
---
## Handling Different Entry Points
**User brings a vague idea:**
```
User: I'm thinking about adding real-time collaboration
You: Real-time collab is a big space. Let me think about this...
COLLABORATION SPECTRUM
════════════════════════════════════════════
Awareness Coordination Sync
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│Presence│ │Cursors │ │ CRDT │
│ "3 │ │ Multi │ │Conflict│
│online" │ │ select │ │ free │
└────────┘ └────────┘ └────────┘
│ │ │
trivial moderate complex
Where's your head at?
```
**User brings a specific problem:**
```
User: The auth system is a mess
You: [reads codebase]
┌─────────────────────────────────────────────┐
│ CURRENT AUTH FLOW │
└─────────────────────────────────────────────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Google │ │ GitHub │ │ Email │
│ OAuth │ │ OAuth │ │ Magic │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└─────────────┼─────────────┘
▼
┌───────────┐
│ Session │
└─────┬─────┘
│
▼
┌───────────┐
│ Perms │
└───────────┘
I see three tangles. Which one's burning?
```
**User is stuck mid-implementation:**
```
User: /opsx:explore add-auth-system
The OAuth integration is more complex than expected
You: [reads change artifacts]
You're on task 4: "Implement OAuth flow"
Let me trace what's involved...
[draws diagram, explores options, suggests paths]
Want to update the design to reflect this?
Or add a spike task to investigate?
```
**User wants to compare options:**
```
User: Should we use Postgres or SQLite?
You: Generic answer is boring. What's the context?
User: A CLI tool that tracks local dev environments
You: That changes everything.
┌─────────────────────────────────────────────────┐
│ CLI TOOL DATA STORAGE │
└─────────────────────────────────────────────────┘
Key constraints:
• No daemon running
• Must work offline
• Single user
SQLite Postgres
Deployment embedded ✓ needs server ✗
Offline yes ✓ no ✗
Single file yes ✓ no ✗
SQLite. Not even close.
Unless... is there a sync component?
```
---
## Ending Discovery
There's no required ending. Discovery might:
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
- **Result in artifact updates**: "Updated design.md with these decisions"
- **Just provide clarity**: User has what they need, moves on
- **Continue later**: "We can pick this up anytime"
When it feels like things are crystallizing, you might summarize:
```
## What We Figured Out
**The problem**: [crystallized understanding]
**The approach**: [if one emerged]
**Open questions**: [if any remain]
**Next steps** (if ready):
- Create a change proposal
- Keep exploring: just keep talking
```
But this summary is optional. Sometimes the thinking IS the value.
---
## Guardrails
- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
- **Don't fake understanding** - If something is unclear, dig deeper
- **Don't rush** - Discovery is thinking time, not task time
- **Don't force structure** - Let patterns emerge naturally
- **Don't auto-capture** - Offer to save insights, don't just do it
- **Don't manually scaffold changes** - Never create a new change directory under `openspec/changes/` by hand. Always use `openspec new change "<name>"` (with `--store <id>` when applicable) so required metadata such as `.openspec.yaml` is created before writing artifacts.
- **Do visualize** - A good diagram is worth many paragraphs
- **Do explore the codebase** - Ground discussions in reality
- **Do question assumptions** - Including the user's and your own
+149
View File
@@ -0,0 +1,149 @@
---
name: openspec-propose
description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.8.0"
---
Propose a new change - create the change and generate all artifacts in one step.
**Planning boundary**: This workflow creates planning artifacts only. The user request that selected or triggered this workflow authorizes planning only, even if it asks to build or fix something. Do not edit project code. After the planning artifacts are complete, stop. Do not start implementation in the same response, even if the initial request asks for it. Wait for a new user request after the artifacts are presented; then start the apply workflow.
I'll create a change with the artifacts your schema defines. With the default spec-driven schema that is:
- proposal.md (what & why)
- `specs/<capability-path>/spec.md` (what the system must do - a delta, not the main spec)
- design.md (how)
- tasks.md (implementation steps)
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
When the user is ready to implement, they must start the apply workflow explicitly.
---
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
**Steps**
1. **Understand the request and clarify material ambiguity**
If no clear input is provided, ask the user (open-ended, no preset options):
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
If the request contains ambiguity that would materially affect scope, externally observable behavior, compatibility, or acceptance criteria, ask the user before creating the change. For minor details, make a reasonable assumption and record it in the planning artifacts.
2. **Determine the workflow schema**
Use the configured default schema unless the user explicitly requests a different workflow.
**Use a different schema only if the user:**
- Explicitly requests a specific schema by name → use `--schema <schema-name>`
- Asks to "show workflows" or asks "what workflows" exist → resolve the authoritative root by running `openspec context --json` from the current working directory. If the user explicitly selected a registered store, use `openspec context --json --store "<store-id>"`. Then run `openspec schemas --json` with its working directory set to the returned `root.path` and let them choose. This preserves roots selected by a local `store:` pointer or the global `defaultStore`; `schemas` does not accept `--store`. If context reports only `no_openspec_root`, run `openspec schemas --json` from the current working directory instead. Do not use this fallback for invalid or unavailable stores.
Otherwise, omit `--schema` to preserve the configured default.
3. **Create the change directory**
Choose one schema form below. If a registered store is selected, append `--store "<store-id>"` to that command and each later OpenSpec command shown below that accepts `--store`.
Using the configured default:
```bash
openspec new change "<name>"
```
Using an explicitly requested schema:
```bash
openspec new change "<name>" --schema "<schema-name>"
```
This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
4. **Get the artifact build order**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts, each with its `status` and its `requires` edges (the artifact IDs it directly depends on)
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
5. **Create every artifact in the required set**
Use a todo list to track progress through the artifacts.
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. **For each artifact that is `ready` (dependencies satisfied)**:
- Get instructions:
```bash
openspec instructions <artifact-id> --change "<name>" --json
```
- The instructions JSON includes:
- `context`: Project background (constraints for you - do NOT include in output)
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
- `template`: The structure to use for your output file
- `instruction`: Schema-specific guidance for this artifact type
- `skipped`/`warning`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
- `dependencies`: Completed artifacts to read for context
- Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
- If the `instruction` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at `resolvedOutputPath`
- Otherwise create the artifact file using `template` as the structure and write it to `resolvedOutputPath`. If `resolvedOutputPath` is a glob, follow `instruction` to choose the concrete file path
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
- Show brief progress: "Created <artifact-id>"
b. **Continue until every artifact in the required set exists (not just `apply.requires`)**
- After creating each artifact, re-run `openspec status --change "<name>" --json`
- The required set is `applyRequires` plus every artifact reachable from those by following the `requires` edges in `status --json` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
- `status` is file-existence only, so an `applyRequires` artifact reading `done` does NOT mean its dependencies exist - writing `tasks.md` early marks `tasks` done while `specs` was never written. Use each artifact's `requires` edges, not its `status`, to build the required set: a `done` artifact still lists what it depends on
- An artifact already reading `status: "skipped"` is satisfied: the change declares `skip_specs` in `.openspec.yaml`, so its files must NOT exist. Never try to create one
- Create every artifact in the required set that is missing, then re-check - creating one can unblock others
- Skip one only when `status` already reports it `skipped`, or when its own `instruction` says it is conditional: run `openspec instructions <artifact-id> --change "<name>" --json` and skip only if its `instruction` field marks it optional (e.g. "create only if..."). Spec-driven's `design.md` qualifies; `specs` qualifies only via the `skipped` status above, never by your own judgment. Tell the user, and do not reconsider it
- Dependencies are enablers, not gates: if a required artifact is still `blocked` only because you skipped a conditional dependency, write it anyway
- Stop when every artifact in the required set is `done`, `skipped`, or was deliberately skipped
c. **If an artifact requires user input** (unclear context):
- Ask the user to clarify
- Then continue with creation
6. **Show final status**
```bash
openspec status --change "<name>"
```
**Output**
After completing all artifacts, summarize:
- Change name and location
- List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
- What's ready: "All artifacts needed for implementation are ready."
- Prompt: "The artifacts are ready for review. When you are ready, run `/opsx:apply` or ask me to apply this change."
**Artifact Creation Guidelines**
- Follow the `instruction` field from `openspec instructions` for each artifact type - it is the authoritative guidance, even for familiar artifact names
- If the `instruction` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
- The schema defines what each artifact should contain - follow it
- Read dependency artifacts for context before creating new ones
- Use `template` as the structure for your output file - fill in its sections
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
- These guide what you write, but should never appear in the output
**Guardrails**
- The request that invoked this workflow authorizes planning only. Any implementation or apply instruction in that request does not carry forward. Do NOT implement the change, start the apply workflow, or edit project code during this workflow. After presenting the artifacts, stop and wait for a new user request to start the apply workflow
- Create every artifact the apply phase transitively depends on, not just the ids listed in `apply.requires`
- Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
- Ask about ambiguities that would materially change scope, externally observable behavior, compatibility, or acceptance criteria; for minor details, make reasonable assumptions and record them
- If a change with that name already exists, ask if user wants to continue it or create a new one
- Verify each artifact file exists after writing before proceeding to next
+262
View File
@@ -0,0 +1,262 @@
---
name: openspec-sync-specs
description: Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.8.0"
---
Sync delta specs from a change to main specs.
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
When prompting, show changes that have delta specs (under `specs/` directory).
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:sync <other>`).
2. **Resolve change context**
Run:
```bash
openspec status --change "<name>" --json
```
The JSON includes `planningHome.root`. Main specs live under `<planningHome.root>/openspec/specs/` — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.
3. **Find delta specs**
Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the
only source of delta spec paths. If the `specs` entry is missing or
`existingOutputPaths` is empty, report that there are no delta specs to sync,
do not infer them from other artifacts, and stop without requesting artifact
instructions or writing a main spec.
Sync every path in `existingOutputPaths` unless the caller narrowed the set.
A caller narrows it by naming an explicit list of complete entries from
`existingOutputPaths` — copy those absolute values verbatim. Archive does
this inline, and a user can too (for example, by selecting the entry ending
in `/specs/billing/invoices/spec.md`).
Then sync only the named paths and leave the remaining delta specs untouched:
bulk archive excludes a delta whose implementation it could not find, and
syncing it anyway would write a main spec the caller deliberately withheld.
Carry that narrowed selection through step 4; never widen it back to the full
list. If a named path is not in `existingOutputPaths`, do not sync it —
report it and stop, rather than dropping it silently. If the named list is
empty, report that there is nothing to sync and stop without writing a main
spec.
Each delta spec file contains sections like:
- `## ADDED Requirements` - New requirements to add
- `## MODIFIED Requirements` - Changes to existing requirements
- `## REMOVED Requirements` - Requirements to remove
- `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
If no delta specs found, inform user and stop.
4. **For each delta spec, apply changes to main specs**
Before the first main-spec write, obtain one current specs-rule snapshot:
- If archive invoked this workflow inline and supplied a valid snapshot from
`openspec instructions specs --change "<name>" --json`, reuse it and do not
fetch the same instructions again.
- Otherwise run that command once now with the same selected-root flags.
- If the direct lookup exits non-zero or returns invalid artifact-instruction
JSON, report the error and stop before writing any main spec. Do not treat the
failure as an absent rule set.
- A valid response with omitted `rules` means no artifact rules are configured
and the existing semantic merge continues.
Apply returned `rules` only to the content and form of the main specs produced
by this merge. Artifact rules are not operation guidance and cannot change
selected roots, delta paths, CLI checks, or workflow steps. Use their text as
constraints without copying it verbatim into a main spec or summary.
For each capability delta spec path selected in step 3 — the full `existingOutputPaths` list, or the narrowed subset when a caller supplied one (these may belong to a selected store, not the repo):
a. **Read the delta spec** to understand the intended changes
b. **Read the main spec** at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (may not exist yet)
c. **Apply changes intelligently**:
**ADDED Requirements:**
- If requirement doesn't exist in main spec → add it
- If requirement already exists → update it to match (treat as implicit MODIFIED)
**MODIFIED Requirements:**
- Find the requirement in main spec
- Apply the changes - this can be:
- Adding new scenarios the main spec does not have yet
- Modifying existing scenarios
- Changing the requirement description
- Preserve scenarios/content not mentioned in the delta
**REMOVED Requirements:**
- Remove the entire requirement block from main spec
- Retiring the capability. Delete the whole `spec.md` - and the directory once
nothing else is left in it - only when ALL of these hold:
1. removing the requirements *this run* left no requirement blocks;
2. the rest of the spec is well-formed (it still has a `## Purpose`);
3. the main spec was not already empty before this sync - if you removed
nothing, change nothing;
4. every other nonblank line in the whole file is accounted for as the
title, Purpose, Requirements header, or a canonical requirement's
statement, scenarios, or fenced examples;
5. the change's `.openspec.yaml` declares `retire_capabilities: true`;
6. the `spec.md` resolves inside the real specs root (do not follow a
capability-directory symlink to delete an external file).
If removing the selected requirements would leave no requirement blocks and
any retirement condition is not satisfied, do not modify the main spec. Stop
the sync for that capability, report the blocking condition, and tell the user
how to resolve it. Never write or leave an empty `## Requirements` section.
When only the marker is missing, say that too - it is the one thing the user
can add to make the retirement go through.
- Deleting the file also deletes its `## Purpose`; any other section blocks
retirement. Name Purpose when you report the retirement. Include a pasteable
`git checkout` only when the spec lived in the caller's checkout;
otherwise give checkout-scoped recovery guidance.
**RENAMED Requirements:**
- Find the FROM requirement, rename to TO
**`## Purpose` in the delta:**
- The main spec already has one and it is authoritative - leave it alone
(this is what `openspec archive` does; it warns and moves on)
d. **Create new main spec** if capability doesn't exist yet:
- Create `<planningHome.root>/openspec/specs/<capability-path>/spec.md`
- Add Purpose section: copy the delta's `## Purpose` body verbatim when it has one
(this is what `openspec archive` does); only write a brief TBD placeholder when it does not
- Add Requirements section with the ADDED requirements
- Follow the **Main Spec Format Reference** below
5. **Validate updated main specs**
Run `openspec validate --specs` with the same selected-root flags used earlier.
If validation fails, report the problems and do not claim the sync succeeded.
6. **Show summary**
After applying all changes, summarize:
- Which capabilities were updated
- What changes were made (requirements added/modified/removed/renamed)
- Any new main spec left with a TBD Purpose placeholder, so it gets written
now rather than lingering
- Any capability retired, naming the deleted `spec.md`, its Purpose, and
either a pasteable `git checkout` or checkout-scoped recovery guidance
**Delta Spec Format Reference**
```markdown
## Purpose
Only on a delta that introduces a brand-new capability. Seeds the new main spec.
## ADDED Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
The system SHALL keep doing the existing thing, now also handling A.
#### Scenario: Scenario the main spec already has
- **WHEN** user does X
- **THEN** system does Y
#### Scenario: New scenario to add
- **WHEN** user does A
- **THEN** system does B
## REMOVED Requirements
### Requirement: Deprecated Feature
## RENAMED Requirements
- FROM: `### Requirement: Old Name`
- TO: `### Requirement: New Name`
```
**Main Spec Format Reference**
Main specs are what the delta merges INTO. They must never contain delta operation headers (`## ADDED/MODIFIED/REMOVED/RENAMED Requirements`) - after syncing, every requirement lives under a single `## Requirements` section:
```markdown
# <capability> Specification
## Purpose
Short description of what this capability does and why it exists.
## Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
```
**Key Principle: Intelligent Merging**
Unlike programmatic merging, you merge rather than overwrite:
- A MODIFIED block carries the whole requirement - body plus every scenario that survives the change. `openspec validate` and `openspec archive` both reject one that drops a scenario the main spec still has.
- Keep anything the delta does not mention, in the main spec's existing order
- Use your judgment to merge changes sensibly
**Output On Success**
```markdown
## Specs Synced: <change-name>
Updated main specs:
**<capability-1>**:
- Added requirement: "New Feature"
- Modified requirement: "Existing Feature" (added 1 scenario)
**<capability-2>**:
- Created new spec file
- Added requirement: "Another Feature"
Main specs are now updated. The change remains active - archive when implementation is complete.
```
**Guardrails**
- Read both delta and main specs before making changes
- Preserve existing content not mentioned in delta
- Never copy a delta file into a main spec as-is - merge its content so the main spec keeps the Main Spec Format Reference structure, with no delta operation headers
- If something is unclear, ask for clarification
- Show what you're changing as you go
- The operation should be idempotent - running twice should give same result
- Use only `artifactPaths.specs.existingOutputPaths`; never infer delta specs from unrelated artifacts
- Honor a caller-supplied subset of `existingOutputPaths`; never widen it back to the full list
- Fetch specs instructions once for direct sync, or reuse the archive-supplied snapshot inline
- Stop before every main-spec write on a non-zero or invalid JSON specs-instruction response
- Artifact rules constrain only the specs being written and are never copied into output files
@@ -0,0 +1,91 @@
---
name: openspec-update-change
description: Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.
allowed-tools: Bash(openspec:*)
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.8.0"
---
Revise a change's existing planning artifacts and keep them coherent. Never edit code.
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
`/opsx:continue` is an expanded-profile workflow and may not be installed. Before suggesting it anywhere below, verify that it is available. If it is unavailable, `openspec status --change "<name>" --json` shows the next artifact and `openspec instructions "<artifact-id>" --change "<name>" --json` explains how to create it.
**Steps**
1. **Select the change**
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes sorted by most recently modified, and ask the user to select one
When prompting, present the top 3-4 most recently modified changes as options, showing:
- Change name
- Schema (from `schema` field if present, otherwise "spec-driven")
- Status (e.g., "0/5 tasks", "complete", "no tasks")
- How recently it was modified (from `lastModified` field)
Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to update.
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:update <other>`).
2. **Get the change's artifacts**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to understand current state. The response includes:
- `schemaName`: The workflow schema being used (e.g., "spec-driven")
- `artifacts`: Array of artifacts with their status ("done", "skipped", "ready", "blocked")
- `isPlanningComplete`: Boolean indicating if all planning artifacts are complete. Older CLI versions expose the same value as `isComplete`.
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
The artifact ids and paths come from the active schema - do NOT assume them, and do NOT branch on hardcoded artifact names. Custom schemas must work unchanged.
The files to edit are `artifactPaths.<id>.existingOutputPaths` - the concrete files that exist on disk, already glob-expanded for glob artifacts (e.g. `specs/**/*.md`). Do NOT write to `resolvedOutputPath`: for a glob artifact it is still the glob pattern, not a real file.
3. **Understand the request**
- If the user asked for a specific revision ("the design now uses X"), that is the starting edit.
- If they only said "update" / "make this coherent", treat it as a coherence review: read the existing artifacts and check them against each other for contradictions, gaps, and duplication.
4. **Read and reconcile**
- Read the artifact(s) the request touches and the change's other existing artifacts.
- Apply the requested edit. Then check every other existing artifact against it - in ANY direction: an edit to a later artifact may require revising an earlier one, not only the other way around. Build order is a useful reading order, not a constraint on which artifacts may be revised.
- Note everything that is now inconsistent, missing, or contradictory.
- Revise only files that already exist (`existingOutputPaths`). Do NOT create artifacts that don't exist yet, and do NOT invent new files under a glob artifact - note them and point the user to `/opsx:continue` to create them.
- If the change is already coherent, say so and make no edits.
5. **Confirm and apply, one artifact at a time**
- Show each proposed revision and why. Write only after the user confirms.
- If the user rejects a revision, do not write it - leave that artifact unchanged.
- When a substantial rewrite is needed, get that artifact's rules and template first:
```bash
openspec instructions "<artifact-id>" --change "<name>" --json
```
6. **Point to the next step (guidance only - NEVER act on it)**
- Artifacts still missing -> suggest `/opsx:continue` to create them.
- Change already implemented (tasks checked off / already applied) -> the code may no longer match the revised plan; suggest `/opsx:apply` to carry the delta into code.
- Everything done and implemented -> suggest `/opsx:archive`.
**Output**
After each invocation, show:
- Which artifacts were revised (and which proposed revisions were rejected)
- Anything deferred to `/opsx:continue` (not-yet-created artifacts or files)
- Where the change stands and the recommended next command
**Guardrails**
- Planning artifacts only - NEVER edit implementation code. If the revised plan implies code changes, stop and point to `/opsx:apply`.
- Use the artifact ids and paths reported by `openspec status`; never branch on hardcoded artifact names.
- Edit only the concrete files in `existingOutputPaths`; never write to a glob `resolvedOutputPath`.
- Do not advance the build frontier: no new artifacts, no new files under glob artifacts - that is `/opsx:continue`'s job.
- Confirm every edit with the user before writing.
- If the request changes the change's *intent* rather than refining it, first verify whether the expanded-profile `/opsx:new` workflow is available. If it is, recommend starting fresh with `/opsx:new` (the "Update vs. Start Fresh" heuristic). If it is unavailable, ask for a distinct unused change name and recommend `openspec new change "<new-change-name>"` instead.
+24
View File
@@ -14,7 +14,31 @@ backups
*.pfx
*.jks
.venv
venv
__pycache__
*.pyc
*.pyo
.pytest_cache
.ruff_cache
.mypy_cache
.ty_cache
node_modules
evidence
openspec
student-tests
tests
scripts
examples
contracts
infra
*.md
!README.md
Makefile
Dockerfile*
compose*.yaml
.dockerignore
.gitignore
.DS_Store
lab.json
requirements-dev.txt
.claude
+24
View File
@@ -11,3 +11,27 @@ SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
API_REPLICAS=2
IDEMPOTENCY_TTL_SECONDS=86400
# Solution-specific: published LB ports, replica limits, workers and pool per replica,
# LB queue per replica, drain window before closing the listener on SIGTERM, PostgreSQL
# limits, load generator limits (profile bench), CPU pinning for track 1 measurements (empty = not
# pinned), cursor key file. API_PORT/SHORTTTL_PORT of lab2 are gone:
# only the load balancer is published.
LB_HTTP_PORT=8080
LB_STATS_PORT=8404
API_CPUS=1
API_MEMORY=512m
WEB_CONCURRENCY=2
DB_POOL_MAX_SIZE=8
API_SERVER_MAXCONN=64
DRAIN_SECONDS=2
PG_MAX_CONNECTIONS=200
PG_CPUS=2
PG_MEMORY=1g
K6_CPUS=2
K6_MEMORY=512m
API_CPUSET=
LB_CPUSET=
PG_CPUSET=
VALKEY_CPUSET=
K6_CPUSET=
CURSOR_SECRET_FILE=/run/secrets/cursor_secret
+82
View File
@@ -0,0 +1,82 @@
name: Application
on: [push, pull_request]
permissions:
contents: read
jobs:
quality:
name: Линт, типы и собственные тесты
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- run: uv sync --locked --group dev
- run: make lint VENV=.venv
- run: make student-test VENV=.venv
acceptance:
name: Стенд Compose за HAProxy, smoke, отказ реплики, рестарт и отказы зависимостей
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- run: uv sync --locked --group dev
- name: Поднять стенд из чистого clone
run: make up
- name: Публичный smoke через балансировщик
run: make test
- name: Несколько реплик на одном токене и гонка одного ключа
run: make lb-check
- name: Повтор неподтверждённой записи после потерянного ответа и убитой реплики
run: make retry-check
- name: Остановка реплики под запросами, затем возврат
run: |
make test-failover ACTION_SCRIPT=scripts/stop-one.sh
docker compose ps -a api
make restore
- name: Рестарт LB, API и хранилищ с сохранением volumes
run: make test-persistence ACTION_SCRIPT=scripts/restart.sh
- name: Отказы Valkey и PostgreSQL, гонка и rollback
run: make test-faults
- name: Лимиты, порты, секреты, volumes и сети по политике
run: make limits
- name: Время обнаружения отказа балансировщиком (SIGTERM, kill, pause, PostgreSQL)
run: make detection
- name: Наружу опубликован только балансировщик
run: |
docker compose ps --format '{{.Service}} {{.Ports}}' | awk '$2 != "" && $1 != "lb" {print; bad=1} END {exit bad}'
- name: Процессы работают не от root
run: |
for id in $(docker compose ps -q); do
docker top "$id" -eo pid,uid,comm | awk 'NR>1 && $2==0 {print; bad=1} END {exit bad}' || exit 1
done
- name: Корректная остановка реплик API по SIGTERM
run: |
start=$(date +%s)
docker compose kill --signal SIGTERM api
codes=$(docker wait $(docker compose ps -aq api) | sort -u)
elapsed=$(( $(date +%s) - start ))
echo "остановка за ${elapsed} с, коды завершения ${codes}"
test "$elapsed" -le 10 && test "$codes" = "0"
- name: Журналы стенда
if: always()
run: docker compose logs --tail 80
+8
View File
@@ -30,3 +30,11 @@ coverage/
.vscode/
# Keep small, sanitized evidence summaries in evidence/ under version control.
# Inspect git diff --cached: ignore rules are not a secret scanner.
# Тулчейн студенческой реализации
.pytest_cache/
.ruff_cache/
.ty_cache/
# Локальные настройки агента
.claude/settings.local.json
+89
View File
@@ -0,0 +1,89 @@
## Что это за репозиторий
Skeleton лабораторной 3 курса «Мессенджер под нагрузкой» (МТУСИ, 7 независимых лаб) и решение в ветке `solution/bpi2303-kostylev`. Skeleton даёт задание (`README.md`), нормативный контракт (`contracts/`) и публичные black-box проверки (`tests/`). Реализация API, Dockerfile, compose-стенд, конфигурация балансировщика, миграции, хуки отказов и собственные тесты — студенческие; решение лабы 3 построено переносом решения лабы 2.
Лаба 3: несколько взаимозаменяемых реплик API за единой точкой входа — **HAProxy**. Реплики не держат состояния: PostgreSQL остаётся источником истины для пользователей, сессий, чатов и сообщений, Valkey — общий кэш сессий. Каждый ответ API несёт `X-Instance-Id` обслужившей реплики, отправка сообщения требует `Idempotency-Key`, а повтор с тем же ключом через любую реплику не создаёт дубль. Остановка одной реплики не прерывает чтение и запись дольше 10 с.
Автор решения — Костылев Артём, БПИ2303. Уровни «3» → «4» → трек «5» завершены последовательно;
активных OpenSpec changes на момент финализации отчёта нет. Актуальные доказательства:
- `evidence/track1-sqlalchemy/revalidation/` — уровни «3»/«4» после оптимизации, код `3fb741e`;
API идентичен `57744c5`, миграции и инфраструктура с повторного прогона не менялись.
- `evidence/track1-sqlalchemy/` — 135 измерений с тремя повторами и 12 графиков;
baseline `5c8f605`, after `57744c5`; API использует кэш компиляции статического Core CTE.
- `evidence/grade3-*.txt`, `grade4-*.txt` — этапы SQLAlchemy до оптимизации;
`evidence/track1/` и файлы, отмеченные в индексе как raw asyncpg, — исторический код.
- `evidence/report-checks.txt` и `report-audit.txt` — проверки финальных документов;
они не заменяют стендовые и нагрузочные прогоны.
## Команды
```sh
make check # offline: структура skeleton, JSON, локальные $ref, синтаксис Python, X-Instance-Id в контракте
make validate # полная валидация OpenAPI 3.1: openapi-spec-validator из .venv (make install); PYTHON= — свой интерпретатор
make install # uv sync --group dev
make lint # ruff check + ruff format --check + ty check; обязательно перед commit
make student-test # собственные тесты (поднимают одноразовые PostgreSQL и Valkey в Docker)
make student-test PYTEST_ARGS='-v -k drain' # выборка тестов с именами
openspec validate --all --strict
make secrets # локальные secrets/* и .env из .env.example (не коммитятся)
make up # docker compose up -d --build --wait: postgres, valkey, migrate, api ×API_REPLICAS, lb; затем ждёт все реплики UP в LB
make test # публичный smoke через LB (BASE_URL по умолчанию — docker compose port lb 8080, без стенда http://localhost:8080)
make test-persistence ACTION_SCRIPT=scripts/restart.sh # рестарт lb, api, postgres, valkey с сохранением volumes
make test-failover ACTION_SCRIPT=scripts/stop-one.sh # остановка реплики TARGET_INSTANCE_ID под запросами
make test-faults # тесты стенда лабы 2 через LB (make faults-evidence → evidence/faults.txt)
make restore # вернуть остановленные реплики и дождаться их в ротации LB
make lb-check # ≥2 X-Instance-Id на одном токене и 20 гонок одного Idempotency-Key
make retry-check # потерянный ответ (запись ждёт блокировку чата) на живой и на убитой реплике, повтор тем же ключом
make limits # уровень 4: лимиты, порты, секреты, volumes, сети против политики scripts/limits.py
make detection # уровень 4: время обнаружения SIGTERM/kill/pause/PostgreSQL против заявленного максимума
make failover-each # уровень 4: каждая реплика по очереди под k6 (RATE=100) → evidence/failover-each
make rolling-update [FROM_REV=<коммит>] # уровень 4: замена реплик по одной под k6, migrate один раз
make track1 # трек 1: снимок хоста, серии A (1x4/2x2/4x1) и B (1x1/2x1/8x1), до/после на 8x1, контроль, графики; volumes сохраняются
make track1-control # трек 1: пул 4/8/16 и maxconn 16/32/64 на 8x1; 8x0.5 против 4x1 на одних CPU
make plots # трек 1: графики и сводка потолков из evidence/track1-sqlalchemy/*/summary.csv
make down # остановка без удаления данных (с профилем bench); make reset-data — удаление volumes
```
`tests/*.py` и `scripts/*.py` — только stdlib, синтаксис Python 3.9 (`make check` разбирает их системным `python3`). Проверки сами не поднимают стенд. Хуки `scripts/stop-one.sh` и `scripts/restart.sh` запускаются тестом без shell, поэтому исполняемые и с shebang. Данные не удаляются автоматически: каждый прогон smoke создаёт новых синтетических пользователей.
Стенд запускать только в собственном `COMPOSE_PROJECT_NAME`, с `LB_HTTP_PORT=18083`,
`LB_STATS_PORT=23083` и `NO_PROXY=localhost,127.0.0.1,::1` (также `no_proxy`). Остальные
host-порты — 23000–23999. Проверять занятость до запуска; чужие стенды не останавливать.
Полный трек требует 16 vCPU Docker VM. `make detection` перезаписывает свой каталог evidence:
для дополнительного прогона сохранять старое сырьё и задавать новый путь скрипту.
## Архитектура skeleton
- `lab.json` — единственный источник номера лабы (3). От него зависят `scripts/check_contract.py` (`info.version == 1.3.0`, `X-Instance-Id` во всех ответах) и `tests/client.py` (с lab3 проверяет непустой `X-Instance-Id` на любом ответе и шлёт `Idempotency-Key` в каждом POST сообщения).
- `tests/resilience.py --mode failover`: `TARGET_INSTANCE_ID` — реплика, обслужившая первое сообщение; 40 `GET /users/me` одним токеном должны дать ≥2 `X-Instance-Id`; hook возвращается <10 с с кодом 0; первая запись после hook — не позже 10 с от его старта; ≥5 записей после; target отсутствует в последних 5 ответах; история без дублей и байт-в-байт равна подтверждённым ответам. Таймаут клиента 2 с, после ошибки повтор с тем же ключом и текстом.
- `tests/resilience.py --mode persistence`: hook ≤90 с, затем `/health/ready` и `/users/me` прежним токеном до 90 с, сверка истории.
- `contracts/infrastructure.json` — роли `api` (≥2, без локального состояния), `postgres` (persistent volume), `load_balancer` (единственная публичная точка, readiness backend), опциональный `redis_or_valkey`. `compose.example.yaml` — только worksheet ролей.
## Ключевые правила контракта (lab3)
- `X-Instance-Id` и `X-Request-Id` — на каждом ответе API, включая health, `204` logout, `404/405` неизвестного маршрута и `500`. `X-Instance-Id` один на реплику (контейнер), стабилен на жизнь процесса и одинаков у всех воркеров gunicorn. Ответы, сгенерированные самим LB, его могут не иметь.
- `POST /api/v1/chats/{chat_id}/messages` требует `Idempotency-Key` (`^[A-Za-z0-9._:-]{1,128}$`); нет или неверный — `400`. Область ключа — пользователь + метод + путь + ключ, результат хранится ≥24 ч (`IDEMPOTENCY_TTL_SECONDS`). Повтор того же JSON — тот же `201` и тот же `Message` (включая строку `created_at`), другой JSON — `409`. Повтор заново проверяет сессию (`401`) и доступ (`404`). Сохраняется только `201`; запись сообщения и ключа — одна транзакция PostgreSQL.
- LB и клиент не повторяют прозрачно `POST /users` и `POST /chats`. Балансировка без sticky-сессий.
- Сохраняются правила lab2: `Basic` только на `POST /api/v1/auth/sessions`, иначе `Bearer`; `WWW-Authenticate` по пути; `X-User-Id` игнорируется; logout `204`, повтор `401`; абсолютный TTL сессии. И lab1: формат ошибки `{"error":{code,message,request_id}}`, посторонний → `404`, keyset `(created_at, id)`, `limit` 1–100, cursor привязан к чату, время RFC 3339 с `Z`.
## Правила работы с репозиторием
- Не менять и не ослаблять `contracts/`, `tests/`, `README.md`, `COURSE.md`, рубрику. Расхождение оформляется вопросом преподавателю.
- Код — `src/messenger/`, миграции — `alembic/versions/*.py`, конфигурация LB и нагрузки — `infra/`, хуки и обвязка стенда — `scripts/`, собственные тесты — `student-tests/`, обезличенные доказательства — `evidence/` (индекс — `evidence/README.md`, первая строка каждого файла — дата и коммит прогона).
- PostgreSQL — SQLAlchemy 2.0.45 async (`async_sessionmaker`, `DeclarativeBase`), Alembic 1.16.5; версии закреплены в `pyproject.toml` и `uv.lock`, asyncpg только драйвер. ORM/Core остаются в инфраструктуре, домен — dataclass, pydantic — на HTTP-границе. Миграции — только `alembic upgrade head` в one-shot сервисе `migrate`. Старую схему принимает `alembic/legacy.py` после проверки журнала и каталога PostgreSQL; безусловный `stamp` запрещён. Старый журнал сохраняется, volumes не удаляются.
- Без комментариев в коде; отступы — пробелы (`[tool.ruff.format]`); Python 3.14 без `from __future__ import annotations` и `TYPE_CHECKING`.
- Порты реплик API наружу не публикуются: только LB. Нет `container_name`, `hostname` и общего `INSTANCE_ID` у сервиса `api`.
- `REPORT.md`: команды из чистого clone, архитектура, таблица «критерий → команда → наблюдение → файл», таблица отказов, трек 1, ответы на вопросы защиты. PASS без команды не доказательство; для отказов — какой контейнер реально остановлен (`docker ps -a`). Цифры в отчёте берутся только из файлов `evidence/`.
- Старые результаты сохранять с SHA и пометкой версии кода; не смешивать raw asyncpg, baseline SQLAlchemy и SQLAlchemy с кэшем компиляции. Микробенчмарк компиляции не заменяет HTTP-замер, пик RPS не равен пределу SLO. Rolling с no-op миграцией не доказывает произвольный DDL под нагрузкой.
- Ветка `solution/bpi2303-kostylev`, коммиты на английском, перед каждым — `make lint`. Никогда не коммитить `.env`, `secrets/`, токены, volumes, дампы.
- ЛР1/ЛР2 заморожены; менять только текущую лабораторную, WIP и volumes сохранять. Текущую `.pipeline` и её state не менять. Публикация — отдельный этап, только private в MTUCI-Labs; Telegram отправляет runner.
## Уровни оценки
Решение заявлено на **«5»** с треком 1 «Цена масштабирования»; таблица доказательств — в `REPORT.md`.
- **3** — стенд в `compose.yaml`: HAProxy → ≥2 реплики API → общие PostgreSQL и Valkey; разные реплики на одном токене; остановка любой реплики с восстановлением ≤10 с; идемпотентная отправка, включая конкурентный повтор и смену реплики; `make test`, `make test-persistence ACTION_SCRIPT=scripts/restart.sh`, `make test-failover ACTION_SCRIPT=scripts/stop-one.sh`; минимум lab2 сохранён.
- **4** — согласованные readiness, таймауты и `SIGTERM`, период проверок и время обнаружения; поочерёдная остановка каждой реплики под нагрузкой с RPS, ошибками и временем восстановления; лимиты CPU/RAM, API без опубликованных портов; rolling update под нагрузкой и однократные совместимые миграции.
- **5** — трек 1: 1/2/4 реплики при фиксированном бюджете CPU/RAM и серия с ростом ресурсов, saturation point БД/LB/пула, графики и одно подтверждённое улучшение.
+51
View File
@@ -0,0 +1,51 @@
FROM python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d AS builder
COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
UV_PYTHON_DOWNLOADS=never \
UV_PROJECT_ENVIRONMENT=/opt/venv
WORKDIR /build
COPY pyproject.toml uv.lock README.md ./
RUN uv sync --locked --no-dev --no-install-project --no-editable
COPY src ./src
RUN uv sync --locked --no-dev --no-editable
FROM python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d AS runtime
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/opt/venv/bin:$PATH" \
HOST=0.0.0.0 \
PORT=8080 \
LOG_LEVEL=INFO \
WEB_CONCURRENCY=2 \
REQUEST_TIMEOUT_SECONDS=8 \
DRAIN_SECONDS=2 \
SHUTDOWN_TIMEOUT_SECONDS=6
RUN groupadd --system --gid 10001 messenger \
&& useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
COPY --from=builder --chown=root:root /opt/venv /opt/venv
WORKDIR /app
COPY --chown=root:root alembic.ini ./
COPY --chown=root:root alembic ./alembic
USER 10001:10001
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD ["python", "-c", "import urllib.request,sys;sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/health/live',timeout=2).status==200 else 1)"]
CMD ["python", "-m", "gunicorn", \
"--config", "python:messenger.gunicorn_conf", \
"messenger.main:create_app()"]
+171 -2
View File
@@ -1,17 +1,46 @@
PYTHON ?= python3
BASE_URL ?= http://localhost:8080
BASE_URL ?= http://$(shell docker compose port lb 8080 2>/dev/null || echo localhost:8080)
CA_FILE ?=
ACTION_SCRIPT ?=
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
.PHONY: help check validate test load test-persistence test-failover
VENV ?= .venv
UV ?= uv
COMPOSE ?= docker compose
RATE ?= 100
FROM_REV ?=
SHIFT ?= 0
SCRIPTS_PY = alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
TRACK1 ?= evidence/track1-sqlalchemy
SCALING = $(PYTHON) scripts/scaling.py
BEFORE_REV ?= 5c8f605cd3bd40245109348463d3e7111379b2d3
BASELINE = --env API_IMAGE=mtusi-messenger:$(BEFORE_REV)
PSQL = $(COMPOSE) exec -T postgres psql -U messenger -d messenger -X -q
PYTEST_ARGS ?=
.PHONY: help check validate test load test-persistence test-failover \
install lint format typecheck student-test \
secrets up down reset-data migrate ps logs restore lb-check failover-evidence stack-evidence \
persistence-evidence storage-evidence cache-evidence test-faults faults-evidence seed explain retry-check \
limits detection failover-each rolling-update level4 \
track1 track1-images track1-host track1-a track1-b track1-compare track1-control plots
.NOTPARALLEL:
help:
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@echo "install/lint/typecheck/student-test: студенческий тулчейн"
@echo "secrets/up/down/migrate/ps/logs: стенд Docker Compose; reset-data: намеренное удаление volumes"
@echo "restore: вернуть остановленные реплики; lb-check: реплики на одном токене и 20 гонок одного ключа"
@echo "retry-check: потерянный ответ на живой и на убитой реплике, повтор тем же ключом"
@echo "level4 = limits, lb-check, detection, failover-each, rolling-update [FROM_REV=<коммит>]; RATE=$(RATE) rps"
@echo "track1 = track1-host, track1-a (1x4/2x2/4x1), track1-b (1x1/2x1/8x1), track1-compare [BEFORE_REV=$(BEFORE_REV)], track1-control, plots → $(TRACK1)"
@echo "BASE_URL=$(BASE_URL) (порт lb из docker compose); failover-evidence SHIFT=1 — сдвиг round robin на вторую реплику"
check:
$(PYTHON) scripts/check_contract.py
validate: PYTHON := $(if $(wildcard $(VENV)/bin/python),$(VENV)/bin/python,$(PYTHON))
validate:
$(PYTHON) scripts/validate_openapi.py
@@ -28,3 +57,143 @@ test-persistence:
test-failover:
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2)
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
install:
$(UV) sync --group dev
lint:
$(VENV)/bin/ruff check src student-tests $(SCRIPTS_PY)
$(VENV)/bin/ruff format --check src student-tests $(SCRIPTS_PY)
$(VENV)/bin/ty check src student-tests alembic
format:
$(VENV)/bin/ruff check --fix src student-tests $(SCRIPTS_PY)
$(VENV)/bin/ruff format src student-tests $(SCRIPTS_PY)
typecheck:
$(VENV)/bin/ty check src student-tests alembic
student-test:
$(VENV)/bin/pytest $(PYTEST_ARGS)
secrets:
sh scripts/secrets.sh
up: secrets
$(COMPOSE) up -d --build --wait
scripts/lb-wait.sh
down:
$(COMPOSE) --profile bench down
reset-data:
@echo "Удаляются volumes с учебными данными стенда"
$(COMPOSE) --profile bench down -v --remove-orphans
migrate:
$(COMPOSE) run --rm migrate
ps:
$(COMPOSE) ps
logs:
$(COMPOSE) logs --tail 200
restore:
scripts/restore.sh
lb-check:
$(PYTHON) scripts/probe.py check --rounds 20 --out evidence/lb-check.json
retry-check:
$(PYTHON) scripts/probe.py retry --out evidence/retry.json
limits:
$(PYTHON) scripts/limits.py --out evidence/limits.txt
detection:
rm -rf evidence/detection
for run in 1 2 3; do sh scripts/detection.sh evidence/detection/run$$run || exit 1; done
failover-each:
RATE=$(RATE) sh scripts/failover-each.sh evidence/failover-each
rolling-update:
ifneq ($(FROM_REV),)
git archive "$(FROM_REV)" | docker build -q -t "mtusi-messenger:$(FROM_REV)" -
API_IMAGE="mtusi-messenger:$(FROM_REV)" $(COMPOSE) up -d --no-deps --force-recreate --wait api
scripts/lb-wait.sh
endif
$(COMPOSE) build -q api
RATE=$(RATE) $(PYTHON) scripts/probe.py load --expect replace --duration 90 \
--out evidence/rolling$(if $(FROM_REV),-from-$(FROM_REV)) \
-- scripts/rolling-update.sh
level4: limits lb-check detection failover-each rolling-update
track1: track1-images track1-host track1-a track1-b track1-compare track1-control plots
track1-images:
git archive "$(BEFORE_REV)" | docker build -q -t mtusi-messenger:$(BEFORE_REV) -
$(COMPOSE) build -q api
track1-host:
sh scripts/host-snapshot.sh $(TRACK1)/host.txt
track1-a:
$(SCALING) --out $(TRACK1)/series-a --configs 1x4,2x2,4x1 --api-memory-total 2048 \
--start-per-cpu 150 $(BASELINE)
track1-b:
$(SCALING) --out $(TRACK1)/series-b --configs 1x1,2x1,8x1 --api-memory 512 \
--start-per-cpu 300 --search 1.5:9000 $(BASELINE)
track1-compare: track1-images
$(SCALING) --out $(TRACK1)/compare --configs 8x1 --api-memory 512 --rates 2400,3600,5400 \
--variant before:API_IMAGE=mtusi-messenger:$(BEFORE_REV) --variant after
track1-control:
$(SCALING) $(BASELINE) --out $(TRACK1)/control-pool --configs 8x1 --api-memory 512 --rates 5400 \
--variant pool4:DB_POOL_MAX_SIZE=4 --variant pool8 --variant pool16:DB_POOL_MAX_SIZE=16 \
--variant maxconn16:API_SERVER_MAXCONN=16 --variant maxconn64:API_SERVER_MAXCONN=64
$(SCALING) $(BASELINE) --out $(TRACK1)/control-cpus --configs 4x1,8x0.5 --api-memory-total 2048 --rates 3040,4560 \
--variant pinned
plots:
MPLBACKEND=Agg $(UV) run --no-project --python 3.14 --with 'matplotlib==3.11.2' \
python tools/plot_track1.py --out $(TRACK1)/plots $(wildcard $(TRACK1)/*/summary.csv)
failover-evidence:
sh scripts/failover-evidence.sh "$(BASE_URL)" "$(SHIFT)"
stack-evidence:
sh scripts/evidence-stack.sh
persistence-evidence:
sh scripts/persistence-evidence.sh "$(BASE_URL)" > evidence/persistence.txt
cat evidence/persistence.txt
storage-evidence:
sh scripts/evidence-storage.sh
cache-evidence:
sh scripts/evidence-cache.sh > evidence/cache.txt
cat evidence/cache.txt
test-faults:
BASE_URL="$(BASE_URL)" $(VENV)/bin/pytest -m stack -v -s student-tests/stack
faults-evidence:
{ echo "date: $$(date -u +%FT%TZ) commit: $$(git rev-parse --short HEAD)"; echo "\$$ make test-faults"; \
$(MAKE) --no-print-directory test-faults 2>&1; } | sed 's#$(CURDIR)#<repo>#g' > evidence/faults.txt
cat evidence/faults.txt
grep -qE '^=+ [0-9]+ passed in' evidence/faults.txt
seed:
$(PSQL) -f - < scripts/sql/seed-history.sql
explain: seed
{ echo "date: $$(date -u +%FT%TZ) commit: $$(git rev-parse --short HEAD)"; \
echo "\$$ make explain # scripts/sql/explain-history.sql"; \
$(PSQL) -f - < scripts/sql/explain-history.sql; } > evidence/explain-history.txt
cat evidence/explain-history.txt
+765 -15
View File
@@ -1,37 +1,787 @@
# Отчёт — лабораторная 3
- Автор, группа: TODO
- Целевая оценка; выбранный трек 5, если нужен: TODO
- Commit/PR: TODO после публикации
- Использованные источники, библиотеки и помощь ИИ: TODO
- Автор, группа: Костылев Артём, БПИ2303
- Целевая оценка: **5**; трек «5» — **трек 1 «Цена масштабирования»**
- Ветка: `solution/bpi2303-kostylev`. Уровни «3» и «4» повторно подтверждены после
оптимизации на `3fb741e6a84d2b187a0266488b018f0b684dcce5`: SQLAlchemy 2.0.45 / Alembic 1.16.5.
[Команды и результаты](evidence/track1-sqlalchemy/revalidation/commands.txt),
[аудит доказательств](evidence/track1-sqlalchemy/final-audit.txt).
Код API, миграции, инфраструктура и lockfile с этого прогона не менялись.
После него `55b99a2` исправил только сохранение диагностических журналов подготовки нагрузки;
[повторные тесты и smoke](evidence/track1-sqlalchemy/diagnostics/setup-log-fix-checks.txt) прошли.
- Трек «Цена масштабирования» переснят на SQLAlchemy: baseline `5c8f605`,
оптимизация API `57744c5`, обвязка CPU-контроля `07965a2`, графики `3fb741e`.
Текущие измерения — `evidence/track1-sqlalchemy/`; старый raw asyncpg хранится отдельно.
- Изменения завершены: [трек](openspec/changes/archive/2026-11-06-remeasure-lab3-scaling/tasks.md)
и [SQLAlchemy/Alembic](openspec/changes/archive/2026-11-05-adopt-sqlalchemy-alembic/tasks.md)
архивированы 2026-11-06; главные specs синхронизированы.
- Источники и инструменты: FastAPI, gunicorn + uvicorn-worker, dishka, pydantic, structlog,
SQLAlchemy, Alembic, asyncpg как драйвер, argon2-cffi, redis-py, pytest, ruff, ty; версии —
`evidence/environment.txt` и `uv.lock`. Документация установленного SQLAlchemy проверена через
Context7: [async sessions](https://github.com/sqlalchemy/sqlalchemy/blob/rel_2_0_45/doc/build/orm/extensions/asyncio.rst),
[проверка соединений](https://github.com/sqlalchemy/sqlalchemy/blob/rel_2_0_45/doc/build/core/pooling.rst);
[кэширование статического SQL](https://github.com/sqlalchemy/sqlalchemy/blob/rel_2_0_45/doc/build/core/connections.rst);
Alembic — [async cookbook 1.16.5](https://github.com/sqlalchemy/alembic/blob/rel_1_16_5/docs/build/cookbook.rst).
Инфраструктура опирается на HAProxy 3.2 Manual, Docker Compose, PostgreSQL и k6.
Решение перенесено из собственной ЛР2; текущий этап выполнен с помощью Codex.
## Запуск из чистого clone
TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных.
Требуются Git, Docker с Compose v2, `make`, `curl`, uv и системный Python 3.9+ для публичных
проверок и обвязки. `make install` устанавливает Python 3.14 и зависимости из `uv.lock`.
Образы сторонних сервисов закреплены версией и digest, API собирается из исходников.
Текущий результат ещё не опубликован. До этапа публикации чистый clone берётся из локального
репозитория с завершёнными коммитами; `LAB3_SOURCE` заменяется своим путём к нему.
Это копирует только Git-данные, без `.env`, secrets, `.venv` и volumes. После публикации
источником может быть private-репозиторий решения в MTUCI-Labs с тем же кодом.
```sh
LAB3_SOURCE="$HOME/projects/learning/HL/labs/mtusi2026lab3"
cd "$(mktemp -d)"
git clone --no-local --branch solution/bpi2303-kostylev "$LAB3_SOURCE" mtusi2026lab3
cd mtusi2026lab3
git rev-parse HEAD
export COMPOSE_PROJECT_NAME=mtusi2026lab3-local
export LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
export NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1
make install
make secrets # secrets/*: пароли PostgreSQL и Valkey, DATABASE_URL, CACHE_URL, ключ курсора; .env из .env.example
docker compose --env-file .env config --quiet
make up # docker compose up -d --build --wait: postgres, valkey → migrate (миграции, один раз) → api ×2 → lb,
# затем scripts/lb-wait.sh: ждёт, пока статистика LB покажет UP у всех запущенных реплик
make test # публичный smoke через балансировщик (BASE_URL — опубликованный порт lb, см. ниже)
make lb-check # ≥2 X-Instance-Id на одном токене и 20 × 8 параллельных POST с одним ключом → evidence/lb-check.json
make retry-check # потерянный ответ на живой и на убитой реплике, повтор тем же ключом → evidence/retry.json
make test-failover ACTION_SCRIPT=scripts/stop-one.sh
make restore # вернуть остановленную реплику и дождаться её в ротации LB
curl -s -o /dev/null "http://$(docker compose port lb 8080)/health/live" # сдвиг round robin: следующий прогон остановит другую реплику
make test-failover ACTION_SCRIPT=scripts/stop-one.sh && make restore
make test-persistence ACTION_SCRIPT=scripts/restart.sh
make migrate # повторный alembic upgrade head, версия и данные не меняются
make storage-evidence # \d+ схемы, повтор миграций, префикс KDF, правила ignore и volumes проекта → evidence/
make down # безопасная остановка: контейнеры и сети удаляются, volumes с данными остаются
```
`make secrets` идемпотентен: существующие файлы не перезаписываются, значения нигде не печатаются; `make up`
вызывает его сам. `make up` ждёт `healthy` всех сервисов, включая балансировщик (он здоров, когда в ротации есть хотя
бы одна реплика, `/healthz` на порту статистики), а затем — пока в ротацию войдут все реплики: вторая входит после
`rise 2` проверок, примерно через 2,5 с, и без этого ожидания `make test-failover` сразу после `make up` мог увидеть
один `X-Instance-Id`. Миграции применяет одноразовый `migrate` под advisory lock
до старта реплик; реплики схему не трогают. Публикуются только порты `lb` на `127.0.0.1`: `LB_HTTP_PORT`
(по умолчанию 8080) и `LB_STATS_PORT` (8404, статистика только для чтения). В текущем прогоне переменные окружения задают `LB_HTTP_PORT=18083`,
`LB_STATS_PORT=23083`. Цели `make` берут `BASE_URL` по умолчанию из `docker compose port lb 8080`, то есть
работают и с изменённым `LB_HTTP_PORT`; без поднятого стенда — `http://localhost:8080`, явный `BASE_URL=…`
переопределяет. Цель failover-теста выбирает round robin (реплика, обслужившая первое сообщение); второй
прогон сразу после первого попадает в ту же реплику, поэтому перед ним нужен один запрос через LB (строка
`curl …/health/live` выше или `make failover-evidence SHIFT=1`).
До запуска следует проверить занятость 18083/23083 и выбрать свободное имя собственного
Compose-проекта. Чужие контейнеры не останавливаются. Дополнительные порты собственных тестов
автоматически выбираются в 23000–23999. `make reset-data` для воспроизведения не нужен.
Прогон уровня «3» выполнен из рабочего checkout, на новом Compose-проекте
`mtusi2026lab3-grade3-final-20261105` и пустых volumes, с указанными портами и без явного `BASE_URL`.
`evidence/grade3-start.txt` содержит пустой список volumes перед запуском, сборку, `make up`,
`docker compose ps -a` и версию Alembic `0002_idempotency_keys`. Старые volumes не удалялись.
Исторический запуск именно из clone сохранён в `evidence/clean-clone.txt` (`e049c26`);
он не подменяет проверки текущего SQL-слоя.
Собственные проверки и тулчейн (каталог команд; для стендовых целей начиная с
`make test-faults` предварительно выполнить `make up`, после проверок — `make down`):
```sh
make install # uv sync --group dev (Python 3.14 и зависимости из uv.lock)
make lint # ruff check + ruff format --check (src, student-tests, scripts/{probe,limits,scaling}.py, tools) + ty check
make student-test # собственные тесты; поднимают одноразовые PostgreSQL и Valkey того же образа в Docker
make student-test PYTEST_ARGS=-vv # то же с именами тестов (так снят evidence/student-tests.txt)
make check # офлайн-проверка skeleton
make validate # полная валидация OpenAPI 3.1 и примеров (openapi-spec-validator из dev-группы .venv)
openspec validate --all --strict
make test-faults # тесты стенда лабы 2 (Valkey, PostgreSQL, гонки) через балансировщик
make faults-evidence # то же с датой и коммитом → evidence/faults.txt (путь репозитория → <repo>)
make failover-evidence SHIFT=1 # docker inspect реплик до/после, make test-failover, логи остановленной, restore
make persistence-evidence # persistence-тест + StartedAt всех контейнеров до и после
make stack-evidence # сервисы, порты, hostname ↔ X-Instance-Id, лимиты, сети, взгляд LB
make storage-evidence # \d+ схемы, повтор миграций, префикс KDF, правила ignore
```
Для проверки specs нужен отдельно установленный CLI OpenSpec; это инструмент разработки,
не зависимость API. Проверки `make` используют окружение из `make install`.
Проверки уровня «4» выполняются после `make up` — по одной команде на пункт рубрики;
после них — `make down`. Каждая пишет файл в `evidence/` и завершается
ненулевым кодом при нарушении (`make level4` — все подряд):
```sh
make limits # лимиты, порты, секреты, volumes, сети по политике → evidence/limits.txt
make lb-check # 40 GET одним токеном + 20 раундов × 8 параллельных POST с одним ключом
make detection # три прогона: SIGTERM, kill, pause, остановка PostgreSQL → evidence/detection/run{1,2,3}/
make failover-each # каждая реплика: остановка, 10 с без неё, возврат — под k6 100 rps
make rolling-update FROM_REV=7fc911c # предыдущая SQLAlchemy-версия → текущая под нагрузкой
make rolling-update # замена текущей сборкой (эквивалентная поочерёдная замена)
```
Генератор нагрузки — сервис `k6` под профилем `bench` (с `make up` не стартует); `RATE` задаёт интенсивность.
Трек 1 выполняется последовательно на собственном Compose-проекте. Существующие volumes
сохраняются; каждый прогон создаёт новые синтетические чаты. Старые результаты asyncpg находятся
в `evidence/track1/`, новые — в `evidence/track1-sqlalchemy/`. Для повторного полного эксперимента
нужен новый `TRACK1`, чтобы не смешать номера повторов:
```sh
export COMPOSE_PROJECT_NAME=mtusi2026lab3-track5-local
export LB_HTTP_PORT=18083 LB_STATS_PORT=23083
make up
make track1 TRACK1=evidence/track1-local
make plots TRACK1=evidence/track1-local
make down
```
`make track1-images` собирает baseline SQLAlchemy из `BEFORE_REV=5c8f605cd3bd40245109348463d3e7111379b2d3`
и текущий образ. `track1-a` / `track1-b` используют baseline; `track1-compare` чередует
baseline и текущий образ на 8×1; `track1-control` исследует пул, maxconn и размещение baseline.
`make plots` использует только каталог выбранного TRACK1. Требуются 16 доступных vCPU Docker VM
для указанного pinning. После каждой серии возвращается обычная конфигурация двух реплик.
**Версии и стенд:** Python 3.14.7 в образе `python:3.14-slim-trixie@sha256:51dafde8…`,
`haproxy:3.2.26-alpine@sha256:58938405…`, `postgres:17.11-alpine@sha256:266d3c25…`,
`valkey/valkey:8.1.11-alpine@sha256:2602ace2…`, `grafana/k6:2.3.0@sha256:2dd4756e…`, uv 0.9.7 по digest,
Docker 28.3.2, Compose 2.38.2. Машина — Apple M4 Max, 16 CPU, 48 ГБ RAM, macOS 15.1; VM Docker Desktop —
16 CPU, 7.65 ГиБ (`evidence/environment.txt`).
## Архитектура и решения
TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab2, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации.
```
┌── api (gunicorn, 2 × UvicornWorker) ──┐ SQLAlchemy async pool, 1–2 с
клиент ──HTTP──▶ lb (HAProxy 3.2) ───┤ X-Instance-Id = hostname ├──▶ postgres (источник истины, pgdata)
127.0.0.1:18083 round robin, └── api (gunicorn, 2 × UvicornWorker) ──┘──▶ valkey (кэш сессий, AOF, valkeydata)
httpchk /health/ready migrate (тот же образ, один раз до реплик) ──▶ postgres
сеть edge ─────── lb ─────── сеть backend (internal): lb, api, migrate, postgres, valkey
```
**Перенесено из лабы 2 без изменения поведения:** зоны `identity` и `messaging`, порты и адаптеры, UoW, шина
событий с журналом аудита, ASGI-конвейер, Basic → Bearer, Argon2id, сессии в PostgreSQL с read-through кэшем
в Valkey и отметками отзыва, подписанный курсор, порядок истории под блокировкой строки чата, миграции под
advisory lock, тесты стенда (`make test-faults`). Уже в лабе 2 реплика не держала в памяти ничего, от чего
зависит корректность: кэш и отметки отзыва общие (Valkey), курсор подписан общим секретом, отметка
`created_at` назначается под блокировкой строки чата, а не часами процесса. **Изменено:** один контейнер с
портом → сервис `api` с `deploy.replicas` за HAProxy; `X-Instance-Id`; обязательный `Idempotency-Key`;
миграция `0002`; `restart.sh` перезапускает и LB; таймауты и воркеры под реплики; удалён `api-shortttl`
(публиковал порт API в обход LB, проверка истечения TTL осталась in-process тестом). Лаба 3 начата с коммита
`8cddb09` лабы 2, а исправления лабы 2 после её ревью (`8cddb09..102579e`) перенесены отдельным циклом
`2026-10-30-carry-over-lab2-review-fixes` (`a59e3a3`): предел тела считает фактически принятые байты
(`chunked` сверх 1 MiB → `413`), выход отзывает сессию через порт `SessionRevocations` и снимает отметку отзыва,
если PostgreSQL отверг удаление (`503` значит «сессия ещё действует»), пустой `cursor` → `400`, зоны связаны только
схемой БД, воркер сам прерывает зависший при остановке запрос до `SIGKILL` мастера. После второго ревью этот ответ —
`503 unavailable` в формате контракта (был `text/plain 500` uvicorn без `X-Request-Id` и `X-Instance-Id`), readiness
стоит за портом `Readiness`, а окно вывода пишется событием `service.draining` (цикл `2026-10-30-close-lab3-second-review-gaps`).
**SQLAlchemy и Alembic.** ORM-модели и Core-запросы остаются в инфраструктуре зон;
домен — dataclass, pydantic — на HTTP-границе. `Database` создаёт async engine
`postgresql+asyncpg`, `async_sessionmaker(expire_on_commit=False)` и ограниченный пул без overflow.
Каждая операция получает собственный `AsyncSession`; незавершённая транзакция откатывается при закрытии.
`pool_pre_ping=True` проверяет соединение до его выдачи бизнес-операции. Без этого после возврата
PostgreSQL readiness могла уже быть успешной, а регистрация через другое соединение получала `503`.
Проверка заменяет закрытое соединение; уже начатые транзакции автоматически не повторяются.
Цена — дополнительное обращение к БД на выдаче открытого соединения; старые RPS трека к этому коду неприменимы.
One-shot `migrate` выполняет `alembic upgrade head` под advisory lock. Журнал — `alembic_version`,
актуальная ревизия — `0002_idempotency_keys`. На старом volume принимается только проверенная схема:
`alembic/legacy.py` сверяет журнал и каталог PostgreSQL, сохраняет строки и прежний `schema_migrations`.
Безусловного stamp нет. Свежая схема, сохранение данных, откат неуспешной миграции и два мигратора
проверяются в `student-tests/api/test_migrations.py`; повтор на реальном стенде — `evidence/migrations.txt`.
**`X-Instance-Id`.** `PlatformSettings.instance_id` по умолчанию — `socket.gethostname()`; Docker даёт
контейнеру hostname, равный короткому ID, поэтому значение одно на все воркеры реплики, стабильно на жизнь
контейнера и совпадает с `docker ps` (`evidence/stack.txt`). Конвейер ставит заголовок рядом с
`X-Request-Id` на каждый ответ, проходящий через него; ответ `500` формирует внешний `ServerErrorMiddleware`,
поэтому обработчик необработанных исключений ставит оба заголовка сам. `INSTANCE_ID` в compose не задаётся:
он был бы одинаков у всех реплик.
**Идемпотентная отправка (зона `messaging`).** Таблица `idempotency_keys (chat_id, user_id, key, fingerprint,
message_id, created_at)`, PK `(chat_id, user_id, key)` — область «пользователь + метод + путь чата + ключ»
(ключ бывает только у `POST …/messages`), FK `(chat_id, user_id) → chat_members` и `message_id → messages`,
`CHECK` формата ключа и длины отпечатка. Отправка — **один изменяющий SQL-оператор**
в транзакции SQLAlchemy с явным `session.commit()` (`PostgresMessageLog.post`, порт `MessageLog`).
CTE появился ещё в историческом треке raw asyncpg; до него было пять обращений,
три под блокировкой чата. Нынешний трек кэширует компиляцию уже существующего CTE:
1. CTE `chat`: строка чата `FOR UPDATE`, соединённая с членством отправителя; нет строки → `404`;
2. `created_at = GREATEST(часы реплики, last_message_at + 1 мкс)` — история чата не идёт назад;
3. `INSERT idempotency_keys … ON CONFLICT DO UPDATE … WHERE` ключ истёк — живой ключ не трогается;
4. `INSERT messages` только если ключ записан, `UPDATE chats.last_message_at`; сообщение и ключ фиксируются вместе через `session.commit()`;
5. ключ занят → следующая команда в том же `AsyncSession` читает квитанцию, моложе `IDEMPOTENCY_TTL_SECONDS`: тот же
отпечаток → сохранённое сообщение (`201`, тот же `MessageOut`, `created_at` с микросекундами); другой → `409`.
Порядок проверок отправки: сессия (`401`) → форма запроса: `Idempotency-Key`, malformed JSON, лишние поля и
типы (`400`, проверяет FastAPI до обработчика, чат не читается, поэтому ответ одинаков для существующего и
несуществующего чата) → доступ к чату (`404`) → текст (`400`). Текст проверяется до записи; если он невалиден,
отдельным чтением проверяется членство, чтобы посторонний получил `404`, а не `400` (тесты
`test_access_checked_before_body` и `test_request_shape_is_checked_before_access`, сценарии
`lab3-idempotent-messages` «Порядок проверок отправки сообщения»). Сообщение и ключ фиксируются вместе или не фиксируются вовсе; маркера «в обработке»
нет, поэтому после гибели реплики посреди запроса повтор с тем же ключом создаёт сообщение один раз.
Одновременные повторы одного ключа всегда идут в один чат и ждут на блокировке его строки; дождавшийся
получает конфликт ключа, а следующая команда в `READ COMMITTED` видит зафиксированную квитанцию. Внешний ключ
квитанции на сообщение проверяется в конце команды, поэтому ключ можно вставить раньше сообщения. Отпечаток —
SHA-256 канонического JSON распарсенной модели, поэтому порядок полей и пробелы не важны. Ответы `4xx`/`5xx`
ничего не пишут; `lock_timeout` теперь `503`, а не `500`. Отвергнуто: `SET NX` в Valkey (не атомарен с
`COMMIT`), отдельный маркер «processing» (залипает после отказа).
**Кэш компиляции SQLAlchemy.** Неизменный Core CTE обёрнут в
`lambda_stmt(post_message, enable_tracking=False)`: PostgreSQL Insert с ON CONFLICT
не предоставляет обычный cache key. Структура запроса статична; все идентификаторы,
текст, отпечаток и времена поступают отдельными bindparam в `session.execute`.
Кэш содержит скомпилированный SQL, а не сообщения или результаты. Явный COMMIT,
pre-ping и порядок блокировок сохраняются. Цена — один compiled объект на движок;
при изменении структуры запросов отключённое tracking нужно пересмотреть.
Документация версии 2.0.45 проверена через Context7:
[SQL compilation caching](https://github.com/sqlalchemy/sqlalchemy/blob/rel_2_0_45/doc/build/core/connections.rst).
**Балансировщик** (`infra/haproxy/haproxy.cfg`):
| Параметр | Значение | Зачем |
| --- | --- | --- |
| Обнаружение | `server-template api 8 api:8080`, `resolvers docker` (127.0.0.11), `init-addr none` | остановленная реплика пропадает из DNS, новая появляется без перезапуска LB и без `docker.sock` |
| Алгоритм | `balance roundrobin`, без `stick` | каждое новое соединение — следующая реплика; сессия общая, привязка не нужна |
| Проверка | `GET /health/ready`, `inter 1s fastinter 500ms downinter 2s fall 2 rise 2`, `timeout check 1s`, `init-state fully-down` | реплика без БД или в остановке выходит из ротации; вернувшаяся получает трафик только после проверок |
| Повторы | `retries 2`, `redispatch 1`, `retry-on conn-failure empty-response`; `disable-l7-retry` всем, кроме `GET` и `POST …/messages` с ключом | отказ соединения повторяется всегда (запрос не ушёл); после отправки — только безопасное к повтору; `POST /users`, `/chats`, вход не повторяются (`contracts/README.md`) |
| Соединения к API | `option http-server-close` | нет простаивающих keep-alive, за которые гонится остановка реплики |
| Таймауты | `connect 500ms`, `server 10s` > `REQUEST_TIMEOUT_SECONDS=8` > `statement_timeout` 2 с; `queue 3s`, `maxconn 64` на сервер | цепочка клиент > LB > приложение > БД |
| Ошибки LB | `502/503/504` — JSON `{"error":{…,"request_id"}}` с тем же `X-Request-Id` | формат контракта даже без реплик (`evidence/hooks.txt`) |
| `X-Request-Id` | непустой входящий до 200 символов пробрасывается, иначе uuid4 | приложение эхо-возвращает его |
| Остановка | `stop_signal: SIGUSR1`, `hard-stop-after 5s` | мягкий стоп внутри `stop_grace_period` 8 с |
**Остановка и процессы (уровень «4»).** По `SIGTERM` реплика сначала выходит из ротации и только потом
перестаёт принимать соединения. Каждый воркер запускает `DrainingServer` (наследник `uvicorn.Server`,
`src/messenger/gunicorn_conf.py`): после сигнала он поднимает флаг процесса `DRAINING`
(`shared/infrastructure/readiness.py`) и пишет `service.draining`; адаптер `DatabaseReadiness` за портом `Readiness`
проверяет флаг до пинга PostgreSQL, поэтому `/health/ready` отвечает `503`, `/health/live` — `200`, запросы обслуживаются как обычно, и так `DRAIN_SECONDS=2` — дольше худшего обнаружения `503`
балансировщиком (1,5 с). Затем uvicorn закрывает listener и дообрабатывает принятые запросы ещё
`SHUTDOWN_TIMEOUT_SECONDS − DRAIN_SECONDS − 1` = 3 с (не меньше таймаутов БД 1 + 2 с), а задачу запроса, не
завершённого к этому сроку, отменяет и выходит с кодом 0. Отмену ловит конвейер: пишет `request.cancelled` и, если
ответ ещё не начат, отвечает `503 unavailable` в общем формате с `X-Request-Id` и `X-Instance-Id`, затем пробрасывает
отмену дальше (без этого uvicorn отвечал своим `text/plain 500` без заголовков контракта); весь срок — ≤5 с < gunicorn `graceful_timeout` 6 с <
`docker stop -t 7` хука < `stop_grace_period: 8s` < 10 с, поэтому мастер gunicorn не доходит до `SIGKILL` воркера. Результаты до и после оптимизации приведены ниже с SHA каждого прогона.
Хук останавливает конкретный контейнер, соответствие hostname проверяется через `docker inspect`.
На реплику `cpus: 1`, `512m`, 2 воркера, пул 8: 2 × 2 × 8 = 32 соединения <
`max_connections=200`. API работает `read_only` с `tmpfs /tmp`.
**Проверки, период и максимум обнаружения.** `GET /health/ready` раз в `inter 1s`; после первого провала —
`fastinter 500ms`; `fall 2` провала — реплика исключена; `rise 2` успеха — возвращена; `timeout check 1s`;
у `DOWN`-реплики — `downinter 2s`. Readiness пингует PostgreSQL за ≤0,4 с (общий дедлайн на получение соединения и `SELECT 1`), то есть отвечает явным `503` раньше таймаута проверки. `init-state fully-down`: сервер, который
стартовал, появился через DNS или вернулся из `MAINT (resolution)`, получает трафик только после `rise 2`
проверок (без этого HAProxy делал его `UP/READY` сразу по DNS-ответу, и запросы уходили в ещё не слушающий
gunicorn — первый прогон `failover-each` показал `wredis` 19 и 49 без ошибок; это записано в `design.md`
изменения `2026-10-28-add-lab3-failover-operations`, сырьё того прогона заменено повторным с `init-state`).
Три серии на SQLAlchemy 2.0.45 (`252e3e3`), команда `make detection`:
| Отказ | Как замечает LB | Максимум обнаружения | Замер, с |
| --- | --- | --- | --- |
| `SIGTERM` (`docker stop -t 7`) | readiness `503` в окне вывода | 1,5 с | 1.069–1.266; остановка 2.535–2.665 |
| `docker kill` | отказ соединения, DNS | 1,5 с | 0.886–0.934 |
| `docker pause` | таймаут проверки | 3,5 с | 2.778–3.215 |
| Остановка PostgreSQL | readiness всех реплик `503` | 1,5 с до 0 `UP` | 1.196–1.263; через LB `503 unavailable` без `X-Instance-Id` |
Для ответившей `503` реплики максимум — `inter + (fall−1)·fastinter` = 1,5 с;
для зависшей — дополнительно `fall·timeout check`, итого 3,5 с. Измерение начинается перед
запуском docker CLI, статистика LB опрашивается раз в 50 мс; допуск — 0,25 с. Все 12 замеров
уложились в формулу даже без допуска, SIGTERM исключён до завершения остановки.
Возврат после команды восстановления — 1.953–3.095 с.
Данные: `evidence/detection/run{1,2,3}/*.json`, команда и SHA — `evidence/grade4-detection.txt`.
**Цепочка таймаутов** (проверяется тестом `student-tests/unit/test_timeouts.py` по `compose.yaml`,
`haproxy.cfg` и `scripts/stop-one.sh`, а не только таблицей):
| Звено | Значение | Условие |
| --- | --- | --- |
| LB `timeout server` | 10 с | > `REQUEST_TIMEOUT_SECONDS` |
| `REQUEST_TIMEOUT_SECONDS` | 8 с | > ожидание соединения + оператор БД |
| `DB_ACQUIRE_TIMEOUT_SECONDS` + `DB_COMMAND_TIMEOUT_SECONDS` (`statement_timeout` = `lock_timeout`) | 1 + 2 с | ≤ дообработки после окна |
| LB `timeout check` | 1 с | > readiness 0,4 с |
| `DRAIN_SECONDS` | 2 с | > обнаружения 1,5 с |
| дообработка после окна (uvicorn `timeout_graceful_shutdown`) | `SHUTDOWN − DRAIN − 1` = 3 с | ≥ таймаутов БД 1 + 2 с; затем зависший запрос → `503 unavailable` |
| `SHUTDOWN_TIMEOUT_SECONDS` (gunicorn `graceful_timeout`) | 6 с | > окна + дообработки; < `STOP_TIMEOUT` хука |
| `STOP_TIMEOUT` хука `stop-one.sh` | 7 с | < `stop_grace_period` 8 с < 10 с |
| LB `timeout connect` / `queue` | 0,5 с / 3 с | отказ соединения повторяется на соседа сразу |
| LB `hard-stop-after` | 5 с | < `stop_grace_period` LB 8 с |
| клиенты: resilience / smoke / k6 | 2 / 10 / 10 с | — |
**Хуки.** `scripts/stop-one.sh` — контейнер `api` с `.Config.Hostname == TARGET_INSTANCE_ID` → `docker stop -t 7`,
реплика остаётся остановленной, неизвестный ID → код 3 без изменений. `scripts/restart.sh` — `stop lb api`,
`restart postgres valkey`, `up -d --no-recreate --wait` (те же контейнеры, повторный `migrate`), volumes не
трогаются. `scripts/restore.sh` — `up --no-deps --no-recreate --wait api`, затем `scripts/lb-wait.sh` ждёт, пока
статистика LB покажет все реплики `UP`.
**Роли и сервисы** (`compose.yaml`; сети `edge` и `backend` с `internal: true`):
| Роль | Сервис | Версия / digest | Health / readiness | Volume | Сеть / порт | Credentials |
| --- | --- | --- | --- | --- | --- | --- |
| load_balancer | `lb` | `haproxy:3.2.26-alpine@sha256:58938405…`, uid 99, `read_only`, `cap_drop: ALL` | `/healthz` :8404 (`nbsrv(api) ≥ 1`); проверяет реплики `GET /health/ready` | нет | `edge` + `backend`; `127.0.0.1:${LB_HTTP_PORT:-8080}`, `127.0.0.1:${LB_STATS_PORT:-8404}` | нет |
| api ×`API_REPLICAS` | `api` | сборка из `Dockerfile`, python по digest, uid 10001, `read_only` | `GET /health/ready` (пингует PostgreSQL) | нет | `backend`, порт не публикуется | secrets `database_url`, `cache_url`, `cursor_secret` через `*_FILE` |
| postgres | `postgres` | `postgres:17.11-alpine@sha256:266d3c25…`, uid 70, `pg_stat_statements` | `pg_isready` | `pgdata:/var/lib/postgresql/data` | `backend` | secret `postgres_password` через `POSTGRES_PASSWORD_FILE` |
| сессии (кэш) | `valkey` | `valkey/valkey:8.1.11-alpine@sha256:2602ace2…`, uid 999 | `valkey-cli ping` с паролем | `valkeydata:/data` (AOF) | `backend` | secret `valkey.conf` (`requirepass`) |
| bootstrap | `migrate` | образ api, `restart: "no"` | код выхода 0 | нет | `backend` | secret `database_url` |
| генератор нагрузки (профиль `bench`) | `k6` | `grafana/k6:2.3.0@sha256:2dd4756e…`, uid хоста | нет | нет (скрипт `infra/k6` только для чтения) | только `edge`, порт не публикуется | нет |
Готовность реплики зависит только от PostgreSQL: Valkey — кэш, при его отказе проверка идёт в БД. Общее
хранилище сессий — PostgreSQL (источник истины) плюс общий Valkey. Bootstrap: `make secrets` (идемпотентен,
не перезаписывает существующие файлы), `make up` (миграции — `migrate` под advisory lock); повтор безопасен
(`make migrate` → код 0, версия Alembic и счётчики строк неизменны). Лимиты: lb 1 CPU/128m, api 1 CPU/512m на реплику, migrate 0.5/256m,
postgres 2/1g, valkey 0.5/128m, k6 2/512m (`make limits` сверяет их и изоляцию с политикой).
**Соответствие `.env.example` реальной конфигурации:**
| `.env.example` | В решении | Комментарий |
| --- | --- | --- |
| `APP_HOST`, `APP_PORT` | `HOST`, `PORT` | заданы в образе (`0.0.0.0:8080`); снаружи — порт LB `LB_HTTP_PORT` |
| `APP_ENV` | не используется | режимов окружения нет |
| `SESSION_TTL_SECONDS` | `SESSION_TTL_SECONDS` | по умолчанию 3600 |
| `DATABASE_URL_FILE` | `DATABASE_URL_FILE` | любой параметр читается из `<ИМЯ>_FILE` |
| `SESSION_STORE=postgres` | фиксировано | PostgreSQL — источник истины сессий, Valkey — кэш поверх него |
| `CACHE_URL_FILE` | `CACHE_URL_FILE` | без него кэш выключен |
| `API_REPLICAS` | `deploy.replicas: ${API_REPLICAS:-2}` | число реплик сервиса `api` |
| `IDEMPOTENCY_TTL_SECONDS` | `IDEMPOTENCY_TTL_SECONDS` | 86 400; квитанция старше срока перезаписывается новым запросом |
| — | `LB_HTTP_PORT`, `LB_STATS_PORT` | опубликованные порты LB на `127.0.0.1` |
| — | `API_CPUS`, `API_MEMORY`, `WEB_CONCURRENCY`, `DB_POOL_MAX_SIZE`, `API_SERVER_MAXCONN` | размер реплики, воркеры, пул на воркер, очередь LB на сервер |
| — | `PG_MAX_CONNECTIONS`, `PG_CPUS`, `PG_MEMORY`, `LB_CPUS` | лимиты PostgreSQL и LB |
| — | `REQUEST_TIMEOUT_SECONDS`, `DRAIN_SECONDS`, `SHUTDOWN_TIMEOUT_SECONDS` | 8 с, 2 с и 6 с (заданы в compose и образе) |
| — | `DB_ACQUIRE_TIMEOUT_SECONDS`, `DB_COMMAND_TIMEOUT_SECONDS` | 1 с и 2 с: ожидание соединения из пула и `statement_timeout` = `lock_timeout` |
| — | `K6_CPUS`, `K6_MEMORY` | лимиты генератора нагрузки (профиль `bench`) |
| — | `API_CPUSET`, `LB_CPUSET`, `PG_CPUSET`, `VALKEY_CPUSET`, `K6_CPUSET` | закрепление за CPU для трека 1; пусто — не закреплено |
| — | `CURSOR_SECRET_FILE` | общий ключ подписи курсора для всех реплик |
## Доказательства критериев
Актуальный итог — повтор всех уровней после кэширования SQL в таблице «Повтор проверок
после оптимизации» ниже и [revalidation](evidence/track1-sqlalchemy/revalidation/commands.txt).
Следующие две таблицы сохраняют отдельное закрытие уровней «3»/«4» **до оптимизации**;
их числа относятся только к названным SHA. Старый raw asyncpg явно отделён в
[индексе evidence](evidence/README.md) и не доказывает текущую производительность.
Проверки уровня «3» до оптимизации выполнены 2026-11-05 на `0a1f48bd73e5780c732356880c23fdb476bcff98`.
Стенд — `mtusi2026lab3-grade3-final-20261105`, LB `127.0.0.1:18083`, статистика `23083`;
`BASE_URL` автоматически определяется Makefile. Даты, команды, коды завершения и SHA — в `evidence/`.
| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства |
| --- | --- | --- | --- |
| Публичный smoke | make test | TODO | TODO |
| Остальные пункты уровня 3 | TODO | TODO | TODO |
| Все пункты уровня 4, если заявлен | TODO | TODO | TODO |
| Выбранный трек 5, если заявлен | TODO | TODO | TODO |
| **3.1** Документированный запуск, ≥2 API, общая БД и сессии, одна точка входа | `make up`; `make stack-evidence` | Новые пустые volumes; `migrate` завершился с 0, версия `0002_idempotency_keys`; обе API healthy/UP, один PostgreSQL и Valkey; API без опубликованных портов, только LB на 18083/23083; `container_name` отсутствует | `evidence/grade3-start.txt`, `evidence/stack.txt`, `evidence/environment.txt` |
| **3.2** Один токен работает через разные реплики | `make lb-check` | 40 GET: `1b4a73f61b07` и `8ffe0c70f4ea` по 20 ответов; hostname совпадают с двумя контейнерами | `evidence/grade3-lb-check.txt` (актуальный `lb-check.json` повторно снят на этапе grade4), `evidence/stack.txt` |
| **3.3** Остановка любой одной реплики, чтение/запись ≤10 с | `make test-failover ACTION_SCRIPT=scripts/stop-one.sh`; `docker compose ps -a`; `make restore`; сдвиг round robin и повтор | По очереди остановлены `api-1` (`8ffe0c70f4ea`) и `api-2` (`1b4a73f61b07`), обе с `Exited (0)`; сосед продолжал работать. Первая запись после хука через 2.762 / 2.817 с, 129 / 128 успешных записей, 0 / 0 ошибок, по 2 наблюдаемых реплики; история подтверждённых сообщений сохранена | `evidence/failover-current-1.txt`, `evidence/failover-current-2.txt`, `evidence/grade3-restore-1.txt`, `evidence/grade3-restore-2.txt` |
| **3.4** Конкурентный одинаковый ключ и смена реплики | `make lb-check` | 20 раундов × 8 POST: 160 ответов 201, по 80 от каждой реплики; 20/20 одинаковых тел, одна копия в истории, другой body → 409 | `evidence/grade3-lb-check.txt` (актуальный `lb-check.json` повторно снят на этапе grade4) |
| **3.4** Безопасный повтор неподтверждённой записи | `make retry-check` | При блокировке чата 1.5 с клиент прекращает ожидание через 0.5 с. Повтор с тем же ключом на другой реплике: 201 с первой попытки, одна копия и тот же ID. Оба варианта — живая реплика и `docker kill` ожидающей реплики — прошли; повтор через 1.539 / 1.551 с | `evidence/retry.json`, `evidence/grade3-retry.txt` |
| **3.5** Публичный smoke, persistence и failover | `make test`; `make persistence-evidence` (вызывает `make test-persistence ACTION_SCRIPT=scripts/restart.sh`); два failover выше | Все PASS. При persistence прежний токен и история сохранились, IDs контейнеров те же, StartedAt у lb, обеих API, postgres, valkey и migrate обновились | `evidence/smoke.txt`, `evidence/persistence.txt`, `evidence/grade3-persistence.txt`, `evidence/failover-current-*.txt` |
| Перенос lab2: миграции, схема и повтор без изменения данных | `make up` на пустых volumes; `make storage-evidence` | PK/FK/UNIQUE/CHECK и индексы показаны в схеме; Alembic head `0002_idempotency_keys`. Повтор миграций: код 0, до/после 70 users, 24 sessions, 6 chats, 12 members, 284 messages и 284 keys, 1 строка версии | `evidence/schema.txt`, `evidence/migrations.txt`, `evidence/grade3-storage.txt` |
| Перенос lab2: KDF, сессии, секреты | `make storage-evidence`; `make test`; `make test-faults` | Все 70 паролей — Argon2id, 24 хеша токенов по 32 байта; секреты и .env не отслеживаются Git. Basic/Bearer, logout 204 → 401 и абсолютный TTL сохраняются | `evidence/kdf.txt`, `evidence/secrets.txt`, `evidence/smoke.txt`, `evidence/faults.txt` |
| Перенос lab2: отказы PostgreSQL/Valkey | `make test-faults` | 12 passed. PostgreSQL недоступен → 503 за ≤0.014 с, live внутри API 200; после старта ready через 2.0 с, прежний токен 200, 40 новых регистраций 201 через обе реплики без рестарта API. Valkey обходится для проверки сессии, logout при отказе 503 и после возврата 204 | `evidence/faults.txt` |
| Негативные случаи и заголовки, гонки, миграции | `make student-test PYTEST_ARGS=-vv` | 271 passed, 12 deselected (стендовые тесты запущены отдельно). Включены X-Instance-Id/X-Request-Id на ошибках, ключи/доступ/TTL, 22 миграционных теста и первый POST после закрытия соединения | `evidence/student-tests.txt` |
| Контракт, OpenAPI, форматирование и типы | `make check`; `make validate`; `make lint`; `uv lock --check`; `openspec validate --all --strict` | Все успешно; 107 файлов соответствуют формату. Diff нормативных файлов против upstream пуст | `evidence/checks.txt` |
| Остановка без удаления данных | `make down`; `docker compose ps -a`; `docker volume ls --filter label=…` | Контейнеров этапа нет; оба volumes финального и исходного прогонов сохранены | `evidence/grade3-stop.txt`, `evidence/grade3-initial-stop.txt` |
TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены.
**Уровень «4» до оптимизации подтверждён на SQLAlchemy**, код `252e3e3ffeea5004cfd9dc342e686af1417a77a2`.
Проект `mtusi2026lab3-grade4-20261105`, порты `18083/23083`; запуск и версии — `grade4-start.txt`.
Старые замеры raw asyncpg доступны через `git show 72a1e57:evidence/<имя>`.
Нагрузка — k6 open model из `edge` в `lb:8080`: 100 запросов/с, 80 % отправок сообщений,
20 % чтений истории, 20 пользователей и 10 чатов, прогрев 10 с, замер 60/90 с.
Отдельный зонд пишет каждые 0,1 с; после ошибки повторяет тот же ключ, после прогона читает
все страницы своего чата и сверяет тела Message. Время восстановления теперь считается
по завершению успешного ответа после последней ошибки; отсутствие такого ответа, дубли,
потери, dropped iterations или отсутствующая статистика LB делают прогон неуспешным.
14 регрессионных тестов покрывают эти случаи. В итоговых прогонах ошибок зонда нет,
поэтому recovery_s = 0; время первого успешного ответа после начала действия указано отдельно.
| Критерий README | Команда | Наблюдение | Доказательство |
| --- | --- | --- | --- |
| **4.1** Readiness, SIGTERM и таймауты | `make student-test PYTEST_ARGS='-v -s student-tests/api/test_drain.py student-tests/unit/test_timeouts.py'` | 3 passed. LB 10 с > запрос 8 с > acquire+SQL 3 с; drain 2 с > обнаружение 1,5 с; shutdown 6 с < hook 7 с < grace 8 с. Настоящий gunicorn: ready/live 503/200, принятый запрос 201, зависший 503 с обоими заголовками; тестовое окно 1 с, порт закрыт через 1,05 с, выход через 2,44 с | `evidence/grade4-drain.txt` |
| **4.1** Обнаружение отказа | `make detection` | 12/12 PASS; SIGTERM 1,069–1,266 с, kill 0,886–0,934 с, pause 2,778–3,215 с, PostgreSQL 1,196–1,263 с. Все в пределах формулы без допуска; SIGTERM исключён до конца остановки | `evidence/grade4-detection.txt`, `evidence/detection/` |
| **4.2** Каждая реплика под нагрузкой | `make failover-each RATE=100` | Два прогона, по 6001 запросу, 0 ошибок и dropped; конкретная реплика Exited (0), сосед healthy; исключённая реплика не обслуживает зонд, после restore возвращается; история полностью совпадает | `evidence/grade4-failover-each.txt`, `evidence/failover-each/<hostname>/action.txt`, `result.json`, `probe.csv`, `lb_up.csv`, `k6/` |
| **4.2** Общая идемпотентность | `make lb-check` | 20 × 8 параллельных POST: 160 × 201, по 80 от каждой реплики; 20/20 одинаковых тел, единственных копий и конфликтов другого body | `evidence/grade4-baseline.txt`, `evidence/lb-check.json` |
| **4.3** Лимиты и изоляция | `make limits`; `docker inspect` во время k6 | CPU/MiB: API 1/512 на реплику, LB 1/128, PostgreSQL 2/1024, Valkey 0,5/128, migrate 0,5/256, k6 2/512. Лимиты реально применены; только LB публикует порты на loopback, API read_only и без container_name; secrets/volumes/сети соответствуют политике | `evidence/limits.txt`, `evidence/grade4-runtime-limits.txt` |
| **4.3** Отрицательная проверка политики | `scripts/limits.py` с override из лога | Все 5 нарушений обнаружены, ожидаемый exit 1; конфигурация не применялась к стенду | `evidence/grade4-limits-negative.txt`, `evidence/limits-violations.txt` |
| **4.4** Поочерёдная замена | `make rolling-update RATE=100`; `make rolling-update FROM_REV=7fc911c RATE=100` | В обоих прогонах минимум 2 UP, по 9001 запросу, 0 ошибок/dropped, 913/913 сообщений зонда сохранены; после действия отвечают только новые контейнеры. Старые/новые image ID записаны для каждой замены | `evidence/grade4-rolling*.txt`, `evidence/rolling/`, `evidence/rolling-from-7fc911c/` |
| **4.4** Один migrate и совместимость | `scripts/rolling-update.sh`; повтор `make migrate` | В каждом action.txt один migrate перед первой заменой. Обе версии SQLAlchemy используют ту же схему Alembic; повтор upgrade head не меняет версию и счётчики таблиц | `evidence/rolling/action.txt`, `evidence/rolling-from-7fc911c/action.txt`, `evidence/grade4-migration-repeat.txt` |
Измерения поочерёдного отказа:
| Остановленный hostname | RPS | p50/p95/p99, мс | Обнаружение, с | Первый успешный ответ, с | Возврат в LB от начала действия, с | Подтверждено = в истории |
| --- | --- | --- | --- | --- | --- | --- |
| `7cfd91ddf780` | 100.02 | 2.97/3.86/4.47 | 0.884 | 0.023 | 14.885 | 645 = 645 |
| `5bbf259ff136` | 100.02 | 2.98/3.88/4.53 | 1.498 | 0.111 | 14.990 | 642 = 642 |
Возврат включает намеренные 10 с без реплики и её запуск; это не перерыв доступности записи.
Счётчики LB `wretr/wredis/econ/eresp/hrsp_5xx` равны нулю в обоих отказах и обоих rolling update.
Опрос LB под нагрузкой — каждые 100 мс; более короткий провал таким измерением не исключается.
| Rolling update | RPS | p50/p95/p99, мс | Действие, с | Первый успешный ответ, с | Минимум UP |
| --- | --- | --- | --- | --- | --- |
| Сборка `252e3e3` | 100.01 | 3.01/3.89/4.53 | 10.734 | 0.055 | 2 |
| `7fc911c` → `252e3e3` | 100.01 | 2.99/3.85/4.47 | 13.836 | 0.082 | 2 |
**Ограничение миграционного доказательства:** `7fc911c` — предыдущая SQLAlchemy-версия до исправления
восстановления пула, с той же схемой `0002_idempotency_keys`. Миграция в rolling update — no-op.
Это подтверждает однократный запуск и совместную работу версий на существующей схеме, но не произвольный DDL
под нагрузкой. Будущие миграции требуют expand/contract и отдельной проверки совместимости.
Подготовительная установка старого образа выполняется до запуска нагрузки; непрерывность гарантируется
измеренным окном поочерёдной замены. Новый image ID той же сборки может отличаться из-за аттестации BuildKit.
Публичные сценарии после замены, итоговые проверки и остановка — `evidence/grade4-public.txt`,
`grade4-checks.txt`, `grade4-student-tests.txt`, `grade4-stop.txt`.
Повтор persistence в `grade4-persistence-scoped.txt` фиксирует неизменные IDs и обновлённые StartedAt
всех шести контейнеров. Полный набор собственных тестов — 285 passed, 12 deselected (stack).
Неуспешный smoke через системный прокси, прерванный detection, первоначальные ошибки форматирования
и некорректная отрицательная Compose-fixture сохранены; причины и итоговые повторы перечислены
в `evidence/README.md`. Эти попытки не считаются PASS.
**Трек 1 «Цена масштабирования» на SQLAlchemy.** Полная методика и ограничения — ниже;
поля сырья и происхождение образов — `evidence/track1-sqlalchemy/README.md`.
| Критерий трека README | Команда/сценарий | Наблюдение | Файл доказательства |
| --- | --- | --- | --- |
| Методика и гипотеза | `make track1` (цели выполнены последовательно) | 135 основных точек, ≥3 повтора; собственный Compose project, снимок хоста; история попыток сохранена | `{host.txt,README.md,baseline-run.txt,comparison-run.txt,corrected-cpus-run.txt}` |
| 1/2/4 реплики при фиксированных CPU/RAM | `make track1-a` | 4 CPU/2 GiB: пики 2687/2532/2422 RPS; SLO по сетке 2020 у всех | `series-a/summary.csv`, `plots/series-a-*.png` |
| Рост ресурсов | `make track1-b` | 1→2→4→8 CPU: пики 751→1307→2422→3420; на 8 CPU эффективность 56.9% от линейной | `series-b/summary.csv`, `plots/scaling.png` |
| Saturation point и предел масштабирования | `make track1-control`; CPU-рецепт повторён после исправления порядка | API достигает CPU-квоты; на 8×1 растут Lock и очередь. Пул 16 снижает RPS на 13.7%, maxconn64 тоже хуже; 8×0.5 медленнее 4×1 на тех же CPU | `control-{pool,cpus}/summary.csv`, `plots/utilisation.png` |
| Подтверждённое улучшение | `make track1-compare` | 2400 rps: p95 14.28→4.63 мс, CPU −29.3%; 5400 rps: успешные RPS 3629→3946 (+8.7%); min–max не пересекаются | `compare/summary.csv`, `plots/compare-*.png` |
| Исходные данные и графики | `make plots`; скрипт аудита в `audit.txt` | 12 PNG, capacity.csv/md; 135 точек сверены с k6 JSON и реальными image/CPU/RAM/cpuset | `plots/`, каталоги сырых прогонов, `audit.txt` |
Все пути таблицы — относительно `evidence/track1-sqlalchemy/`. Исходные 12 CPU-контролей с неверным
порядком и промежуточные неуспехи сохранены в `evidence/track1-sqlalchemy/diagnostics/`.
**Повтор проверок после оптимизации — код `3fb741e`.** API идентичен `57744c5`,
образ SQLAlchemy 2.0.45 с активным compiled cache проверен внутри контейнера до и после rolling.
Команды и коды завершения — `evidence/track1-sqlalchemy/revalidation/commands.txt`;
это итоговые проверки поведения API; предыдущие доказательства уровней «3»/«4» сохранены
как история последовательного закрытия критериев.
| Проверка | Команда | Результат | Файл внутри `track1-sqlalchemy/` |
| --- | --- | --- | --- |
| Контракт и тулчейн | `make check validate lint`; `uv lock --check`; `make student-test` | PASS; 290 passed, 12 deselected | `revalidation/commands.txt` |
| Публичные сценарии | `make test`; `make test-persistence ACTION_SCRIPT=scripts/restart.sh`; `make test-failover ACTION_SCRIPT=scripts/stop-one.sh` | PASS; прежний токен и подтверждённая история сохранены; остановленная реплика видна в `docker compose ps -a`, выполнен restore | `revalidation/commands.txt` |
| Ограничения и повторы | `scripts/limits.py`; `scripts/probe.py check --rounds 20`; `scripts/probe.py retry` | PASS; 160 ответов 201 без дублей, обе реплики; потерянный ответ и kill — оба PASS | `revalidation/{limits.txt,lb-check.json,retry.json}` |
| Обнаружение, три повтора | `sh scripts/detection.sh <out>` | 12/12 PASS: SIGTERM 0.899–1.326 с; kill 0.273–0.795 с; pause 2.783–3.281 с; PostgreSQL 1.201–1.255 с | `revalidation/detection/run{1,2,3}/` |
| Каждая реплика под 100 rps | `sh scripts/failover-each.sh <out>` | d4dfe6128c9d: 6001 запрос, p95 4.39 мс; a855a190991a: 6000, p95 4.33 мс. 0 ошибок/dropped, по 661 подтверждённому сообщению, история точна; Exited и живой сосед в action.txt | `revalidation/failover-each/` |
| Rolling baseline → cached | `probe.py load --expect replace --duration 90 -- scripts/rolling-update.sh` | 9001 запрос, p95 4.18 мс, 0 ошибок/dropped; min UP=2, один migrate; 938 сообщений сохранены без дублей | `revalidation/rolling/` |
| Отказы зависимостей | `make test-faults`; финальный `make test` | 12 passed; smoke PASS | `revalidation/commands.txt` |
| Безопасная остановка | `docker compose --profile bench down` только своего project | Все контейнеры проекта удалены, оба volumes сохранены | `stop.txt` |
После полного прогона исправлен только формат журналов подготовки (`55b99a2`):
`.txt` с датой/SHA вместо игнорируемого `.log`. В сохранённом сырье было три ошибки
`LB unhealthy` до запуска k6; повтор compose и ожидание UP завершились успешно.
Дополнительные 290 тестов и smoke прошли, стенд снова остановлен с сохранением volumes
(`diagnostics/setup-log-fix-checks.txt`). Финальный аудит — `final-audit.txt`.
**Финализация отчёта — 2026-11-06.** Изменены только документы и журнал их проверки,
основа — `f591fa64e525679a31c9db7f942d36c789e1a12f`. Повторены `make check`,
`make validate`, `make lint`, `make student-test` (290 passed, 12 deselected),
`uv lock --check`, `openspec validate --all --strict` (14 passed):
[журнал](evidence/report-checks.txt). Стендовые 12 тестов и нагрузка относятся к
revalidation выше; на этапе report они не запускались повторно.
[Аудит](evidence/report-audit.txt) проверяет ссылки, исходные метрики, версии кода
и неизменность нормативных файлов. Публикаций и отправок Telegram не было.
## Эксперименты и отказы
TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения.
Итоговый код API после оптимизации (`3fb741e`, API идентичен `57744c5`), k6 100 rps.
В каждом failover реально остановленный контейнер и работающий сосед показаны в `action.txt`
рядом с `result.json`. «Первый ответ» отсчитывается от начала действия и не является
временем простоя: ошибок зонда не было, измеренный `recovery_s=0`.
| Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных |
| Сценарий | RPS; p95/p99, мс | Обнаружение / первый ответ / возврат, с | Ошибки k6 / зонда; dropped; потери / дубли | Evidence |
| --- | --- | --- | --- | --- |
| Остановка `a855a190991a` | 100.00; 4.33/5.15 | 1.018 / 0.058 / 14.480 | 0 / 0; 0; 0 / 0, история 661 = 661 | [result](evidence/track1-sqlalchemy/revalidation/failover-each/a855a190991a/result.json), [контейнеры](evidence/track1-sqlalchemy/revalidation/failover-each/a855a190991a/action.txt) |
| Остановка `d4dfe6128c9d` | 100.02; 4.39/5.23 | 1.145 / 0.096 / 16.127 | 0 / 0; 0; 0 / 0, история 661 = 661 | [result](evidence/track1-sqlalchemy/revalidation/failover-each/d4dfe6128c9d/result.json), [контейнеры](evidence/track1-sqlalchemy/revalidation/failover-each/d4dfe6128c9d/action.txt) |
| Rolling baseline → cached | 100.01; 4.18/5.16 | первый ответ 0.037; действие 11.160; минимум 2 UP | 0 / 0; 0; 0 / 0, история 938 = 938 | [result](evidence/track1-sqlalchemy/revalidation/rolling/result.json), [замены и migrate](evidence/track1-sqlalchemy/revalidation/rolling/action.txt) |
Возврат реплики включает намеренные 10 с в остановленном состоянии. Отсутствие ошибок
в этих окнах не гарантирует отсутствия более коротких провалов между запросами зонда.
Публичный failover отдельно подтвердил 131 запись, 0 ошибок и первую запись после хука
через 2.624 с; persistence сохранил прежнюю сессию и историю
([журнал](evidence/track1-sqlalchemy/revalidation/commands.txt)).
История уровня «3» **до оптимизации**, код `0a1f48b`; все числа ниже взяты из указанных файлов.
| Сценарий | Наблюдение | Сохранность и возврат | Evidence |
| --- | --- | --- | --- |
| TODO | TODO | TODO | TODO |
| Остановка api-1 | 129 записей, 0 ошибок; первая запись после хука через 2.762 с | История без дублей, api-2 работает, api-1 Exited (0), затем восстановлена | `failover-current-1.txt`, `grade3-restore-1.txt` |
| Остановка api-2 | 128 записей, 0 ошибок; первая запись после хука через 2.817 с | История без дублей, api-1 работает, api-2 Exited (0), затем восстановлена | `failover-current-2.txt`, `grade3-restore-2.txt` |
| Потерянный ответ и kill | Таймаут клиента 0.5 с при блокировке чата 1.5 с; повтор через соседа 201 | Одна копия, одинаковый ID; оба варианта pass | `retry.json`, `grade3-retry.txt` |
| Полный restart | StartedAt всех сервисов обновились, IDs прежние | Старая сессия и история сохранились | `persistence.txt` |
| PostgreSQL остановлен | 503 за ≤0.014 с, live внутри API 200; LB исключил реплики ещё через 0.86 с | После запуска ready через 2.0 с; 40 регистраций через 2 реплики без рестарта API | `faults.txt` |
| Valkey остановлен | Живой токен 200, неизвестный 401; logout 503 | После запуска logout 204; рестарт Valkey сохраняет отзыв | `faults.txt` |
| Повтор Alembic | Код 0, head не меняется | Все счётчики строк до и после равны | `migrations.txt`, `grade3-storage.txt` |
Первый прогон не был успешным: `grade3-faults.txt` содержит 11 passed / 1 failed — регистрация получила
503 после возврата PostgreSQL. `grade3-pool-regression-before.txt` воспроизводит закрытое простаивающее
соединение; `pool_pre_ping` устранил ошибку (`grade3-pool-regression-after.txt`, итоговый `student-tests.txt`).
Полный набор также был прерван на коллизии порта тестового gunicorn с LB (46 passed,
`grade3-student-tests-interrupted.txt`), затем упал при старте тестовой БД (70 passed / 201 errors,
полный обезличенный вывод сжат в `grade3-student-tests-startup.txt.gz`). Исправлены изоляция порта,
дедлайн ожидания и повтор временного SQLSTATE 57P03. После исправлений итоговые 271 собственный
и 12 стендовых тестов прошли. Публичные проверки не менялись.
### Трек 5 — трек 1 «Цена масштабирования» на SQLAlchemy
Все текущие результаты лежат в `evidence/track1-sqlalchemy/`. Baseline API —
`5c8f605cd3bd40245109348463d3e7111379b2d3`, после оптимизации —
`57744c532c58d3e2bd248b4368ecba0a42402ed8`. В обоих SQLAlchemy 2.0.45, asyncpg — драйвер,
pre-ping и явный COMMIT включены. SHA обвязки A/B — `05d69ba`, сравнения/пула — `57744c5`, CPU-контроля — `07965a2`;
`metadata.json` каждой точки хранит фактический image ID и CPU/RAM/cpuset контейнеров.
`baseline-run.txt` и `comparison-run.txt` содержат команды и все итоговые строки.
Исторический `evidence/track1/` не входит ни в текущие таблицы, ни в графики.
**Гипотеза.** Компиляция неизменного CTE отнимает CPU API. Её кэширование должно снизить
p95 или повысить успешные RPS без изменения SQL, ресурсов и контракта. Дополнительные
реплики не снимают сериализацию горячего чата и ожидание COMMIT. Гипотеза и методика
зафиксированы до основных серий в `remeasure-lab3-scaling` (коммит `74a39fa`).
**Отличие от старых измерений.** Исторический raw asyncpg после перехода на CTE
(`22f0e62`, `evidence/track1/plots/capacity.csv`, compare/after/8×1) показывал пик
4894.23 RPS при 5400 предложенных. Нынешний SQLAlchemy после кэширования — 3945.63.
Это разные даты, объёмы БД и программные пути: теперь есть pre-ping, SQLAlchemy session
и явный COMMIT. Разница не является изолированным замером стоимости ORM; старое
`idle in transaction ≈0` к новому пути неприменимо. Подтверждение нового улучшения
берётся только из чередующегося SQLAlchemy before/after, приведённого ниже.
**Методика.** Последовательная открытая нагрузка k6: 80% POST с новым ключом, 20% GET
первой страницы (limit=50), 20 пользователей/10 чатов; 10 с прогрева и 30 с измерения,
5 с паузы, три повтора каждой точки. Итого 135 основных прогонов: A 54, B 36,
сравнение 18, пул/maxconn 15, CPU-контроль 12. Пилот по одному повтору — только диагностика. Ещё 12 первоначальных CPU-контролей
сгруппированы по конфигурациям из-за ошибки runner; они сохранены в
`diagnostics/ordered-control-cpus` и не входят в медианы. Ошибка закрыта регрессией
порядка; все 12 точек пересняты (`corrected-cpus-run.txt`).
До/после чередуются блоками интенсивностей внутри каждого повтора; контроли — baseline.
SLO: p95 ≤500 мс, ошибок ≤1%, dropped iterations ≤1% предложенных. Насыщение интенсивности
определяет большинство повторов; поиск останавливается после двух полностью насыщенных
интенсивностей подряд. «Пик» — максимум медианы успешных RPS; это не предел по SLO.
Граница SLO зависит от сетки: если прошла только первая точка, показывается ≥ этой точки.
Volumes сохранялись. Каждая точка использует новые синтетические чаты; размер БД
в основных сериях вырос с 33.2 до 4597.3 MiB. В измерительных окнах k6 завершил
8 271 783 запроса; это не количество сохранённых сообщений. Размер и оценка
n_live_tup записаны в summary. A: 1×4/2×2/4×1 при 4 CPU/2 GiB, 4 воркерах, суммарном пуле 32 и maxconn 128,
CPU 7–10. B: 1→2→4→8 по 1 CPU/512 MiB, 4×1 берётся из A. Общие зависимости неизменны:
PG 2 CPU/1 GiB, CPU 0–1; LB 1 CPU/128 MiB, CPU 2; Valkey 0.5 CPU/128 MiB, CPU 3;
k6 3 CPU/1 GiB, CPU 4–6. PG max_connections=200, shared_buffers=256 MiB.
Подробные VU-лимиты, отбраковка помех и смысл полей — `evidence/track1-sqlalchemy/README.md`.
Таблицы ниже: медиана, в скобках min–max трёх повторов (не доверительный интервал);
CPU — проценты одного ядра.
**A: одинаковые ресурсы.**
| API | SLO, rps | Пик RPS (min–max) | При нагрузке | p95 при 2020, мс | CPU API / PG / LB на пике | Lock / idle transaction на пике |
| --- | --- | --- | --- | --- | --- | --- |
| 1x4 | 2020 | 2687.13 (2686.43–2691.07) | 4560 | 5.86 | 409.4 / 92.7 / 22.4 | 1.33 / 17.50 |
| 2x2 | 2020 | 2531.80 (2520.70–2536.67) | 3040 | 9.36 | 408.1 / 89.1 / 21.6 | 1.69 / 16.81 |
| 4x1 | 2020 | 2421.57 (2418.07–2431.50) | 3040 | 73.27 | 406.7 / 86.2 / 21.3 | 1.69 / 16.81 |
Дробление четырёх воркеров на отдельные контейнеры снизило пик при том же бюджете.
API упирается в CPU-квоту; превышение 400% в коротких сэмплах — погрешность окна учёта,
не изменение лимита. В PostgreSQL много соединений находятся в `idle in transaction`: сервер ждёт клиента
внутри транзакции. У записи сюда входит промежуток до COMMIT, но агрегированные
сэмплы не разделяют POST, GET, readiness и другие транзакционные паузы. Здесь рост
числа реплик не добавляет ресурсов.
**B: рост ресурсов.**
| API | SLO, rps | Пик RPS (min–max) | Ускорение / эффективность | CPU API / лимит | CPU PG / лимит | Lock / idle transaction / пул | Очередь LB max |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1x1 | 680 | 750.93 (732.07–754.07) | 1.00× / 100.0% | 100.9 / 100 | 23.0 / 200 | 0.00 / 4.63 / 8 | 576 |
| 2x1 | 900 | 1306.80 (1276.80–1311.90) | 1.74× / 87.0% | 202.7 / 200 | 43.5 / 200 | 0.12 / 9.00 / 16 | 475 |
| 4x1 | 2020 | 2421.57 (2418.07–2431.50) | 3.22× / 80.6% | 406.7 / 400 | 86.2 / 200 | 1.69 / 16.81 / 32 | 872 |
| 8x1 | ≥2400 | 3420.37 (3375.80–3531.67) | 4.55× / 56.9% | 776.5 / 800 | 161.9 / 200 | 29.62 / 16.15 / 64 | 744 |
От 4 к 8 CPU прирост пика только 1.41× при удвоении ресурсов. На 8×1 рост предложения
с 3600 до 5400 не повышает throughput: медиана падает с 3420.37 до 3241.63 RPS.
При 3600 API использует 776.45/800% CPU; около 30 соединений ждут блокировку и 16 —
приложение в транзакции. PostgreSQL использует 161.91/200%, LB — 38.67/100%.
Это совместное ограничение CPU приложения и сериализации записи в общую БД;
очередь LB здесь следствие занятых API, а не доказательство насыщения CPU балансировщика.
Среднее CPU БД ниже квоты; из него нельзя ни доказать, ни исключить кратковременное
исчерпание CPU. Единственный предел в виде CPU PostgreSQL этими данными не доказан.
**Контроль общего пула и maxconn.** 8×1, 5400 предложенных запросов/с, по три повтора;
меняется один параметр. pool8 соответствует maxconn32 по умолчанию.
| Вариант | Успешные RPS (min–max) | p95, мс (min–max) | Lock / соединения | CPU API / PG | Очередь LB max | Ошибки |
| --- | --- | --- | --- | --- | --- | --- |
| pool4 | 3755.60 (3747.60–3762.47) | 351.94 (348.29–354.25) | 5.12 / 32 | 796.5 / 148.5 | 744 | 0.000% |
| pool8 | 3767.60 (3765.60–3778.90) | 348.45 (347.57–348.72) | 27.96 / 64 | 794.2 / 166.9 | 744 | 0.000% |
| pool16 | 3251.60 (3123.70–3266.63) | 429.03 (423.43–439.26) | 83.19 / 128 | 698.0 / 176.3 | 744 | 0.011% |
| maxconn16 | 3839.67 (3657.77–3884.13) | 329.99 (319.33–365.15) | 30.62 / 64 | 785.8 / 168.4 | 872 | 0.000% |
| maxconn64 | 3657.33 (3484.53–3671.03) | 405.58 (405.26–424.99) | 28.12 / 64 | 786.8 / 166.4 | 488 | 0.000% |
Пул 4 не улучшил throughput (3755.60 против 3767.60), но уменьшил ожидания Lock
с 27.96 до 5.12. Пул 16 снизил throughput на 13.7% с непересекающимися диапазонами,
увеличил Lock до 83.19/128 и дал 0.009–0.016% HTTP-ошибок в перегрузке. Увеличение
пула не снимает ограничение: оно добавляет конкурентов за те же чаты. maxconn=16
имеет более высокую медиану, но интервал 3657.77–3884.13 пересекает default;
улучшение не подтверждено. maxconn=64 хуже default, интервалы не пересекаются.
Увеличение допустимой конкуренции LB не помогает; CPU LB 33–39% квоты не насыщен.
Уменьшение maxconn после оптимизации не проверялось, поэтому default не менялся.
**Контроль числа процессов.** 4×1 и 8×0.5 закреплены за теми же CPU 7–10 и имеют
одинаковые 4 CPU/2 GiB. С ростом числа процессов растёт суммарный пул (32→64);
поэтому это контроль размещения и совокупной цены дробления, не изолированный эффект
только числа Python-процессов.
| Нагрузка | API | Успешные RPS (min–max) | p95, мс (min–max) | CPU API | Lock / idle transaction |
| --- | --- | --- | --- | --- | --- |
| 3040 | 4x1 | 2279.83 (2215.27–2332.03) | 556.14 (529.62–573.94) | 407.5 | 1.52 / 16.74 |
| 3040 | 8x0.5 | 1931.63 (1900.13–1945.90) | 728.93 (709.88–731.17) | 399.9 | 24.19 / 22.96 |
| 4560 | 4x1 | 2260.57 (2253.10–2279.93) | 554.99 (553.64–560.44) | 409.1 | 1.88 / 17.42 |
| 4560 | 8x0.5 | 1977.63 (1915.00–2004.40) | 722.17 (692.71–744.52) | 399.0 | 27.31 / 21.65 |
При обеих интенсивностях диапазоны RPS не пересекаются: 8 реплик по 0.5 CPU
медленнее четырёх по 1 CPU. Различие нельзя объяснить другим набором vCPU: он
одинаков. Отдельный вклад CFS, числа процессов и увеличенного пула этим опытом
не разделён; объяснение только «другие физические ядра» недостаточно.
**Подтверждённое улучшение.** PostgreSQL Insert с ON CONFLICT не создаёт обычный cache key.
`POST_MESSAGE = lambda_stmt(post_message, enable_tracking=False)` задаёт постоянный ключ
статического дерева; все пользовательские значения остаются явными bindparam при execute.
SQL, индексы и транзакция не изменились; состояние сессий и сообщений не кэшируется.
`diagnostics/compilation.txt` проверяет идентичный SQL и одну запись compiled cache.
Его локальный микробенчмарк не является измерением HTTP throughput.
| Нагрузка | Вариант | Успешные RPS (min–max) | p95, мс (min–max) | p99, мс | CPU API / PG | Lock / idle transaction | Dropped |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 2400 | before | 2400.03 (2400.00–2400.03) | 14.28 (10.28–14.38) | 63.16 | 573.2 / 99.8 | 1.19 / 3.96 | 0.00% |
| 2400 | after | 2400.03 (2400.00–2400.03) | 4.63 (4.43–5.14) | 14.20 | 405.2 / 94.2 | 0.07 / 2.67 | 0.00% |
| 3600 | before | 3562.00 (3560.20–3581.90) | 223.99 (155.14–238.00) | 283.23 | 774.4 / 159.6 | 26.46 / 15.08 | 1.05% |
| 3600 | after | 3587.40 (3566.83–3587.60) | 101.01 (76.11–210.49) | 156.31 | 593.0 / 150.0 | 10.23 / 8.42 | 0.35% |
| 5400 | before | 3629.17 (3169.57–3665.47) | 373.74 (362.79–538.35) | 480.28 | 775.0 / 167.7 | 29.35 / 16.04 | 32.79% |
| 5400 | after | 3945.63 (3923.97–3970.43) | 317.43 (310.83–318.15) | 415.68 | 614.4 / 175.8 | 41.56 / 11.54 | 26.93% |
При 2400 rps p95 снизился в 3.08 раза, CPU API — на 29.3%.
Диапазоны p95 до/после не пересекаются: эффект больше разброса повторов и удовлетворяет
критерию подтверждённого улучшения. При 5400 медиана throughput выросла на 8.7%: диапазоны 3169.57–3665.47
и 3923.97–3970.43 RPS также не пересекаются. Предел SLO по сетке: before ≥2400,
after 3600; при 3600 проходит один из трёх before и все три after. Интервалы p95
при 3600 пересекаются, поэтому доказательство превышения разброса основано на других
точках. У before в парном опыте результат выше, чем в серии B: сравнивать after
с более ранней B и приписывать всю разницу оптимизации было бы неверно.
Блокировка чата остаётся до COMMIT; `idle in transaction` не исчезает. После экономии CPU
ограничение сильнее смещается к конкуренции за общий чат и обработке транзакций PostgreSQL.
Изменение скомпилированного дерева проверено тестом изоляции пользователей/чатов/текстов,
гонками идемпотентности, TTL и rollback. Итоговая проверка контракта — в `revalidation/`.
**Графики и сырьё.** `make plots` пересчитывает `plots/capacity.csv`, `capacity.md` и 12 PNG
из пяти summary.csv. Усы throughput/p95/p99 — min–max, CPU — медианы с min–max; четыре точки B
дополнены описательной USL-кривой. Её коэффициенты не доказывают причину и модельный
оптимум не выдаётся за измеренную конфигурацию. Проверка сырья — `audit.txt`.
![Серия A](evidence/track1-sqlalchemy/plots/series-a-throughput.png)
![Серия B](evidence/track1-sqlalchemy/plots/series-b-throughput.png)
![Рост ресурсов](evidence/track1-sqlalchemy/plots/scaling.png)
![Загрузка звеньев](evidence/track1-sqlalchemy/plots/utilisation.png)
![До и после](evidence/track1-sqlalchemy/plots/compare-throughput.png)
![Контроль пула](evidence/track1-sqlalchemy/plots/control-pool-throughput.png)
![Контроль размещения](evidence/track1-sqlalchemy/plots/control-cpus-throughput.png)
**Ограничения и вывод.** Одна Docker VM, виртуальные CPU и два типа физических ядер M4 Max,
короткие окна, всего три повтора; тепловой режим и растущая база не полностью контролируются.
Порядок конфигураций A/B фиксирован, before всегда первый внутри парного повтора.
Сэмплы CPU получаются раз в 3–5 с из-за Docker CLI; память API — максимум одной реплики.
Успешные RPS делятся на 30 с, но k6 учитывает завершения в gracefulStop до 5 с: у перегрузки
есть пограничный эффект. Dropped iterations включают ограничение maxVUs, а не только сервер.
Профиль с 10 горячими чатами и первой страницей истории не обобщается на любое число чатов
или глубокую историю. EXPLAIN сохранён отдельно; custom plan с литералами не доказывает
форму generic prepared plan в рабочем запросе. Исторический asyncpg не является контролем.
Дробление API при фиксированном бюджете не ускорило работу; добавление ресурсов дало
сублинейный прирост, а после насыщения CPU и общей транзакционной части рост предложенной
нагрузки перестал помогать. Кэширование компиляции подтвердило практическое улучшение.
Эксперимент не доказывает, что любое увеличение числа реплик свыше восьми бесполезно:
такие конфигурации не измерялись. Для следующего улучшения нужны отдельные опыты
с числом горячих чатов и ограничением конкуренции, а не экстраполяция USL.
## Ответы на вопросы защиты
**Чем отказ процесса отличается от отказа узла?** Отказ процесса — это одна реплика: контейнер остановлен,
убит или завис, а host, LB, PostgreSQL и соседняя реплика работают. Его ловит проверка готовности LB, и
трафик уходит на соседа: `SIGTERM` — 0,899–1,326 с, `kill` — 0,273–0,795 с, зависание (`docker pause`) — 2,783–3,281 с по таймауту
проверки ([detection после оптимизации](evidence/track1-sqlalchemy/revalidation/detection/)),
в измеренном окне failover-each — 0 ошибок под 100 rps. Отказ узла
забирает всё, что на нём запущено, сразу: здесь узел один, поэтому вместе с репликами пропадают LB, PostgreSQL,
Valkey и volumes — отказ всего стенда, и никакая реплика его не переживёт. Кроме того, мёртвый узел не отвечает
`RST` и не закрывает соединения: обнаружение идёт только по таймаутам, как в сценарии `pause`, а не по отказу
соединения, как при `kill`. Защита от потери узла — несколько узлов и реплицированные LB и БД (трек 2) — в эту
работу не входит.
**Почему `depends_on`/`healthcheck` сами по себе не являются балансировщиком?** `depends_on` упорядочивает
только запуск: `migrate` ждёт `healthy` PostgreSQL, `api` — успешного завершения `migrate` и старта Valkey, один
раз, при `up`, и дальше ни на что не влияет. `healthcheck` лишь меняет статус контейнера в `docker ps`: у `api` он раз в 5 с с 3 повторами, то есть
`unhealthy` наступает через десяток секунд, и Compose ничего не делает с трафиком — встроенный DNS Docker
отдаёт адрес работающего контейнера независимо от его здоровья. Нет единой точки входа, распределения запросов,
повторов отказавшего соединения на соседа, мягкого вывода из ротации и ответа `503` в формате контракта, когда
готовых реплик нет. Всё это делает HAProxy: активная проверка `/health/ready` раз в 1 с с `fall 2`/`rise 2`,
round robin, `retry-on conn-failure` и `redispatch`. Пример — остановка PostgreSQL: контейнеры `api` продолжают
работать, а LB исключает обе реплики за 1,201–1,255 с и сам отвечает `503 unavailable`
(`evidence/track1-sqlalchemy/revalidation/detection/run*/postgres.json`).
**Какие POST можно повторять после timeout и что защищает Idempotency-Key?** Только `POST
/api/v1/chats/{chat_id}/messages` с тем же `Idempotency-Key` и тем же телом. Сообщение и квитанция ключа
фиксируются одной транзакцией, поэтому повтор после таймаута, обрыва или гибели реплики посреди запроса либо
находит квитанцию и получает тот же `201` с тем же `Message`, либо, если исходная запись не зафиксировалась,
создаёт сообщение один раз. Одновременные повторы через разные реплики сериализуются блокировкой строки чата:
160 × `201` и одна копия в каждом из 20 раундов ([lb-check](evidence/track1-sqlalchemy/revalidation/lb-check.json)).
Потерянный ответ воспроизведён на стенде
(`make retry-check`, [retry](evidence/track1-sqlalchemy/revalidation/retry.json)): запись ждёт блокировку строки чата дольше таймаута клиента, клиент повторяет её
с тем же ключом через LB — и когда реплика жива (она сама отвечает `201` уже без клиента), и когда её убили, пока
запрос ждал; в обоих случаях повтор получает `201` с тем же `id`, а в истории одна копия. Ключ не защищает от другого тела с тем же ключом
(`409`), от повтора через 24 ч и больше (`IDEMPOTENCY_TTL_SECONDS`, ключ начинается заново) и не отменяет
проверку сессии и доступа при повторе (`401`/`404`). `POST /users`, `POST /chats` и `POST /auth/sessions`
ключа не имеют: повтор после таймаута может создать второй чат или вторую сессию, поэтому их не повторяют ни
клиент, ни LB — в HAProxy `disable-l7-retry` для всего, кроме `GET` и сообщений с ключом; отказ соединения
повторяется для всех, потому что запрос до реплики не дошёл.
**Что сломается при увеличении числа API, если сессии находятся в локальной памяти?** При round robin без
привязки токен, выданный репликой A, неизвестен остальным: при N репликах доля `401` на действующий токен —
около (N−1)/N, и проверка «разные реплики без повторного входа» не проходит. Выход на реплике A не отзывает
токен на B — отозванная сессия продолжает работать. Остановка или рестарт реплики теряют её сессии, и failover и
persistence с прежним токеном падают. Sticky-сессии лишь маскируют это: при отказе реплики клиенты всё равно
теряют вход, а нагрузка распределяется неравномерно. Здесь сессии хранятся в PostgreSQL (только SHA-256
токена) с общим кэшем и отметками отзыва в Valkey: 40 запросов одним токеном — 20 + 20 по репликам
([lb-check](evidence/track1-sqlalchemy/revalidation/lb-check.json)), выход `204` → `401` → `401` через LB,
прежний токен живёт после рестарта всего стенда
([faults и persistence](evidence/track1-sqlalchemy/revalidation/commands.txt)). То же относится к ключам идемпотентности: в памяти реплики повтор через соседа
создал бы дубль.
## Ограничения и следующие шаги
TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза.
Трек переснят на SQLAlchemy; действуют ограничения методики из раздела трека.
Старые числа raw asyncpg не используются как текущая производительность.
- Один Docker-host: потеря host, LB или PostgreSQL — отказ всего стенда. LB и БД — единственные точки отказа;
их резервирование вне рамок лабы.
- Цель failover-теста выбирает round robin (кто обслужил первое сообщение); второй прогон сразу после первого
и `make restore` попадает в ту же реплику, поэтому перед ним нужен один запрос через LB:
`make failover-evidence SHIFT=1` или `curl -s -o /dev/null "http://$(docker compose port lb 8080)/health/live"`
перед `make test-failover` (так снят `failover-current-2.txt`).
- `X-Instance-Id` раскрывает короткий ID контейнера — допустимо до лабы 7, где появится непрозрачный alias.
- Таблица ключей растёт вместе с историей (строка на сообщение); истёкшие ключи только перезаписываются при
повторном использовании, фоновой очистки нет.
- Запись в один горячий чат сериализуется блокировкой строки чата; повтор с ключом берёт ту же блокировку.
В SQLAlchemy блокировка держится до явного COMMIT после одного изменяющего SQL-оператора — это
следующий потолок для горячих чатов (раздел трека).
- Окно вывода из ротации удлиняет каждую остановку реплики на 2 с; оно рассчитано на проверки LB раз в
секунду: при большем `inter` окно нужно увеличить (это ловит `test_timeouts.py`).
- Время обнаружения измерено тремя прогонами на сценарий; верхняя граница — формула по параметрам проверки.
Замер считается от запуска команды отказа и включает задержку docker CLI и период опроса статистики LB, поэтому
может превысить формулу на эту величину; допуск замера — 0,25 с. На текущем коде все 12 замеров в пределах
формулы без использования допуска (`evidence/track1-sqlalchemy/revalidation/detection/`).
- Rolling update проверен со сменой кода без смены схемы. Миграция, несовместимая с работающей версией
(удаление или переименование столбца), потребовала бы двух выпусков expand/contract; в лабе таких нет.
- `scripts/rolling-update.sh` и `restore.sh` используют `--no-recreate`: после замены с другим `API_IMAGE`
обычный `make up` пересоздаст реплики под текущий конфиг — это ожидаемо.
- Секреты лежат файлами в `secrets/` на хосте (каталог `0700`, файлы `0644`, чтобы их читали непривилегированные
пользователи контейнеров); это учебное упрощение вместо менеджера секретов.
- Кэширование компиляции уменьшило p95 и CPU API; для горячих чатов остаётся сериализация
транзакций. Вклад CFS отдельно не измерялся. Изменение числа чатов и настройка admission
control после оптимизации потребуют новых опытов, поэтому их эффект не заявляется.
+4
View File
@@ -0,0 +1,4 @@
[alembic]
script_location = %(here)s/alembic
prepend_sys_path = %(here)s/src %(here)s/alembic
path_separator = space
+81
View File
@@ -0,0 +1,81 @@
import asyncio
from alembic import context
from alembic.script import ScriptDirectory
from legacy import adopt_legacy
from sqlalchemy import Connection, func, make_url, pool, select
from sqlalchemy.ext.asyncio import create_async_engine
from messenger.identity.infrastructure.postgres import SessionRow, UserRow
from messenger.messaging.infrastructure.postgres import (
ChatMemberRow,
ChatRow,
IdempotencyKeyRow,
MessageRow,
)
from messenger.shared.config import PlatformSettings
LOCK_KEY = 20_260_002
MODELS = (UserRow, SessionRow, ChatRow, ChatMemberRow, MessageRow, IdempotencyKeyRow)
target_metadata = UserRow.metadata
config = context.config
def include_object(_obj, name, _type, _reflected, _compare_to):
return name != "schema_migrations"
def run_migrations(connection: Connection) -> None:
with connection.engine.connect() as lock:
lock.execute(select(func.pg_advisory_lock(LOCK_KEY)))
lock.commit()
try:
with connection.begin():
adopt_legacy(connection, ScriptDirectory.from_config(config))
context.configure(
connection=connection,
target_metadata=target_metadata,
transaction_per_migration=True,
compare_type=True,
include_object=include_object,
)
with context.begin_transaction():
context.run_migrations()
finally:
lock.execute(select(func.pg_advisory_unlock(LOCK_KEY)))
lock.commit()
async def run_async_migrations() -> None:
dsn = config.attributes.get("database_url")
if dsn is None:
dsn = PlatformSettings().database_url.get_secret_value()
engine = create_async_engine(
make_url(dsn).set(drivername="postgresql+asyncpg"),
poolclass=pool.NullPool,
hide_parameters=True,
connect_args={
"timeout": 10,
"server_settings": {"lock_timeout": "10000", "statement_timeout": "60000"},
},
)
try:
async with engine.connect() as connection:
await connection.run_sync(run_migrations)
finally:
await engine.dispose()
if context.is_offline_mode():
context.configure(
dialect_name="postgresql",
target_metadata=target_metadata,
literal_binds=True,
transaction_per_migration=True,
)
with context.begin_transaction():
context.run_migrations()
elif config.attributes.get("connection") is not None:
run_migrations(config.attributes["connection"])
else:
asyncio.run(run_async_migrations())
+88
View File
@@ -0,0 +1,88 @@
from uuid import uuid4
from alembic.migration import MigrationContext
from alembic.operations import Operations
from alembic.script import ScriptDirectory
from sqlalchemy import Connection, MetaData, Table, func, inspect, select, text
from sqlalchemy.schema import CreateSchema
LEGACY = {
"0001_init": "9a13618f078ae9056431391e2e5197a31b981ae1fff047a9b3421ac750d3fd0d",
"0002_idempotency_keys": "d9159a35553249a1e51af5f2e4e7c39b014e97593c49748e13f3799839063dd0",
}
SNAPSHOT = text("""
WITH relations AS (
SELECT c.* FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE n.nspname = :schema AND c.relkind IN ('r', 'p')
AND c.relname NOT IN ('schema_migrations', 'alembic_version')
)
SELECT 'table' AS kind, c.relname AS name,
concat_ws('|', c.relkind, c.relpersistence,
c.relrowsecurity, c.relforcerowsecurity) AS definition
FROM relations c
UNION ALL
SELECT 'column', c.relname || '.' || a.attname,
concat_ws('|', a.attnum, format_type(a.atttypid, a.atttypmod), a.attnotnull,
a.attidentity, a.attgenerated, a.attcollation::regcollation,
pg_get_expr(d.adbin, d.adrelid))
FROM relations c JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND NOT a.attisdropped
UNION ALL
SELECT 'constraint', c.relname || '.' || k.conname,
concat_ws('|', pg_get_constraintdef(k.oid), k.convalidated)
FROM relations c JOIN pg_constraint k ON k.conrelid = c.oid
UNION ALL
SELECT 'index', c.relname || '.' || x.relname,
concat_ws('|', pg_get_indexdef(i.indexrelid), i.indisvalid, i.indisready)
FROM relations c JOIN pg_index i ON i.indrelid = c.oid
JOIN pg_class x ON x.oid = i.indexrelid
UNION ALL
SELECT 'trigger', c.relname || '.' || t.tgname,
concat_ws('|', pg_get_triggerdef(t.oid), t.tgenabled)
FROM relations c JOIN pg_trigger t ON t.tgrelid = c.oid WHERE NOT t.tgisinternal
ORDER BY kind, name
""")
def snapshot(connection: Connection, schema: str) -> list[tuple[str, str, str]]:
return [
(kind, name, definition.replace(f"{schema}.", ""))
for kind, name, definition in connection.execute(SNAPSHOT, {"schema": schema})
]
def adopt_legacy(connection: Connection, scripts: ScriptDirectory) -> None:
migration = MigrationContext.configure(connection)
if migration.get_current_heads():
return
tables = set(inspect(connection).get_table_names(schema="public"))
if tables <= {"alembic_version"}:
return
if "schema_migrations" not in tables:
raise RuntimeError("Existing schema has no legacy migration journal")
journal = Table("schema_migrations", MetaData(), schema="public", autoload_with=connection)
applied = dict(connection.execute(select(journal.c.version, journal.c.checksum)).tuples().all())
expected = dict(list(LEGACY.items())[: len(applied)])
if applied != expected:
raise RuntimeError("Unknown or changed legacy migrations")
if not applied:
if tables - {"schema_migrations", "alembic_version"}:
raise RuntimeError("Existing schema has an empty migration journal")
return
revision = list(expected)[-1]
actual = snapshot(connection, "public")
reference = f"alembic_verify_{uuid4().hex}"
savepoint = connection.begin_nested()
try:
connection.execute(CreateSchema(reference))
connection.execute(select(func.set_config("search_path", reference, True)))
with Operations.context(MigrationContext.configure(connection)):
for script in reversed(list(scripts.walk_revisions(base="base", head=revision))):
script.module.upgrade()
wanted = snapshot(connection, reference)
finally:
savepoint.rollback()
if actual != wanted:
raise RuntimeError("Legacy schema differs from the recorded migrations")
migration.stamp(scripts, revision)
+16
View File
@@ -0,0 +1,16 @@
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade() -> None:
${upgrades if upgrades else "pass"}
def downgrade() -> None:
${downgrades if downgrades else "pass"}
+87
View File
@@ -0,0 +1,87 @@
import sqlalchemy as sa
from alembic import op
revision = "0001_init"
down_revision = None
branch_labels = None
depends_on = None
def upgrade() -> None:
op.create_table(
"users",
sa.Column("id", sa.Uuid(), nullable=False),
sa.Column("username", sa.Text(), nullable=False),
sa.Column("display_name", sa.Text(), nullable=False),
sa.Column("password_hash", sa.Text(), nullable=False),
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
sa.CheckConstraint("password_hash LIKE '$argon2id$%'", name="users_password_hash_check"),
sa.CheckConstraint("username ~ '^[a-z0-9_]{3,32}$'", name="users_username_format"),
sa.CheckConstraint(
"char_length(display_name) BETWEEN 1 AND 100", name="users_display_name_check"
),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("username", name="users_username_key"),
)
op.create_table(
"sessions",
sa.Column("token_hash", sa.LargeBinary(), nullable=False),
sa.Column("user_id", sa.Uuid(), nullable=False),
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
sa.Column("expires_at", sa.DateTime(timezone=True), nullable=False),
sa.CheckConstraint("expires_at > created_at", name="sessions_check"),
sa.CheckConstraint("octet_length(token_hash) = 32", name="sessions_token_hash_check"),
sa.ForeignKeyConstraint(["user_id"], ["users.id"], ondelete="CASCADE"),
sa.PrimaryKeyConstraint("token_hash"),
)
op.create_index("sessions_user_idx", "sessions", ["user_id"], unique=False)
op.create_table(
"chats",
sa.Column("id", sa.Uuid(), nullable=False),
sa.Column("title", sa.Text(), nullable=False),
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
sa.Column("last_message_at", sa.DateTime(timezone=True), nullable=True),
sa.CheckConstraint("char_length(title) BETWEEN 1 AND 100", name="chats_title_check"),
sa.PrimaryKeyConstraint("id"),
)
op.create_table(
"chat_members",
sa.Column("chat_id", sa.Uuid(), nullable=False),
sa.Column("user_id", sa.Uuid(), nullable=False),
sa.Column("position", sa.SmallInteger(), nullable=False),
sa.Column("chat_created_at", sa.DateTime(timezone=True), nullable=False),
sa.CheckConstraint("position BETWEEN 1 AND 100", name="chat_members_position_check"),
sa.ForeignKeyConstraint(["chat_id"], ["chats.id"], ondelete="CASCADE"),
sa.ForeignKeyConstraint(
["user_id"],
["users.id"],
),
sa.PrimaryKeyConstraint("chat_id", "user_id"),
)
op.create_index(
"chat_members_user_idx",
"chat_members",
["user_id", "chat_created_at", "chat_id"],
unique=False,
)
op.create_table(
"messages",
sa.Column("id", sa.Uuid(), nullable=False),
sa.Column("chat_id", sa.Uuid(), nullable=False),
sa.Column("sender_id", sa.Uuid(), nullable=False),
sa.Column("text", sa.Text(), nullable=False),
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
sa.CheckConstraint("char_length(text) BETWEEN 1 AND 4000", name="messages_text_check"),
sa.ForeignKeyConstraint(
["chat_id", "sender_id"],
["chat_members.chat_id", "chat_members.user_id"],
),
sa.PrimaryKeyConstraint("id"),
)
op.create_index(
"messages_history_idx", "messages", ["chat_id", "created_at", "id"], unique=False
)
def downgrade() -> None:
raise RuntimeError("Downgrade would delete application data")
+33
View File
@@ -0,0 +1,33 @@
import sqlalchemy as sa
from alembic import op
revision = "0002_idempotency_keys"
down_revision = "0001_init"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.create_table(
"idempotency_keys",
sa.Column("chat_id", sa.Uuid(), nullable=False),
sa.Column("user_id", sa.Uuid(), nullable=False),
sa.Column("key", sa.Text(), nullable=False),
sa.Column("fingerprint", sa.LargeBinary(), nullable=False),
sa.Column("message_id", sa.Uuid(), nullable=False),
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
sa.CheckConstraint("key ~ '^[A-Za-z0-9._:-]{1,128}$'", name="idempotency_keys_key_check"),
sa.CheckConstraint(
"octet_length(fingerprint) = 32", name="idempotency_keys_fingerprint_check"
),
sa.ForeignKeyConstraint(
["chat_id", "user_id"],
["chat_members.chat_id", "chat_members.user_id"],
),
sa.ForeignKeyConstraint(["message_id"], ["messages.id"], ondelete="CASCADE"),
sa.PrimaryKeyConstraint("chat_id", "user_id", "key"),
)
def downgrade() -> None:
raise RuntimeError("Downgrade would delete application data")
+191
View File
@@ -0,0 +1,191 @@
x-app: &app
image: ${API_IMAGE:-mtusi-messenger:${COMPOSE_PROJECT_NAME}}
networks: [backend]
services:
lb:
image: haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b
environment:
API_SERVER_MAXCONN: ${API_SERVER_MAXCONN:-64}
volumes: [./infra/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro]
ports:
- "127.0.0.1:${LB_HTTP_PORT:-8080}:8080"
- "127.0.0.1:${LB_STATS_PORT:-8404}:8404"
networks: [edge, backend]
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8404/healthz"]
interval: 2s
timeout: 2s
retries: 3
start_period: 10s
sysctls:
net.ipv4.ip_local_port_range: "10240 65535"
net.ipv4.tcp_tw_reuse: "1"
stop_signal: SIGUSR1
stop_grace_period: 8s
restart: unless-stopped
read_only: true
cap_drop: [ALL]
cpuset: ${LB_CPUSET:-}
deploy:
resources:
limits: {cpus: "${LB_CPUS:-1}", memory: 128m}
api:
<<: *app
build: .
environment:
DATABASE_URL_FILE: /run/secrets/database_url
CACHE_URL_FILE: /run/secrets/cache_url
CURSOR_SECRET_FILE: /run/secrets/cursor_secret
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400}
WEB_CONCURRENCY: ${WEB_CONCURRENCY:-2}
DB_POOL_MAX_SIZE: ${DB_POOL_MAX_SIZE:-8}
REQUEST_TIMEOUT_SECONDS: ${REQUEST_TIMEOUT_SECONDS:-8}
DB_ACQUIRE_TIMEOUT_SECONDS: ${DB_ACQUIRE_TIMEOUT_SECONDS:-1}
DB_COMMAND_TIMEOUT_SECONDS: ${DB_COMMAND_TIMEOUT_SECONDS:-2}
DRAIN_SECONDS: ${DRAIN_SECONDS:-2}
SHUTDOWN_TIMEOUT_SECONDS: ${SHUTDOWN_TIMEOUT_SECONDS:-6}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
secrets: [database_url, cache_url, cursor_secret]
healthcheck:
test: ["CMD", "python", "-c", "import sys,urllib.request;sys.exit(urllib.request.urlopen('http://127.0.0.1:8080/health/ready',timeout=2).status!=200)"]
interval: 5s
timeout: 3s
retries: 3
start_period: 30s
start_interval: 200ms
stop_grace_period: 8s
restart: unless-stopped
read_only: true
tmpfs: [/tmp]
cpuset: ${API_CPUSET:-}
depends_on:
migrate:
condition: service_completed_successfully
valkey:
condition: service_started
deploy:
replicas: ${API_REPLICAS:-2}
resources:
limits: {cpus: "${API_CPUS:-1}", memory: "${API_MEMORY:-512m}"}
migrate:
<<: *app
pull_policy: never
command: ["alembic", "upgrade", "head"]
environment:
DATABASE_URL_FILE: /run/secrets/database_url
LOG_LEVEL: ${LOG_LEVEL:-INFO}
secrets: [database_url]
healthcheck:
disable: true
restart: "no"
depends_on:
postgres:
condition: service_healthy
deploy:
resources:
limits: {cpus: "0.5", memory: 256m}
postgres:
image: postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b
user: "70:70"
command:
- postgres
- -c
- max_connections=${PG_MAX_CONNECTIONS:-200}
- -c
- shared_buffers=${PG_SHARED_BUFFERS:-256MB}
- -c
- shared_preload_libraries=pg_stat_statements
- -c
- pg_stat_statements.track=top
- -c
- track_io_timing=on
- -c
- idle_in_transaction_session_timeout=10s
environment:
POSTGRES_DB: messenger
POSTGRES_USER: messenger
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
secrets: [postgres_password]
volumes: [pgdata:/var/lib/postgresql/data]
shm_size: 256m
cpuset: ${PG_CPUSET:-}
healthcheck:
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "messenger", "-d", "messenger"]
interval: 2s
timeout: 3s
retries: 30
start_period: 10s
start_interval: 200ms
stop_grace_period: 10s
restart: unless-stopped
networks: [backend]
deploy:
resources:
limits: {cpus: "${PG_CPUS:-2}", memory: "${PG_MEMORY:-1g}"}
valkey:
image: valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a
user: "999:1000"
command:
- valkey-server
- /run/secrets/valkey.conf
- --appendonly
- "yes"
- --appendfsync
- always
- --maxmemory
- 64mb
- --maxmemory-policy
- volatile-lru
secrets: [valkey.conf]
volumes: [valkeydata:/data]
cpuset: ${VALKEY_CPUSET:-}
healthcheck:
test: ["CMD-SHELL", "REDISCLI_AUTH=\"$$(sed -n 's/^requirepass //p' /run/secrets/valkey.conf)\" valkey-cli ping | grep -q PONG"]
interval: 2s
timeout: 3s
retries: 30
stop_grace_period: 10s
restart: unless-stopped
networks: [backend]
deploy:
resources:
limits: {cpus: "0.5", memory: 128m}
k6:
image: grafana/k6:2.3.0@sha256:2dd4756ec6e14e62778916e1eb850108e4b499304c02df56760fa0bdb0fba0b8
profiles: [bench]
environment:
BASE_URL: http://lb:8080
volumes: [./infra/k6:/scripts:ro]
networks: [edge]
cpuset: ${K6_CPUSET:-}
deploy:
resources:
limits: {cpus: "${K6_CPUS:-2}", memory: "${K6_MEMORY:-512m}"}
secrets:
postgres_password:
file: ./secrets/postgres_password
database_url:
file: ./secrets/database_url
valkey.conf:
file: ./secrets/valkey.conf
cache_url:
file: ./secrets/cache_url
cursor_secret:
file: ./secrets/cursor_secret
volumes:
pgdata:
valkeydata:
networks:
edge:
backend:
internal: true
+176 -2
View File
@@ -1,5 +1,179 @@
date: 2026-11-05T22:28:57.204523+00:00 commit: f591fa64e525679a31c9db7f942d36c789e1a12f (report documentation worktree)
# Доказательства
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
Обезличенные реальные прогоны; пользователи, сообщения и пароли тестов синтетические. Токены,
содержимое secrets и дампы не сохраняются. В первой строке текстовых логов — UTC и SHA;
`grade3-*.txt` и `grade4-*.txt` также содержат команду, окружение, код завершения и длительность.
В текстовом выводе удалены пробелы на концах строк Docker/psql; локальный путь заменён на `<repo>`.
В grade4-student-tests.txt замаскирован синтетический неверный Bearer из имени параметризованного теста.
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
## Актуальный итог и финализация отчёта
Заявлена «5», трек 1 «Цена масштабирования». Автор — Костылев Артём, БПИ2303.
Приоритет имеют итоговые проверки после оптимизации; таблицы grade3/grade4 ниже
сохраняют историю отдельных этапов **до кэширования SQL**, а не новые прогоны HEAD.
| Что проверяется | Актуальный источник | Код |
| --- | --- | --- |
| Уровни «3»/«4», публичные проверки, отказы зависимостей | [Команды](track1-sqlalchemy/revalidation/commands.txt), [сценарии](track1-sqlalchemy/revalidation/) | `3fb741e`, API идентичен `57744c5` |
| Каждая реплика: времена, ошибки, потери, реальные контейнеры | [a855a190991a](track1-sqlalchemy/revalidation/failover-each/a855a190991a/result.json), [d4dfe6128c9d](track1-sqlalchemy/revalidation/failover-each/d4dfe6128c9d/result.json); `action.txt` рядом | `3fb741e` |
| Rolling под нагрузкой, один migrate, история | [Результат](track1-sqlalchemy/revalidation/rolling/result.json), [действие](track1-sqlalchemy/revalidation/rolling/action.txt) | `5c8f605` → API `57744c5`, обвязка `3fb741e` |
| 135 измерений, методика и подтверждённое улучшение | [Методика](track1-sqlalchemy/README.md), [аудит](track1-sqlalchemy/audit.txt), [сводка](track1-sqlalchemy/plots/capacity.md) | baseline `5c8f605`, after `57744c5` |
| Исправление сохранения диагностических журналов | [Повторные 290 tests и smoke](track1-sqlalchemy/diagnostics/setup-log-fix-checks.txt) | `55b99a2`; API не менялся |
| Проверки этапа report | [check/validate/lint/student-test/OpenSpec](report-checks.txt), [ссылки, метрики и состав изменений](report-audit.txt) | `f591fa64e525679a31c9db7f942d36c789e1a12f` + только документы |
На этапе report нагрузка заново не снималась: код приложения, миграции, образы и
конфигурация стенда не изменялись. Ссылки и численные выводы сверены с сохранённым
сырьём; собственные тесты выполнены заново. Журналы содержат фактические коды выхода,
включая неуспехи. Публикаций и отправок Telegram на этом этапе нет.
## Уровень «3» после SQLAlchemy, до оптимизации — 2026-11-05
Код всех итоговых прогонов: **`0a1f48bd73e5780c732356880c23fdb476bcff98`**.
Compose-проект `mtusi2026lab3-grade3-final-20261105`, `LB_HTTP_PORT=18083`, `LB_STATS_PORT=23083`,
`API_REPLICAS=2`; BASE_URL автоматически определяется по порту LB. Обе реплики:
api-1 `8ffe0c70f4ea`, api-2 `1b4a73f61b07`. После прогонов контейнеры остановлены,
volumes сохранены. До конца grade4 код приложения после этого SHA не менялся;
на этапе grade4 усилена обвязка `scripts/probe.py`, на track5 добавлен кэш компиляции SQL.
| Файл | Команда | Результат |
| --- | --- | --- |
| `grade3-start.txt` | `make up`, `docker compose ps -a`, чтение `alembic_version` | Новый проект без прежних volumes, сборка успешна, 2 healthy API, one-shot Alembic вышел с 0, head `0002_idempotency_keys` |
| `checks.txt` | `make check`, `make validate`, `make lint`, `uv lock --check`, `openspec validate --all --strict`, diff против upstream | Все успешно; нормативные файлы не менялись |
| `smoke.txt` | `make test` | Публичный smoke PASS |
| `stack.txt`, `environment.txt`, `grade3-stack.txt` | `make stack-evidence` | Порты только у LB, реальные контейнеры и hostname, 2 UP, общие PostgreSQL/Valkey, uid, версии библиотек |
| `grade3-lb-check.txt` (актуальный `lb-check.json` — повтор grade4) | `make lb-check` | Один токен 20 + 20 GET; 20 × 8 POST, 160 ответов 201, по одной копии, 20 конфликтов другого body; pass |
| `retry.json`, `grade3-retry.txt` | `make retry-check` | Потерянный ответ при живой/убитой реплике, повтор через соседа 201, одна копия; pass |
| `failover-current-1.txt`, `failover-current-2.txt` | `make test-failover ACTION_SCRIPT=scripts/stop-one.sh` и `docker compose ps -a` | По очереди api-1 и api-2 Exited (0); 129/128 записей, 0/0 ошибок, восстановление 2.762/2.817 с |
| `grade3-restore-1.txt`, `grade3-restore-2.txt` | `make restore` | Остановленные реплики возвращены в ротацию |
| `persistence.txt`, `grade3-persistence.txt` | `make persistence-evidence` → публичный `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | PASS, IDs прежние, StartedAt всех сервисов обновились, токен и история сохранились |
| `faults.txt` | `make test-faults` | 12 passed; после PostgreSQL 40 регистраций через 2 реплики без рестарта API |
| `student-tests.txt` | `make student-test PYTEST_ARGS=-vv` | 271 passed, 12 deselected; стендовые 12 запущены отдельно |
| `schema.txt`, `migrations.txt`, `grade3-storage.txt` | `make storage-evidence` | Схема Alembic, повтор без изменения 70 users / 24 sessions / 6 chats / 12 members / 284 messages / 284 keys / 1 version |
| `kdf.txt`, `secrets.txt` | `make storage-evidence` | Argon2id, хеши токенов 32 байта; секреты/.env вне Git |
| `grade3-final-review.txt` | Финальные проверки после обновления отчёта и архива | check/validate/lint/OpenSpec, diff нормативных и исполняемых файлов, отсутствие контейнеров этапа |
| `grade3-stop.txt` | `make down`, `docker compose ps -a`, volumes проектов | Контейнеров нет, volumes обоих прогонов сохранены |
Исходный JSON уровня «3» сохранён в `grade3-lb-check.txt` и `grade3-retry.txt` вместе с датой и полным SHA.
`lb-check.json` обновлён повторным прогоном grade4; `retry.json` остаётся результатом grade3.
## Неуспешные промежуточные прогоны
Они сохранены отдельно, не выдаются за итоговые PASS.
| Файл | Код / состояние | Наблюдение и исправление |
| --- | --- | --- |
| `grade3-faults.txt` | `7fc911c332aefe33285ea9e7811c37abd9bb20a6` | 11 passed / 1 failed: POST users → 503 после PostgreSQL; включён `pool_pre_ping` |
| `grade3-pool-regression-before.txt` | `18de595` + новый тест (приложение прежнее) | Первый POST после `pg_terminate_backend` → 503 вместо 201 |
| `grade3-pool-regression-after.txt` | `18de595` + исправления до коммита `0a1f48b` | 2 passed: закрытое соединение и SIGTERM; затем полный набор проверен на `0a1f48b` |
| `grade3-student-tests-interrupted.txt` | `7fc911c` | 46 passed, затем прерывание: gunicorn теста использовал порт LB 18083; теперь свободный 23000–23999 и дедлайн |
| `grade3-student-tests-startup.txt.gz` | `18de595` + исправления до `0a1f48b` | Полный обезличенный вывод: 70 passed / 201 errors, SQLSTATE 57P03 при старте fixture БД; временный отказ теперь повторяется до дедлайна |
| `grade3-whitespace-before.txt` | `0a1f48b` + evidence/OpenSpec | `git diff --check` нашёл пробелы в конце строк Docker/psql; после нормализации итоговая проверка прошла |
| `grade3-initial-stop.txt` | `18de595` + WIP | Остановка исходного проекта без удаления его volumes перед итоговым прогоном |
`clean-clone.txt`, `hooks.txt`, `failover-fe75c6c37e5a.txt`, `failover-ff81f93e8b0d.txt`
и `rolling-from-8d28d45/` — история до SQLAlchemy. Прежние версии перезаписанных доказательств
доступны через `git show 72a1e57:evidence/<имя>`. Новые измерения трека приведены ниже;
исходный SQLAlchemy change завершён и архивирован 2026-11-06.
## Уровень «4» после SQLAlchemy, до оптимизации — 2026-11-05
Код прогонов: **`252e3e3ffeea5004cfd9dc342e686af1417a77a2`**.
Проект `mtusi2026lab3-grade4-20261105`, порты `18083/23083`, две реплики по 1 CPU/512 MiB,
два воркера и пул 8 на воркер; HAProxy maxconn 64. Локальный HTTP явно обходит системный прокси
через `NO_PROXY=localhost,127.0.0.1,::1`. Команды и исходные результаты сохранены ниже.
JSON содержит поля date/commit; первая строка CSV — служебный комментарий с UTC/SHA,
который следует пропустить при чтении таблицы. Эти метаданные добавлены после прогонов;
результаты не изменялись. Из текстового вывода убраны пробелы на концах строк.
| Файл | Команда | Результат |
| --- | --- | --- |
| `grade4-start.txt` | `make up`, версии пакетов, `docker compose ps -a`, Alembic head | Новый проект с пустыми volumes; SQLAlchemy 2.0.45 / Alembic 1.16.5; migrate Exited (0), head `0002_idempotency_keys` |
| `grade4-baseline.txt`, `lb-check.json`, `limits.txt` | `make test`, `make limits`, `make lb-check` | Smoke PASS; порты только LB; 160 ответов 201 через обе реплики, 20/20 одинаковых тел/единственных копий/конфликтов другого body |
| `grade4-drain.txt` | `make student-test PYTEST_ARGS='-v -s student-tests/api/test_drain.py student-tests/unit/test_timeouts.py'` | 3 passed; ready/live 503/200; порт закрыт через 1.05 с, выход через 2.44 с; принятый запрос → 201, зависший → 503 с заголовками контракта |
| `grade4-detection.txt`, `detection/run{1,2,3}/*.json` | `make detection` | Все 12 PASS, диапазоны и пределы — в REPORT |
| `grade4-failover-each.txt`, `failover-each/` | `make failover-each RATE=100` | Каждая реплика Exited (0) и возвращена; по 6001 запросу, 0 ошибок/dropped; 645/642 сообщения зонда полностью сохранены |
| `grade4-runtime-limits.txt` | `docker ps -a` и `docker inspect` во время k6 | Фактические CPU/RAM, uid, image ID, порты и read_only всех сервисов, включая k6 и завершённый migrate |
| `grade4-limits-negative.txt`, `limits-violations.txt` | `scripts/limits.py` с временным override из лога, `API_REPLICAS=1` только для config | Ожидаемый exit 1, все 5 нарушений найдены; override никогда не применялся к контейнерам |
| `grade4-rolling.txt`, `rolling/` | `make rolling-update RATE=100` | Новые реплики готовы до остановки прежних; один migrate, минимум 2 UP, все checks PASS |
| `grade4-rolling-from-7fc911c.txt`, `rolling-from-7fc911c/` | `make rolling-update FROM_REV=7fc911c RATE=100` | Переход между SQLAlchemy-версиями; старый/новый image ID каждой реплики в action.txt |
| `grade4-migration-repeat.txt` | Повторный `make migrate`, Alembic head и счётчики всех таблиц до/после | Результат записан отдельно; миграция выполняется при остановленной нагрузке |
| `grade4-persistence-scoped.txt` | Публичный persistence и docker inspect до/после | IDs контейнеров прежние, StartedAt всех lb/api/postgres/valkey/migrate обновлены |
| `grade4-public.txt` | Публичные smoke/persistence/failover, restore и реальные контейнеры | Итоговые проверки после rolling update |
| `grade4-evidence-audit.txt` | Сверка result.json с сырыми CSV, проверка количества миграторов, поиск похожих на credentials строк | Все 12 detection и 4 нагрузки PASS; численные поля совпадают; один migrate на rolling |
| `grade4-checks.txt`, `grade4-student-tests.txt` | check/validate/lint/lock/OpenSpec, полный student-test | Итоговые проверки на коде stage4 |
| `grade4-stop.txt` | `make down`, список контейнеров и volumes проекта | Контейнеры остановлены, volumes сохранены |
Промежуточные неуспехи не заменяют итоговые результаты:
| Файл | Наблюдение |
| --- | --- |
| `grade4-evidence-audit-scan-failed.txt`, `grade4-evidence-audit-fixture-token.txt` | Численные сверки PASS. Первый поиск нашёл собственный regex; после уточнения — синтетический неверный Bearer в имени теста. Имя параметра замаскировано, итоговый поиск прошёл |
| `grade4-development.txt` | Первоначальные E501/ARG005, исправления форматирования, 14 новых регрессионных тестов; уточнение library ID Context7 |
| `grade4-baseline-proxy-failed.txt` | Smoke: RemoteDisconnected из-за системного прокси; прямой curl отвечал 200; повтор с NO_PROXY прошёл |
| `grade4-detection-proxy-interrupted.txt`, `grade4-detection-proxy-interrupted/` | Прогон без NO_PROXY: статистика LB недоступна, SIGTERM честно fail; остановлен во время kill, реплики восстановлены; выполнен полный новый прогон |
| `grade4-public-events-unavailable.txt` | Дополнительная ретроспективная проверка через docker events не подтвердила рестарт: в оставшемся буфере не было событий start/die нужного окна. Persistence повторён с непосредственным снимком StartedAt до/после |
| `grade4-limits-negative-config-failed.txt`, `grade4-limits-compose-rejection.txt` | Compose отклонил сочетание container_name и replicas=2 до проверки политики; отрицательная fixture повторена с replicas=1 (конфигурация не применялась) |
## Трек «5» на SQLAlchemy — 2026-11-05–06 (МСК)
Текущая производительность измерена в `track1-sqlalchemy/`; исторический `track1/`
не входит в новые медианы и графики. API baseline `5c8f605`, after `57744c5`;
код API не менялся в последующих коммитах обвязки. Графики — `3fb741e`.
Гипотеза: повторная компиляция CTE расходует CPU API; статическое кэширование сохраняет SQL.
| Файл | Команда | Наблюдение |
| --- | --- | --- |
| `track1-sqlalchemy/README.md`, `host.txt`, `runtime-resources.json` | `make track1-host`; снимок лимитов | Методика, версии, собственный project, CPU pinning, ограничения и происхождение образов |
| `track1-sqlalchemy/series-a/` | `make track1-a` | 54 точки: 1×4/2×2/4×1 при 4 CPU/2 GiB; пики 2687/2532/2422 RPS |
| `track1-sqlalchemy/series-b/` | `make track1-b` | 36 точек: 1×1/2×1/8×1; вместе с 4×1 из A — сублинейный рост до 3420 RPS |
| `track1-sqlalchemy/compare/` | `make track1-compare` | 18 чередующихся точек: при 2400 p95 14.28→4.63 мс; при 5400 throughput +8.7%; min–max не пересекаются |
| `track1-sqlalchemy/control-pool/` | первая часть `make track1-control` | 15 точек: пул 16 добавляет Lock и снижает RPS на 13.7%; увеличение maxconn не помогает |
| `track1-sqlalchemy/control-cpus/` | CPU-рецепт `make track1-control` после исправления, `corrected-cpus-run.txt` | 12 чередующихся точек на одинаковых 4 CPU/2 GiB; 8×0.5 медленнее 4×1 |
| `track1-sqlalchemy/plots/`, `plots-run.txt` | `make plots` | 12 просмотренных PNG, сводка capacity.csv/md; диапазоны повторов, без старых RPS |
| `track1-sqlalchemy/audit.txt` | полный скрипт и команда внутри | 135 основных точек, 8 271 783 ответа; метрики сверены с k6, image IDs и реальными CPU/RAM/cpuset; внешних помех 0 |
| `track1-sqlalchemy/explain-history.txt` | SQLAlchemy EXPLAIN ANALYZE, скрипт внутри | Первая страница и keyset используют messages_history_idx; ограничение custom plan отмечено |
| `track1-sqlalchemy/revalidation/` | команды и exit codes в `commands.txt` | 290 tests, 12 faults, публичные сценарии, 12/12 detection, оба failover и rolling PASS на `3fb741e`; история сохранена |
| `track1-sqlalchemy/openspec-close.txt` | синхронизация specs, архивация, strict validation | Оба change завершены: 11 и 17 задач; перед архивом 16/16, после 14/14; активных changes нет |
| `track1-sqlalchemy/final-checks.txt` | итоговые команды перед коммитом | Проверки окончательных документов и состава evidence |
Стек остановлен только в своём project, volumes сохранены (`track1-sqlalchemy/stop.txt`).
Промежуточные неуспехи и исключённые результаты сохранены:
- `diagnostics/staged-whitespace-failed.txt`: проверка staged-файлов нашла CRLF
в CSV и пустые строки в конце журналов; нормализованы, равенство CSV-полей проверено.
- `series-b/compose-up-failed.txt`, `compare/compose-up-failed.txt`: три ошибки LB unhealthy
при подготовке, до k6; retry восстановил готовность. В `55b99a2` исправлено сохранение
будущих журналов, повторные 290 tests и smoke прошли (`diagnostics/setup-log-fix-checks.txt`).
- `diagnostics/final-audit-log-headers-failed.txt`: аудит обнаружил игнорируемые .log;
журналы сохранены с provenance, финальный `final-audit.txt` прошёл.
- `diagnostics/ordered-control-cpus/`: 12 завершённых замеров с группировкой конфигураций;
исключены из основных графиков и полностью повторены с чередованием.
- `diagnostics/order-regression.txt`: тест воспроизвёл неверный порядок (1 failed, 1 passed);
`order-fix-checks.txt`: после исправления check/lint, 290 passed и smoke.
- `diagnostics/audit-image-tag-failed.txt`: неверное сравнение старого OCI index с текущим
тегом; исправленный аудит использует build ID соответствующего журнала сборки.
- `diagnostics/explain-driver-uuid-failed.txt`: диагностический скрипт не преобразовал UUID
драйвера в стандартный UUID для literal; повтор соответствует существующему адаптеру и проходит.
- `diagnostics/pilot/`: пилот по одному повтору, в выводы о разбросе не входит.
- При пуле 16 в перегрузке были 0.009–0.016% HTTP-ошибок; они остаются в summary и отчёте.
Предупреждения Docker CLI, первоначальные lint/OpenSpec ошибки и их исправления описаны
в `track1-sqlalchemy/README.md`; данные не выданы за проверки без ошибок.
## Трек 1 «Цена масштабирования» — исторические результаты до SQLAlchemy
`track1/` — серии A и B, сравнение до/после, контрольные прогоны, графики и проверки после улучшения; состав и поля CSV —
`track1/README.md`.
| Файл | Что доказывает | Команда | Коммит (код) |
| --- | --- | --- | --- |
| `track1/host.txt` | снимок хоста, версии и соседние контейнеры перед сериями | `make track1-host` | `67f6d68` |
| `track1/series-a/` | 1×4, 2×2, 4×1 при 4 CPU / 2 GiB API | `make track1-a` | код `107fbbb` (до улучшения) |
| `track1/series-b/` | 1×1, 2×1, 8×1 по 1 CPU (4×1 — из серии A) | `make track1-b` | код `107fbbb` |
| `track1/compare/` | улучшение: «до» (`edc091d`) и «после» на 8×1 | `make track1-compare` | `edc091d` против `22f0e62` |
| `track1/control-pool/`, `track1/control-cpus/` | контроль: пул и `maxconn` на 8×1; 8×0,5 против 4×1 на одних CPU | `make track1-control` | код `b1c80ee` (HEAD `f5fea5c`–`a67bc65`) |
| `track1/plots/` | графики и сводка потолков `capacity.md` | `make plots` | из всех `summary.csv` |
| `track1/after-checks.txt` | уровни «3» и «4» на коде с улучшением | команды внутри файла | `dde113b` |
| `track1/host-others.csv`, `track1/aborted/` | нагрузка соседних стендов во время замеров, прерванная первая попытка серии A и отброшенная первая попытка контроля размещения | см. `track1/README.md` | — |
+34
View File
@@ -0,0 +1,34 @@
date: 2026-11-05T18:56:09.780488+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ sh -c 'set -e; make check; make validate; make lint; uv lock --check; openspec validate --all --strict; git diff --exit-code upstream/main -- contracts tests README.md COURSE.md lab.json MAINTAINERS.md'
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
.venv/bin/python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
.venv/bin/ruff check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
All checks passed!
.venv/bin/ruff format --check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
107 files already formatted
.venv/bin/ty check src student-tests alembic
All checks passed!
Resolved 64 packages in 14ms
- Validating...
✓ change/2026-11-05-adopt-sqlalchemy-alembic
✓ change/fix-lab3-postgres-pool-recovery
✓ spec/lab1-event-publication
✓ spec/lab1-messenger-chats
✓ spec/lab1-messenger-history
✓ spec/lab1-messenger-identity
✓ spec/lab1-service-operability
✓ spec/lab2-auth-sessions
✓ spec/lab2-dependency-failures
✓ spec/lab2-history-index
✓ spec/lab2-persistent-storage
✓ spec/lab2-session-cache
✓ spec/lab3-failover-operations
✓ spec/lab3-idempotent-messages
✓ spec/lab3-load-balancing
✓ spec/lab3-scaling-cost
Totals: 16 passed, 0 failed (16 items)
exit_code: 0 elapsed_seconds: 1.458
+360
View File
@@ -0,0 +1,360 @@
date: 2026-10-30T02:55:09Z commit: e049c26 dir: mtusi2026lab3-clean (свой compose-проект и volumes)
# шаги — команды блока «Запуск из чистого clone» REPORT.md дословно; строки с пометкой «наблюдение» — проверки между шагами
$ git clone <repo> mtusi2026lab3-clean && cd mtusi2026lab3-clean && git checkout solution/bpi2303-kostylev
HEAD e049c26 Reproduce a lost answer on the stand and enrich the run records
$ docker volume ls -q --filter label=com.docker.compose.project=mtusi2026lab3-clean | wc -l | tr -d ' ' # наблюдение, не шаг инструкции
0
$ make secrets
sh scripts/secrets.sh
создан secrets/postgres_password
создан secrets/database_url
создан secrets/cursor_secret
создан secrets/valkey_password
создан secrets/valkey.conf
создан secrets/cache_url
создан .env из .env.example
exit=0
$ sed LB_HTTP_PORT=18083 LB_STATS_PORT=23083 .env # отступление: 8080 на этой машине занят стендами других лаб
$ git status --short --ignored secrets .env # наблюдение, не шаг инструкции
!! .env
!! secrets/
$ docker compose --env-file .env config --quiet
exit=0
$ make up
sh scripts/secrets.sh
docker compose up -d --build --wait
#1 [internal] load local bake definitions
#1 reading from stdin 606B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 1.57kB done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
#3 DONE 0.0s
#4 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
#4 DONE 0.0s
#5 [internal] load .dockerignore
#5 transferring context: 437B done
#5 DONE 0.0s
#6 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
#6 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d done
#6 DONE 0.0s
#7 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
#7 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 done
#7 DONE 0.0s
#8 [internal] load build context
#8 transferring context: 282.44kB 0.0s done
#8 DONE 0.0s
#9 [builder 3/7] WORKDIR /build
#9 CACHED
#10 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
#10 CACHED
#11 [builder 4/7] COPY pyproject.toml uv.lock README.md ./
#11 CACHED
#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable
#12 CACHED
#13 [builder 6/7] COPY src ./src
#13 DONE 0.0s
#14 [builder 7/7] RUN uv sync --locked --no-dev --no-editable
#14 0.177 Resolved 59 packages in 0.70ms
#14 0.179 Building mtusi-messenger @ file:///build
#14 1.370 Built mtusi-messenger @ file:///build
#14 1.373 Prepared 1 package in 1.19s
#14 1.377 Installed 1 package in 3ms
#14 1.462 Bytecode compiled 889 files in 85ms
#14 1.462 + mtusi-messenger==1.3.0 (from file:///build)
#14 DONE 1.5s
#15 [runtime 2/4] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
#15 CACHED
#16 [runtime 3/4] COPY --from=builder --chown=root:root /opt/venv /opt/venv
#16 DONE 0.1s
#17 [runtime 4/4] WORKDIR /app
#17 DONE 0.0s
#18 exporting to image
#18 exporting layers
#18 exporting layers 1.4s done
#18 exporting manifest sha256:41b1d8e9a345c4df365f8ff02ecbc631fbe4ddba70f99aa9e5eb551238e974d6
#18 exporting manifest sha256:41b1d8e9a345c4df365f8ff02ecbc631fbe4ddba70f99aa9e5eb551238e974d6 done
#18 exporting config sha256:5d3385c825a95590c9cd0253aa72316de78fd11dc85ab9b61af766943ef9847d done
#18 exporting attestation manifest sha256:7729b5721c86110d489c782e5df22a34b492328eb4b92fa30f2d9dea23c810d3 done
#18 exporting manifest list sha256:0b27d26576cb62d154e45c8e6af3d80e9663cd275eb234a96a6a1ebc0c494c3a done
#18 naming to docker.io/library/mtusi-messenger:mtusi2026lab3-clean done
#18 unpacking to docker.io/library/mtusi-messenger:mtusi2026lab3-clean
#18 unpacking to docker.io/library/mtusi-messenger:mtusi2026lab3-clean 0.2s done
#18 DONE 1.7s
#19 resolving provenance for metadata file
#19 DONE 0.0s
api Built
Network mtusi2026lab3-clean_edge Creating
Network mtusi2026lab3-clean_edge Created
Network mtusi2026lab3-clean_backend Creating
Network mtusi2026lab3-clean_backend Created
Volume "mtusi2026lab3-clean_pgdata" Creating
Volume "mtusi2026lab3-clean_pgdata" Created
Volume "mtusi2026lab3-clean_valkeydata" Creating
Volume "mtusi2026lab3-clean_valkeydata" Created
Container mtusi2026lab3-clean-lb-1 Creating
Container mtusi2026lab3-clean-valkey-1 Creating
Container mtusi2026lab3-clean-postgres-1 Creating
Container mtusi2026lab3-clean-valkey-1 Created
Container mtusi2026lab3-clean-lb-1 Created
Container mtusi2026lab3-clean-postgres-1 Created
Container mtusi2026lab3-clean-migrate-1 Creating
Container mtusi2026lab3-clean-migrate-1 Created
Container mtusi2026lab3-clean-api-1 Creating
Container mtusi2026lab3-clean-api-2 Creating
Container mtusi2026lab3-clean-api-2 Created
Container mtusi2026lab3-clean-api-1 Created
Container mtusi2026lab3-clean-lb-1 Starting
Container mtusi2026lab3-clean-postgres-1 Starting
Container mtusi2026lab3-clean-valkey-1 Starting
Container mtusi2026lab3-clean-valkey-1 Started
Container mtusi2026lab3-clean-postgres-1 Started
Container mtusi2026lab3-clean-postgres-1 Waiting
Container mtusi2026lab3-clean-lb-1 Started
Container mtusi2026lab3-clean-postgres-1 Healthy
Container mtusi2026lab3-clean-migrate-1 Starting
Container mtusi2026lab3-clean-migrate-1 Started
Container mtusi2026lab3-clean-migrate-1 Waiting
Container mtusi2026lab3-clean-migrate-1 Exited
Container mtusi2026lab3-clean-api-1 Starting
Container mtusi2026lab3-clean-api-1 Started
Container mtusi2026lab3-clean-api-2 Starting
Container mtusi2026lab3-clean-api-2 Started
Container mtusi2026lab3-clean-lb-1 Waiting
Container mtusi2026lab3-clean-api-1 Waiting
Container mtusi2026lab3-clean-api-2 Waiting
Container mtusi2026lab3-clean-migrate-1 Waiting
Container mtusi2026lab3-clean-postgres-1 Waiting
Container mtusi2026lab3-clean-valkey-1 Waiting
Container mtusi2026lab3-clean-postgres-1 Healthy
Container mtusi2026lab3-clean-migrate-1 Exited
Container mtusi2026lab3-clean-valkey-1 Healthy
Container mtusi2026lab3-clean-api-1 Healthy
Container mtusi2026lab3-clean-api-2 Healthy
Container mtusi2026lab3-clean-lb-1 Healthy
scripts/lb-wait.sh
exit=0
make up (build, migrate, wait healthy, all replicas UP in LB): 10 s
$ docker compose logs --no-log-prefix migrate # наблюдение, не шаг инструкции
{"version":"0001_init","event":"migration.applied","level":"info","ts":"2026-10-30T02:55:17.402396Z"}
{"version":"0002_idempotency_keys","event":"migration.applied","level":"info","ts":"2026-10-30T02:55:17.402481Z"}
{"reason":"applied","event":"migration.completed","level":"info","ts":"2026-10-30T02:55:17.402535Z"}
$ docker compose ps -a --format '{{.Service}} {{.State}} {{.Status}} {{.Ports}}' # наблюдение, не шаг инструкции
api running Up 3 seconds (healthy)
api running Up 3 seconds (healthy)
lb running Up 6 seconds (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
migrate exited Exited (0) 4 seconds ago
postgres running Up 6 seconds (healthy)
valkey running Up 6 seconds (healthy)
$ curl -s "http://$(docker compose port lb 8404)/stats;csv" | awk -F, '$1 == "api" && $2 != "BACKEND" {print $2, $18}' # наблюдение, не шаг инструкции
api1 UP
api2 UP
api3 MAINT (resolution)
api4 MAINT (resolution)
api5 MAINT (resolution)
api6 MAINT (resolution)
api7 MAINT (resolution)
api8 MAINT (resolution)
$ make test
python3 tests/smoke.py --base-url "http://127.0.0.1:18083"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
exit=0
$ make lb-check
python3 scripts/probe.py check --rounds 20 --out evidence/lb-check.json
{
"instances_one_token": {
"8c9722d76b31": 20,
"58d535b73f25": 20
},
"same_key": {
"rounds": 20,
"parallel": 8,
"statuses": {
"201": 160
},
"instances": {
"8c9722d76b31": 80,
"58d535b73f25": 80
},
"identical_bodies_rounds": 20,
"single_copy_rounds": 20,
"conflict_rounds": 20
},
"pass": true
}
exit=0
$ make retry-check
python3 scripts/probe.py retry --out evidence/retry.json
{
"variants": [
{
"variant": "timeout",
"lost_attempt": {
"status": 0,
"client_timeout_s": 0.5,
"chat_lock_held_s": 1.5,
"replica": "8c9722d76b31",
"replica_killed": false,
"replica_answered": 201
},
"retry": {
"after_s": 1.546,
"status": 201,
"attempts": 1,
"replica": "58d535b73f25"
},
"copies_in_history": 1,
"same_message": true,
"written_by": "lost attempt",
"pass": true
},
{
"variant": "kill",
"lost_attempt": {
"status": 0,
"client_timeout_s": 0.5,
"chat_lock_held_s": 1.5,
"replica": "58d535b73f25",
"replica_killed": true,
"replica_answered": null
},
"retry": {
"after_s": 1.533,
"status": 201,
"attempts": 1,
"replica": "8c9722d76b31"
},
"copies_in_history": 1,
"same_message": true,
"written_by": "lost attempt",
"pass": true
}
],
"pass": true
}
exit=0
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 135, "failed_attempts": 0, "first_recovery_seconds": 2.911}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
$ docker compose ps -a --format '{{.Service}} {{.Name}} {{.State}} {{.Status}}' api # наблюдение, не шаг инструкции
api mtusi2026lab3-clean-api-1 running Up 27 seconds (healthy)
api mtusi2026lab3-clean-api-2 exited Exited (0) 12 seconds ago
$ make restore
scripts/restore.sh
Container mtusi2026lab3-clean-api-1 Running
Container mtusi2026lab3-clean-api-2 Starting
Container mtusi2026lab3-clean-api-2 Started
Container mtusi2026lab3-clean-api-1 Waiting
Container mtusi2026lab3-clean-api-2 Waiting
Container mtusi2026lab3-clean-api-1 Healthy
Container mtusi2026lab3-clean-api-2 Healthy
exit=0
$ curl -s -o /dev/null "http://$(docker compose port lb 8080)/health/live"
exit=0
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh && make restore
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 135, "failed_attempts": 0, "first_recovery_seconds": 2.572}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
scripts/restore.sh
Container mtusi2026lab3-clean-api-2 Running
Container mtusi2026lab3-clean-api-1 Starting
Container mtusi2026lab3-clean-api-1 Started
Container mtusi2026lab3-clean-api-1 Waiting
Container mtusi2026lab3-clean-api-2 Waiting
Container mtusi2026lab3-clean-api-1 Healthy
Container mtusi2026lab3-clean-api-2 Healthy
exit=0
$ docker compose ps -a --format '{{.Service}} {{.Name}} {{.State}} {{.Status}}' api # наблюдение, не шаг инструкции
api mtusi2026lab3-clean-api-1 running Up 1 second (healthy)
api mtusi2026lab3-clean-api-2 running Up 19 seconds (healthy)
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18083"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
$ docker compose ps -a --format '{{.Service}} {{.State}} {{.RunningFor}} {{.Status}}' # наблюдение, не шаг инструкции
api running 58 seconds ago Up 3 seconds (healthy)
api running 58 seconds ago Up 3 seconds (healthy)
lb running 58 seconds ago Up 5 seconds (healthy)
migrate exited 58 seconds ago Exited (0) 4 seconds ago
postgres running 58 seconds ago Up 5 seconds (healthy)
valkey running 58 seconds ago Up 5 seconds (healthy)
$ make migrate
docker compose run --rm migrate
Container mtusi2026lab3-clean-postgres-1 Running
{"reason":"up to date","event":"migration.completed","level":"info","ts":"2026-10-30T02:56:15.101805Z"}
exit=0
$ make storage-evidence
sh scripts/evidence-storage.sh
evidence/{schema,migrations,kdf,secrets}.txt обновлены
exit=0
$ docker volume ls --format '{{.Name}}' --filter label=com.docker.compose.project=mtusi2026lab3-clean # наблюдение, не шаг инструкции
mtusi2026lab3-clean_pgdata
mtusi2026lab3-clean_valkeydata
$ make down
docker compose --profile bench down
Container mtusi2026lab3-clean-api-1 Stopping
Container mtusi2026lab3-clean-api-2 Stopping
Container mtusi2026lab3-clean-lb-1 Stopping
Container mtusi2026lab3-clean-lb-1 Stopped
Container mtusi2026lab3-clean-lb-1 Removing
Container mtusi2026lab3-clean-lb-1 Removed
Container mtusi2026lab3-clean-api-2 Stopped
Container mtusi2026lab3-clean-api-2 Removing
Container mtusi2026lab3-clean-api-1 Stopped
Container mtusi2026lab3-clean-api-1 Removing
Container mtusi2026lab3-clean-api-2 Removed
Container mtusi2026lab3-clean-api-1 Removed
Container mtusi2026lab3-clean-valkey-1 Stopping
Container mtusi2026lab3-clean-migrate-1 Stopping
Container mtusi2026lab3-clean-migrate-1 Stopped
Container mtusi2026lab3-clean-migrate-1 Removing
Container mtusi2026lab3-clean-migrate-1 Removed
Container mtusi2026lab3-clean-postgres-1 Stopping
Container mtusi2026lab3-clean-postgres-1 Stopped
Container mtusi2026lab3-clean-postgres-1 Removing
Container mtusi2026lab3-clean-postgres-1 Removed
Container mtusi2026lab3-clean-valkey-1 Stopped
Container mtusi2026lab3-clean-valkey-1 Removing
Container mtusi2026lab3-clean-valkey-1 Removed
Network mtusi2026lab3-clean_edge Removing
Network mtusi2026lab3-clean_backend Removing
Network mtusi2026lab3-clean_edge Removed
Network mtusi2026lab3-clean_backend Removed
exit=0
$ docker volume ls --format '{{.Name}}' --filter label=com.docker.compose.project=mtusi2026lab3-clean # наблюдение, не шаг инструкции
mtusi2026lab3-clean_pgdata
mtusi2026lab3-clean_valkeydata
$ make reset-data
Удаляются volumes с учебными данными стенда
docker compose --profile bench down -v --remove-orphans
Volume mtusi2026lab3-clean_pgdata Removing
Volume mtusi2026lab3-clean_valkeydata Removing
Volume mtusi2026lab3-clean_pgdata Removed
Volume mtusi2026lab3-clean_valkeydata Removed
exit=0
$ docker volume ls -q --filter label=com.docker.compose.project=mtusi2026lab3-clean | wc -l | tr -d ' ' # наблюдение, не шаг инструкции
0
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"kill",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.113,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 0.934,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 2.57,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"pause",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.057,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 3.215,
"declared_max_seconds": 3.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "docker unpause 7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170 && scripts/lb-wait.sh",
"restore_seconds": 2.425,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a"
],
"action_exit": 0,
"action_seconds": 0.167,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 0,
"detection_seconds": 1.196,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 503,
"x_instance_id_present": false,
"error_code": "unavailable"
},
"restore": "docker start f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a && scripts/lb-wait.sh",
"restore_seconds": 2.475,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+35
View File
@@ -0,0 +1,35 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.535,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 1.069,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 1.969,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"excluded_before_action_end": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"kill",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.162,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 0.901,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 3.086,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"pause",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.063,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 2.817,
"declared_max_seconds": 3.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "docker unpause 7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170 && scripts/lb-wait.sh",
"restore_seconds": 2.378,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a"
],
"action_exit": 0,
"action_seconds": 0.17,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 0,
"detection_seconds": 1.263,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 503,
"x_instance_id_present": false,
"error_code": "unavailable"
},
"restore": "docker start f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a && scripts/lb-wait.sh",
"restore_seconds": 2.455,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+35
View File
@@ -0,0 +1,35 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.662,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 1.205,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 1.953,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"excluded_before_action_end": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"kill",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.163,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 0.886,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 3.095,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"pause",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.063,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 2.778,
"declared_max_seconds": 3.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "docker unpause 7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170 && scripts/lb-wait.sh",
"restore_seconds": 2.416,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+32
View File
@@ -0,0 +1,32 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a"
],
"action_exit": 0,
"action_seconds": 0.163,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 0,
"detection_seconds": 1.239,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 503,
"x_instance_id_present": false,
"error_code": "unavailable"
},
"restore": "docker start f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a && scripts/lb-wait.sh",
"restore_seconds": 2.481,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
+35
View File
@@ -0,0 +1,35 @@
{"date": "2026-11-05T19:17:01.673107+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.665,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 1.266,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 1.984,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"excluded_before_action_end": true,
"restored": true
},
"pass": true
}
+35
View File
@@ -0,0 +1,35 @@
date: 2026-11-05T18:59:00Z commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
host: Apple M4 Max, 16 CPU, 48 GiB RAM, macOS 15.1
docker: 28.3.2, VM: 16 CPU, 8217190400 bytes
compose: 2.38.2-desktop.1
images:
image: ${API_IMAGE:-mtusi-messenger:${COMPOSE_PROJECT_NAME}}
image: haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b
image: postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b
image: valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a
image: grafana/k6:2.3.0@sha256:2dd4756ec6e14e62778916e1eb850108e4b499304c02df56760fa0bdb0fba0b8
FROM python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d AS builder
COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
FROM python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d AS runtime
python in image: Python 3.14.7
haproxy: HAProxy version 3.2.26-3e0f11a 2026/10/14 - https://haproxy.org/
packages (uv.lock):
fastapi 0.141.1
uvicorn 0.54.0
uvicorn-worker 0.4.0
gunicorn 26.2.0
sqlalchemy 2.0.45
alembic 1.16.5
asyncpg 0.32.0
argon2-cffi 25.1.0
pydantic 2.13.5
pydantic-settings 2.15.0
dishka 1.10.1
structlog 26.1.0
redis 8.1.0
process users (service uid command):
api 10001 python
lb 99 haproxy
postgres 70 postgres
valkey 999 tini
valkey 999 valkey-server
+23
View File
@@ -0,0 +1,23 @@
date: 2026-11-05T18:58:02.224418+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ sh -c 'docker compose ps -a; make test-failover ACTION_SCRIPT=scripts/stop-one.sh; result=$?; docker compose ps -a; exit "$result"'
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-grade3-final-20261105-api-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 2 minutes ago Up 3 seconds (healthy)
mtusi2026lab3-grade3-final-20261105-api-2 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 2 minutes ago Up About a minute (healthy)
mtusi2026lab3-grade3-final-20261105-lb-1 haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b "docker-entrypoint.s…" lb 2 minutes ago Up About a minute (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
mtusi2026lab3-grade3-final-20261105-migrate-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "alembic upgrade head" migrate 2 minutes ago Exited (0) About a minute ago
mtusi2026lab3-grade3-final-20261105-postgres-1 postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b "docker-entrypoint.s…" postgres 2 minutes ago Up About a minute (healthy)
mtusi2026lab3-grade3-final-20261105-valkey-1 valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a "tini -- docker-entr…" valkey 2 minutes ago Up About a minute (healthy)
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 129, "failed_attempts": 0, "first_recovery_seconds": 2.762}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-grade3-final-20261105-api-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 2 minutes ago Exited (0) 12 seconds ago
mtusi2026lab3-grade3-final-20261105-api-2 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 2 minutes ago Up 2 minutes (healthy)
mtusi2026lab3-grade3-final-20261105-lb-1 haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b "docker-entrypoint.s…" lb 2 minutes ago Up 2 minutes (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
mtusi2026lab3-grade3-final-20261105-migrate-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "alembic upgrade head" migrate 2 minutes ago Exited (0) 2 minutes ago
mtusi2026lab3-grade3-final-20261105-postgres-1 postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b "docker-entrypoint.s…" postgres 2 minutes ago Up 2 minutes (healthy)
mtusi2026lab3-grade3-final-20261105-valkey-1 valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a "tini -- docker-entr…" valkey 2 minutes ago Up 2 minutes (healthy)
exit_code: 0 elapsed_seconds: 15.820
+23
View File
@@ -0,0 +1,23 @@
date: 2026-11-05T18:58:20.145733+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ sh -c 'curl -fsS -o /dev/null "http://$(docker compose port lb 8080)/health/live"; docker compose ps -a; make test-failover ACTION_SCRIPT=scripts/stop-one.sh; result=$?; docker compose ps -a; exit "$result"'
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-grade3-final-20261105-api-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 2 minutes ago Up 2 seconds (healthy)
mtusi2026lab3-grade3-final-20261105-api-2 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 2 minutes ago Up 2 minutes (healthy)
mtusi2026lab3-grade3-final-20261105-lb-1 haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b "docker-entrypoint.s…" lb 2 minutes ago Up 2 minutes (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
mtusi2026lab3-grade3-final-20261105-migrate-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "alembic upgrade head" migrate 2 minutes ago Exited (0) 2 minutes ago
mtusi2026lab3-grade3-final-20261105-postgres-1 postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b "docker-entrypoint.s…" postgres 2 minutes ago Up 2 minutes (healthy)
mtusi2026lab3-grade3-final-20261105-valkey-1 valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a "tini -- docker-entr…" valkey 2 minutes ago Up 2 minutes (healthy)
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 2.817}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-grade3-final-20261105-api-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 3 minutes ago Up 17 seconds (healthy)
mtusi2026lab3-grade3-final-20261105-api-2 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 3 minutes ago Exited (0) 12 seconds ago
mtusi2026lab3-grade3-final-20261105-lb-1 haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b "docker-entrypoint.s…" lb 3 minutes ago Up 2 minutes (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
mtusi2026lab3-grade3-final-20261105-migrate-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "alembic upgrade head" migrate 3 minutes ago Exited (0) 2 minutes ago
mtusi2026lab3-grade3-final-20261105-postgres-1 postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b "docker-entrypoint.s…" postgres 3 minutes ago Up 2 minutes (healthy)
mtusi2026lab3-grade3-final-20261105-valkey-1 valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a "tini -- docker-entr…" valkey 3 minutes ago Up 2 minutes (healthy)
exit_code: 0 elapsed_seconds: 15.802
@@ -0,0 +1,15 @@
date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
7cfd91ddf780 api Up About a minute (healthy)
5bbf259ff136 api Exited (0) Less than a second ago
19:19:56 database bytes,messages: 12678835,8785
mtusi2026lab3-grade4-20261105-api-1 cpu=25.25% mem=209.7MiB / 512MiB
mtusi2026lab3-grade4-20261105-lb-1 cpu=2.71% mem=30.9MiB / 128MiB
mtusi2026lab3-grade4-20261105-postgres-1 cpu=6.45% mem=51.05MiB / 1GiB
mtusi2026lab3-grade4-20261105-valkey-1 cpu=0.43% mem=12.96MiB / 128MiB
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Starting
Container mtusi2026lab3-grade4-20261105-api-2 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
@@ -0,0 +1,3 @@
date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
time="2026-11-05T19:19:28Z" level=info msg=LOAD-START source=console
measure: 6001 requests, failed ratio 0
@@ -0,0 +1,309 @@
{"date": "2026-11-05T19:18:13.470607+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"options": {
"summaryTrendStats": [
"avg",
"min",
"med",
"p(90)",
"p(95)",
"p(99)",
"max"
],
"summaryTimeUnit": "",
"noColor": false
},
"state": {
"isStdOutTTY": false,
"isStdErrTTY": false,
"testRunDurationMs": 70512.503422
},
"metrics": {
"dropped_iterations": {
"type": "counter",
"contains": "default",
"values": {
"count": 0,
"rate": 0
}
},
"data_sent": {
"values": {
"count": 2054247,
"rate": 29133.08846384076
},
"type": "counter",
"contains": "data"
},
"http_req_tls_handshaking": {
"contains": "time",
"values": {
"med": 0,
"p(90)": 0,
"p(95)": 0,
"p(99)": 0,
"max": 0,
"avg": 0,
"min": 0
},
"type": "trend"
},
"http_req_duration": {
"type": "trend",
"contains": "time",
"values": {
"p(99)": 5.295193749999997,
"max": 53.791625,
"avg": 3.101954274815648,
"min": 0.861194,
"med": 2.9916875000000003,
"p(90)": 3.6507209,
"p(95)": 3.9084498499999993
}
},
"checks": {
"contains": "default",
"values": {
"rate": 1,
"passes": 7002,
"fails": 0
},
"type": "rate"
},
"http_req_duration{scenario:measure}": {
"type": "trend",
"contains": "time",
"values": {
"min": 0.861194,
"med": 2.979916,
"p(90)": 3.638291,
"p(95)": 3.8775,
"p(99)": 4.531834,
"max": 53.791625,
"avg": 3.0515494415930533
}
},
"http_req_sending": {
"type": "trend",
"contains": "time",
"values": {
"med": 0.011667,
"p(90)": 0.0155,
"p(95)": 0.018935449999999986,
"p(99)": 0.033915669999999995,
"max": 0.254083,
"avg": 0.01292155005672162,
"min": 0.002584
}
},
"http_req_failed": {
"type": "rate",
"contains": "default",
"values": {
"rate": 0,
"passes": 0,
"fails": 7052
}
},
"http_reqs{scenario:measure}": {
"type": "counter",
"contains": "default",
"values": {
"count": 6001,
"rate": 85.10547362196873
}
},
"http_req_duration{expected_response:true}": {
"type": "trend",
"contains": "time",
"values": {
"avg": 3.101954274815648,
"min": 0.861194,
"med": 2.9916875000000003,
"p(90)": 3.6507209,
"p(95)": 3.9084498499999993,
"p(99)": 5.295193749999997,
"max": 53.791625
}
},
"http_req_receiving": {
"contains": "time",
"values": {
"p(95)": 0.04025,
"p(99)": 0.06647825,
"max": 0.282375,
"avg": 0.023369897192285907,
"min": 0.008,
"med": 0.020459,
"p(90)": 0.033583
},
"type": "trend"
},
"iteration_duration": {
"type": "trend",
"contains": "time",
"values": {
"p(90)": 3.7281128,
"p(95)": 3.97822085,
"p(99)": 4.60467816,
"max": 53.948708,
"avg": 3.1402372599257378,
"min": 1.758833,
"med": 3.0767085
}
},
"vus": {
"type": "gauge",
"contains": "default",
"values": {
"value": 1,
"min": 0,
"max": 1
}
},
"iterations": {
"type": "counter",
"contains": "default",
"values": {
"count": 7002,
"rate": 99.30153746059408
}
},
"dropped_iterations{scenario:measure}": {
"type": "counter",
"contains": "default",
"values": {
"count": 0,
"rate": 0
}
},
"data_received": {
"type": "counter",
"contains": "data",
"values": {
"count": 17075371,
"rate": 242160.89588832358
}
},
"http_req_duration{scenario:measure,name:post_message}": {
"values": {
"max": 53.791625,
"avg": 2.996232064174453,
"min": 0.861194,
"med": 2.948,
"p(90)": 3.5552918,
"p(95)": 3.7865877,
"p(99)": 4.3190254999999995
},
"type": "trend",
"contains": "time"
},
"http_reqs": {
"values": {
"count": 7052,
"rate": 100.0106315584275
},
"type": "counter",
"contains": "default"
},
"vus_max": {
"contains": "default",
"values": {
"value": 20,
"min": 20,
"max": 20
},
"type": "gauge"
},
"http_req_waiting": {
"type": "trend",
"contains": "time",
"values": {
"p(95)": 3.8635248499999997,
"p(99)": 5.2155688399999915,
"max": 53.760833,
"avg": 3.065662827566643,
"min": 0.829445,
"med": 2.9556665,
"p(90)": 3.6086503
}
},
"http_req_blocked": {
"type": "trend",
"contains": "time",
"values": {
"min": 0.000625,
"med": 0.001667,
"p(90)": 0.002541,
"p(95)": 0.003041,
"p(99)": 0.006434919999999987,
"max": 0.540333,
"avg": 0.002490143788996061
}
},
"http_req_connecting": {
"contains": "time",
"values": {
"p(99)": 0,
"max": 0.235959,
"avg": 0.00042762110039705047,
"min": 0,
"med": 0,
"p(90)": 0,
"p(95)": 0
},
"type": "trend"
},
"http_req_duration{scenario:measure,name:get_history}": {
"type": "trend",
"contains": "time",
"values": {
"p(95)": 4.139021,
"p(99)": 5.169410699999997,
"max": 51.836375,
"avg": 3.2761305311973,
"min": 1.79625,
"med": 3.1579794999999997,
"p(90)": 3.8563755
}
},
"http_req_failed{scenario:measure}": {
"type": "rate",
"contains": "default",
"values": {
"rate": 0,
"passes": 0,
"fails": 6001
}
},
"iterations{scenario:measure}": {
"type": "counter",
"contains": "default",
"values": {
"count": 6001,
"rate": 85.10547362196873
}
}
},
"root_group": {
"groups": [],
"checks": [
{
"path": "::message 201",
"id": "6445aff337e1ade0bc10402fbac79882",
"passes": 5622,
"fails": 0,
"name": "message 201"
},
{
"fails": 0,
"name": "history 200",
"path": "::history 200",
"id": "fe27b3b8edd292c7f2170a6357b087d0",
"passes": 1380
}
],
"name": "",
"path": "",
"id": "d41d8cd98f00b204e9800998ecf8427e"
}
}
@@ -0,0 +1,657 @@
# date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
t_rel_s,up
-25.748,2
-25.645,2
-25.541,2
-25.439,2
-25.328,2
-25.218,2
-25.105,2
-25.002,2
-24.89,2
-24.778,2
-24.667,2
-24.556,2
-24.453,2
-24.341,2
-24.236,2
-24.132,2
-24.025,2
-23.912,2
-23.801,2
-23.691,2
-23.584,2
-23.472,2
-23.36,2
-23.249,2
-23.147,2
-23.035,2
-22.922,2
-22.819,2
-22.712,2
-22.6,2
-22.488,2
-22.381,2
-22.27,2
-22.164,2
-22.056,2
-21.947,2
-21.834,2
-21.724,2
-21.621,2
-21.516,2
-21.404,2
-21.3,2
-21.188,2
-21.083,2
-20.976,2
-20.868,2
-20.756,2
-20.652,2
-20.549,2
-20.442,2
-20.333,2
-20.222,2
-20.119,2
-20.005,2
-19.892,2
-19.784,2
-19.675,2
-19.561,2
-19.449,2
-19.337,2
-19.224,2
-19.121,2
-19.015,2
-18.908,2
-18.798,2
-18.689,2
-18.583,2
-18.476,2
-18.362,2
-18.254,2
-18.141,2
-18.032,2
-17.918,2
-17.806,2
-17.701,2
-17.596,2
-17.492,2
-17.388,2
-17.282,2
-17.179,2
-17.073,2
-16.961,2
-16.853,2
-16.742,2
-16.631,2
-16.517,2
-16.413,2
-16.3,2
-16.191,2
-16.085,2
-15.973,2
-15.86,2
-15.752,2
-15.639,2
-15.533,2
-15.425,2
-15.316,2
-15.21,2
-15.107,2
-15.0,2
-14.893,2
-14.783,2
-14.671,2
-14.558,2
-14.448,2
-14.336,2
-14.224,2
-14.114,2
-14.008,2
-13.901,2
-13.789,2
-13.677,2
-13.564,2
-13.458,2
-13.345,2
-13.242,2
-13.129,2
-13.018,2
-12.909,2
-12.8,2
-12.688,2
-12.575,2
-12.473,2
-12.361,2
-12.252,2
-12.139,2
-12.027,2
-11.917,2
-11.808,2
-11.701,2
-11.592,2
-11.482,2
-11.374,2
-11.268,2
-11.16,2
-11.054,2
-10.943,2
-10.838,2
-10.731,2
-10.627,2
-10.514,2
-10.408,2
-10.298,2
-10.184,2
-10.075,2
-9.969,2
-9.861,2
-9.756,2
-9.644,2
-9.532,2
-9.425,2
-9.314,2
-9.201,2
-9.088,2
-8.984,2
-8.871,2
-8.759,2
-8.654,2
-8.541,2
-8.428,2
-8.317,2
-8.208,2
-8.095,2
-7.982,2
-7.875,2
-7.768,2
-7.659,2
-7.547,2
-7.436,2
-7.333,2
-7.222,2
-7.112,2
-7.007,2
-6.895,2
-6.782,2
-6.67,2
-6.559,2
-6.452,2
-6.345,2
-6.234,2
-6.125,2
-6.017,2
-5.909,2
-5.799,2
-5.687,2
-5.575,2
-5.465,2
-5.354,2
-5.248,2
-5.142,2
-5.04,2
-4.934,2
-4.829,2
-4.717,2
-4.609,2
-4.5,2
-4.392,2
-4.284,2
-4.18,2
-4.068,2
-3.96,2
-3.853,2
-3.743,2
-3.63,2
-3.519,2
-3.413,2
-3.301,2
-3.198,2
-3.087,2
-2.975,2
-2.864,2
-2.758,2
-2.649,2
-2.544,2
-2.434,2
-2.326,2
-2.214,2
-2.1,2
-1.986,2
-1.875,2
-1.771,2
-1.659,2
-1.55,2
-1.437,2
-1.326,2
-1.217,2
-1.108,2
-0.999,2
-0.892,2
-0.779,2
-0.666,2
-0.555,2
-0.445,2
-0.335,2
-0.227,2
-0.117,2
-0.011,2
0.1,2
0.206,2
0.309,2
0.416,2
0.52,2
0.632,2
0.743,2
0.85,2
0.958,2
1.069,2
1.176,2
1.288,2
1.391,2
1.498,1
1.608,1
1.718,1
1.826,1
1.933,1
2.045,1
2.151,1
2.258,1
2.368,1
2.477,1
2.591,1
2.697,1
2.8,1
2.902,1
3.009,1
3.112,1
3.215,1
3.326,1
3.433,1
3.542,1
3.652,1
3.762,1
3.873,1
3.982,1
4.09,1
4.202,1
4.315,1
4.421,1
4.533,1
4.641,1
4.746,1
4.858,1
4.966,1
5.077,1
5.182,1
5.291,1
5.405,1
5.519,1
5.628,1
5.733,1
5.839,1
5.952,1
6.057,1
6.166,1
6.271,1
6.376,1
6.479,1
6.583,1
6.691,1
6.8,1
6.912,1
7.024,1
7.136,1
7.241,1
7.351,1
7.457,1
7.566,1
7.677,1
7.79,1
7.896,1
8.008,1
8.12,1
8.224,1
8.338,1
8.451,1
8.564,1
8.677,1
8.79,1
8.894,1
8.999,1
9.109,1
9.213,1
9.323,1
9.428,1
9.541,1
9.654,1
9.766,1
9.879,1
9.982,1
10.094,1
10.202,1
10.315,1
10.427,1
10.538,1
10.64,1
10.753,1
10.858,1
10.964,1
11.074,1
11.178,1
11.287,1
11.399,1
11.507,1
11.617,1
11.723,1
11.83,1
11.942,1
12.054,1
12.166,1
12.273,1
12.382,1
12.49,1
12.598,1
12.71,1
12.818,1
12.93,1
13.038,1
13.145,1
13.257,1
13.366,1
13.477,1
13.588,1
13.693,1
13.797,1
13.908,1
14.02,1
14.127,1
14.237,1
14.34,1
14.452,1
14.562,1
14.666,1
14.769,1
14.882,1
14.99,2
15.101,2
15.212,2
15.314,2
15.426,2
15.534,2
15.638,2
15.743,2
15.849,2
15.961,2
16.072,2
16.184,2
16.291,2
16.396,2
16.507,2
16.619,2
16.731,2
16.837,2
16.951,2
17.062,2
17.165,2
17.274,2
17.385,2
17.495,2
17.604,2
17.716,2
17.828,2
17.94,2
18.052,2
18.161,2
18.268,2
18.372,2
18.482,2
18.593,2
18.699,2
18.81,2
18.923,2
19.03,2
19.14,2
19.25,2
19.362,2
19.473,2
19.585,2
19.695,2
19.798,2
19.903,2
20.014,2
20.127,2
20.238,2
20.351,2
20.457,2
20.562,2
20.668,2
20.778,2
20.888,2
20.997,2
21.106,2
21.218,2
21.322,2
21.436,2
21.541,2
21.654,2
21.768,2
21.882,2
21.985,2
22.097,2
22.21,2
22.322,2
22.433,2
22.54,2
22.653,2
22.76,2
22.867,2
22.978,2
23.09,2
23.199,2
23.309,2
23.414,2
23.521,2
23.623,2
23.734,2
23.845,2
23.949,2
24.058,2
24.165,2
24.268,2
24.37,2
24.48,2
24.582,2
24.691,2
24.802,2
24.908,2
25.022,2
25.136,2
25.25,2
25.354,2
25.466,2
25.578,2
25.691,2
25.803,2
25.907,2
26.015,2
26.125,2
26.232,2
26.335,2
26.443,2
26.555,2
26.668,2
26.773,2
26.878,2
26.99,2
27.103,2
27.217,2
27.321,2
27.433,2
27.54,2
27.651,2
27.764,2
27.876,2
27.988,2
28.099,2
28.211,2
28.322,2
28.435,2
28.537,2
28.649,2
28.76,2
28.863,2
28.972,2
29.084,2
29.196,2
29.308,2
29.417,2
29.528,2
29.637,2
29.742,2
29.848,2
29.956,2
30.069,2
30.177,2
30.29,2
30.392,2
30.498,2
30.607,2
30.714,2
30.823,2
30.926,2
31.035,2
31.139,2
31.242,2
31.351,2
31.461,2
31.567,2
31.678,2
31.79,2
31.898,2
32.012,2
32.123,2
32.231,2
32.344,2
32.457,2
32.569,2
32.681,2
32.788,2
32.898,2
33.01,2
33.122,2
33.231,2
33.346,2
33.457,2
33.565,2
33.673,2
33.783,2
33.896,2
34.006,2
34.12,2
34.223,2
34.33,2
34.443,2
34.555,2
34.665,2
34.773,2
34.881,2
34.986,2
35.096,2
35.209,2
35.313,2
35.422,2
35.534,2
35.638,2
35.75,2
35.856,2
35.965,2
36.068,2
36.181,2
36.29,2
36.398,2
36.507,2
36.615,2
36.728,2
36.84,2
36.953,2
37.065,2
37.177,2
37.289,2
37.4,2
37.504,2
37.614,2
37.722,2
37.834,2
37.94,2
38.047,2
38.154,2
38.267,2
38.371,2
38.483,2
38.593,2
38.705,2
38.814,2
38.918,2
39.023,2
39.135,2
39.237,2
39.341,2
39.446,2
39.553,2
39.656,2
39.765,2
39.873,2
39.979,2
40.081,2
40.192,2
40.299,2
40.403,2
40.507,2
40.614,2
40.726,2
40.83,2
40.941,2
41.047,2
41.158,2
41.261,2
41.37,2
41.481,2
41.589,2
41.697,2
41.808,2
41.916,2
42.018,2
42.123,2
42.236,2
42.339,2
42.448,2
42.559,2
42.664,2
42.777,2
42.889,2
42.998,2
43.105,2
43.217,2
43.328,2
43.441,2
43.554,2
43.667,2
43.774,2
43.88,2
43.99,2
44.102,2
44.206,2
44.315,2
44.426,2
44.53,2
44.636,2
44.741,2
44.846,2
44.958,2
45.068,2
45.181,2
45.285,2
45.394,2
45.497,2
1 # date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
2 t_rel_s,up
3 -25.748,2
4 -25.645,2
5 -25.541,2
6 -25.439,2
7 -25.328,2
8 -25.218,2
9 -25.105,2
10 -25.002,2
11 -24.89,2
12 -24.778,2
13 -24.667,2
14 -24.556,2
15 -24.453,2
16 -24.341,2
17 -24.236,2
18 -24.132,2
19 -24.025,2
20 -23.912,2
21 -23.801,2
22 -23.691,2
23 -23.584,2
24 -23.472,2
25 -23.36,2
26 -23.249,2
27 -23.147,2
28 -23.035,2
29 -22.922,2
30 -22.819,2
31 -22.712,2
32 -22.6,2
33 -22.488,2
34 -22.381,2
35 -22.27,2
36 -22.164,2
37 -22.056,2
38 -21.947,2
39 -21.834,2
40 -21.724,2
41 -21.621,2
42 -21.516,2
43 -21.404,2
44 -21.3,2
45 -21.188,2
46 -21.083,2
47 -20.976,2
48 -20.868,2
49 -20.756,2
50 -20.652,2
51 -20.549,2
52 -20.442,2
53 -20.333,2
54 -20.222,2
55 -20.119,2
56 -20.005,2
57 -19.892,2
58 -19.784,2
59 -19.675,2
60 -19.561,2
61 -19.449,2
62 -19.337,2
63 -19.224,2
64 -19.121,2
65 -19.015,2
66 -18.908,2
67 -18.798,2
68 -18.689,2
69 -18.583,2
70 -18.476,2
71 -18.362,2
72 -18.254,2
73 -18.141,2
74 -18.032,2
75 -17.918,2
76 -17.806,2
77 -17.701,2
78 -17.596,2
79 -17.492,2
80 -17.388,2
81 -17.282,2
82 -17.179,2
83 -17.073,2
84 -16.961,2
85 -16.853,2
86 -16.742,2
87 -16.631,2
88 -16.517,2
89 -16.413,2
90 -16.3,2
91 -16.191,2
92 -16.085,2
93 -15.973,2
94 -15.86,2
95 -15.752,2
96 -15.639,2
97 -15.533,2
98 -15.425,2
99 -15.316,2
100 -15.21,2
101 -15.107,2
102 -15.0,2
103 -14.893,2
104 -14.783,2
105 -14.671,2
106 -14.558,2
107 -14.448,2
108 -14.336,2
109 -14.224,2
110 -14.114,2
111 -14.008,2
112 -13.901,2
113 -13.789,2
114 -13.677,2
115 -13.564,2
116 -13.458,2
117 -13.345,2
118 -13.242,2
119 -13.129,2
120 -13.018,2
121 -12.909,2
122 -12.8,2
123 -12.688,2
124 -12.575,2
125 -12.473,2
126 -12.361,2
127 -12.252,2
128 -12.139,2
129 -12.027,2
130 -11.917,2
131 -11.808,2
132 -11.701,2
133 -11.592,2
134 -11.482,2
135 -11.374,2
136 -11.268,2
137 -11.16,2
138 -11.054,2
139 -10.943,2
140 -10.838,2
141 -10.731,2
142 -10.627,2
143 -10.514,2
144 -10.408,2
145 -10.298,2
146 -10.184,2
147 -10.075,2
148 -9.969,2
149 -9.861,2
150 -9.756,2
151 -9.644,2
152 -9.532,2
153 -9.425,2
154 -9.314,2
155 -9.201,2
156 -9.088,2
157 -8.984,2
158 -8.871,2
159 -8.759,2
160 -8.654,2
161 -8.541,2
162 -8.428,2
163 -8.317,2
164 -8.208,2
165 -8.095,2
166 -7.982,2
167 -7.875,2
168 -7.768,2
169 -7.659,2
170 -7.547,2
171 -7.436,2
172 -7.333,2
173 -7.222,2
174 -7.112,2
175 -7.007,2
176 -6.895,2
177 -6.782,2
178 -6.67,2
179 -6.559,2
180 -6.452,2
181 -6.345,2
182 -6.234,2
183 -6.125,2
184 -6.017,2
185 -5.909,2
186 -5.799,2
187 -5.687,2
188 -5.575,2
189 -5.465,2
190 -5.354,2
191 -5.248,2
192 -5.142,2
193 -5.04,2
194 -4.934,2
195 -4.829,2
196 -4.717,2
197 -4.609,2
198 -4.5,2
199 -4.392,2
200 -4.284,2
201 -4.18,2
202 -4.068,2
203 -3.96,2
204 -3.853,2
205 -3.743,2
206 -3.63,2
207 -3.519,2
208 -3.413,2
209 -3.301,2
210 -3.198,2
211 -3.087,2
212 -2.975,2
213 -2.864,2
214 -2.758,2
215 -2.649,2
216 -2.544,2
217 -2.434,2
218 -2.326,2
219 -2.214,2
220 -2.1,2
221 -1.986,2
222 -1.875,2
223 -1.771,2
224 -1.659,2
225 -1.55,2
226 -1.437,2
227 -1.326,2
228 -1.217,2
229 -1.108,2
230 -0.999,2
231 -0.892,2
232 -0.779,2
233 -0.666,2
234 -0.555,2
235 -0.445,2
236 -0.335,2
237 -0.227,2
238 -0.117,2
239 -0.011,2
240 0.1,2
241 0.206,2
242 0.309,2
243 0.416,2
244 0.52,2
245 0.632,2
246 0.743,2
247 0.85,2
248 0.958,2
249 1.069,2
250 1.176,2
251 1.288,2
252 1.391,2
253 1.498,1
254 1.608,1
255 1.718,1
256 1.826,1
257 1.933,1
258 2.045,1
259 2.151,1
260 2.258,1
261 2.368,1
262 2.477,1
263 2.591,1
264 2.697,1
265 2.8,1
266 2.902,1
267 3.009,1
268 3.112,1
269 3.215,1
270 3.326,1
271 3.433,1
272 3.542,1
273 3.652,1
274 3.762,1
275 3.873,1
276 3.982,1
277 4.09,1
278 4.202,1
279 4.315,1
280 4.421,1
281 4.533,1
282 4.641,1
283 4.746,1
284 4.858,1
285 4.966,1
286 5.077,1
287 5.182,1
288 5.291,1
289 5.405,1
290 5.519,1
291 5.628,1
292 5.733,1
293 5.839,1
294 5.952,1
295 6.057,1
296 6.166,1
297 6.271,1
298 6.376,1
299 6.479,1
300 6.583,1
301 6.691,1
302 6.8,1
303 6.912,1
304 7.024,1
305 7.136,1
306 7.241,1
307 7.351,1
308 7.457,1
309 7.566,1
310 7.677,1
311 7.79,1
312 7.896,1
313 8.008,1
314 8.12,1
315 8.224,1
316 8.338,1
317 8.451,1
318 8.564,1
319 8.677,1
320 8.79,1
321 8.894,1
322 8.999,1
323 9.109,1
324 9.213,1
325 9.323,1
326 9.428,1
327 9.541,1
328 9.654,1
329 9.766,1
330 9.879,1
331 9.982,1
332 10.094,1
333 10.202,1
334 10.315,1
335 10.427,1
336 10.538,1
337 10.64,1
338 10.753,1
339 10.858,1
340 10.964,1
341 11.074,1
342 11.178,1
343 11.287,1
344 11.399,1
345 11.507,1
346 11.617,1
347 11.723,1
348 11.83,1
349 11.942,1
350 12.054,1
351 12.166,1
352 12.273,1
353 12.382,1
354 12.49,1
355 12.598,1
356 12.71,1
357 12.818,1
358 12.93,1
359 13.038,1
360 13.145,1
361 13.257,1
362 13.366,1
363 13.477,1
364 13.588,1
365 13.693,1
366 13.797,1
367 13.908,1
368 14.02,1
369 14.127,1
370 14.237,1
371 14.34,1
372 14.452,1
373 14.562,1
374 14.666,1
375 14.769,1
376 14.882,1
377 14.99,2
378 15.101,2
379 15.212,2
380 15.314,2
381 15.426,2
382 15.534,2
383 15.638,2
384 15.743,2
385 15.849,2
386 15.961,2
387 16.072,2
388 16.184,2
389 16.291,2
390 16.396,2
391 16.507,2
392 16.619,2
393 16.731,2
394 16.837,2
395 16.951,2
396 17.062,2
397 17.165,2
398 17.274,2
399 17.385,2
400 17.495,2
401 17.604,2
402 17.716,2
403 17.828,2
404 17.94,2
405 18.052,2
406 18.161,2
407 18.268,2
408 18.372,2
409 18.482,2
410 18.593,2
411 18.699,2
412 18.81,2
413 18.923,2
414 19.03,2
415 19.14,2
416 19.25,2
417 19.362,2
418 19.473,2
419 19.585,2
420 19.695,2
421 19.798,2
422 19.903,2
423 20.014,2
424 20.127,2
425 20.238,2
426 20.351,2
427 20.457,2
428 20.562,2
429 20.668,2
430 20.778,2
431 20.888,2
432 20.997,2
433 21.106,2
434 21.218,2
435 21.322,2
436 21.436,2
437 21.541,2
438 21.654,2
439 21.768,2
440 21.882,2
441 21.985,2
442 22.097,2
443 22.21,2
444 22.322,2
445 22.433,2
446 22.54,2
447 22.653,2
448 22.76,2
449 22.867,2
450 22.978,2
451 23.09,2
452 23.199,2
453 23.309,2
454 23.414,2
455 23.521,2
456 23.623,2
457 23.734,2
458 23.845,2
459 23.949,2
460 24.058,2
461 24.165,2
462 24.268,2
463 24.37,2
464 24.48,2
465 24.582,2
466 24.691,2
467 24.802,2
468 24.908,2
469 25.022,2
470 25.136,2
471 25.25,2
472 25.354,2
473 25.466,2
474 25.578,2
475 25.691,2
476 25.803,2
477 25.907,2
478 26.015,2
479 26.125,2
480 26.232,2
481 26.335,2
482 26.443,2
483 26.555,2
484 26.668,2
485 26.773,2
486 26.878,2
487 26.99,2
488 27.103,2
489 27.217,2
490 27.321,2
491 27.433,2
492 27.54,2
493 27.651,2
494 27.764,2
495 27.876,2
496 27.988,2
497 28.099,2
498 28.211,2
499 28.322,2
500 28.435,2
501 28.537,2
502 28.649,2
503 28.76,2
504 28.863,2
505 28.972,2
506 29.084,2
507 29.196,2
508 29.308,2
509 29.417,2
510 29.528,2
511 29.637,2
512 29.742,2
513 29.848,2
514 29.956,2
515 30.069,2
516 30.177,2
517 30.29,2
518 30.392,2
519 30.498,2
520 30.607,2
521 30.714,2
522 30.823,2
523 30.926,2
524 31.035,2
525 31.139,2
526 31.242,2
527 31.351,2
528 31.461,2
529 31.567,2
530 31.678,2
531 31.79,2
532 31.898,2
533 32.012,2
534 32.123,2
535 32.231,2
536 32.344,2
537 32.457,2
538 32.569,2
539 32.681,2
540 32.788,2
541 32.898,2
542 33.01,2
543 33.122,2
544 33.231,2
545 33.346,2
546 33.457,2
547 33.565,2
548 33.673,2
549 33.783,2
550 33.896,2
551 34.006,2
552 34.12,2
553 34.223,2
554 34.33,2
555 34.443,2
556 34.555,2
557 34.665,2
558 34.773,2
559 34.881,2
560 34.986,2
561 35.096,2
562 35.209,2
563 35.313,2
564 35.422,2
565 35.534,2
566 35.638,2
567 35.75,2
568 35.856,2
569 35.965,2
570 36.068,2
571 36.181,2
572 36.29,2
573 36.398,2
574 36.507,2
575 36.615,2
576 36.728,2
577 36.84,2
578 36.953,2
579 37.065,2
580 37.177,2
581 37.289,2
582 37.4,2
583 37.504,2
584 37.614,2
585 37.722,2
586 37.834,2
587 37.94,2
588 38.047,2
589 38.154,2
590 38.267,2
591 38.371,2
592 38.483,2
593 38.593,2
594 38.705,2
595 38.814,2
596 38.918,2
597 39.023,2
598 39.135,2
599 39.237,2
600 39.341,2
601 39.446,2
602 39.553,2
603 39.656,2
604 39.765,2
605 39.873,2
606 39.979,2
607 40.081,2
608 40.192,2
609 40.299,2
610 40.403,2
611 40.507,2
612 40.614,2
613 40.726,2
614 40.83,2
615 40.941,2
616 41.047,2
617 41.158,2
618 41.261,2
619 41.37,2
620 41.481,2
621 41.589,2
622 41.697,2
623 41.808,2
624 41.916,2
625 42.018,2
626 42.123,2
627 42.236,2
628 42.339,2
629 42.448,2
630 42.559,2
631 42.664,2
632 42.777,2
633 42.889,2
634 42.998,2
635 43.105,2
636 43.217,2
637 43.328,2
638 43.441,2
639 43.554,2
640 43.667,2
641 43.774,2
642 43.88,2
643 43.99,2
644 44.102,2
645 44.206,2
646 44.315,2
647 44.426,2
648 44.53,2
649 44.636,2
650 44.741,2
651 44.846,2
652 44.958,2
653 45.068,2
654 45.181,2
655 45.285,2
656 45.394,2
657 45.497,2
@@ -0,0 +1,644 @@
# date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
t_rel_s,status,latency_ms,instance
-25.748,201,3.4,7cfd91ddf780
-25.644,201,5.5,5bbf259ff136
-25.536,201,4.8,7cfd91ddf780
-25.431,201,3.4,7cfd91ddf780
-25.325,201,3.2,7cfd91ddf780
-25.217,201,4.9,5bbf259ff136
-25.107,201,3.4,7cfd91ddf780
-24.997,201,3.0,7cfd91ddf780
-24.884,201,3.5,7cfd91ddf780
-24.778,201,5.8,7cfd91ddf780
-24.664,201,5.3,7cfd91ddf780
-24.558,201,6.9,7cfd91ddf780
-24.442,201,4.8,5bbf259ff136
-24.331,201,5.8,5bbf259ff136
-24.215,201,5.9,5bbf259ff136
-24.1,201,5.1,7cfd91ddf780
-23.99,201,5.2,7cfd91ddf780
-23.875,201,5.0,7cfd91ddf780
-23.766,201,4.3,7cfd91ddf780
-23.657,201,5.1,7cfd91ddf780
-23.541,201,5.3,5bbf259ff136
-23.426,201,6.7,5bbf259ff136
-23.318,201,5.7,5bbf259ff136
-23.208,201,5.1,5bbf259ff136
-23.092,201,6.1,7cfd91ddf780
-22.978,201,4.6,7cfd91ddf780
-22.864,201,4.3,5bbf259ff136
-22.759,201,4.6,7cfd91ddf780
-22.644,201,5.3,5bbf259ff136
-22.531,201,5.7,5bbf259ff136
-22.417,201,4.9,5bbf259ff136
-22.308,201,4.6,5bbf259ff136
-22.197,201,5.7,5bbf259ff136
-22.082,201,5.0,7cfd91ddf780
-21.967,201,5.8,7cfd91ddf780
-21.852,201,5.3,5bbf259ff136
-21.74,201,4.5,5bbf259ff136
-21.625,201,6.9,7cfd91ddf780
-21.515,201,6.3,5bbf259ff136
-21.402,201,5.0,7cfd91ddf780
-21.287,201,4.5,7cfd91ddf780
-21.179,201,4.6,7cfd91ddf780
-21.067,201,5.3,7cfd91ddf780
-20.95,201,6.0,5bbf259ff136
-20.835,201,3.9,5bbf259ff136
-20.724,201,3.8,7cfd91ddf780
-20.617,201,4.8,5bbf259ff136
-20.506,201,6.4,5bbf259ff136
-20.392,201,5.9,7cfd91ddf780
-20.284,201,5.1,7cfd91ddf780
-20.175,201,7.0,5bbf259ff136
-20.068,201,4.9,5bbf259ff136
-19.958,201,5.2,5bbf259ff136
-19.843,201,5.2,7cfd91ddf780
-19.728,201,4.6,7cfd91ddf780
-19.622,201,6.1,7cfd91ddf780
-19.514,201,5.2,7cfd91ddf780
-19.405,201,5.7,7cfd91ddf780
-19.295,201,4.9,5bbf259ff136
-19.182,201,4.7,7cfd91ddf780
-19.076,201,6.0,5bbf259ff136
-18.967,201,5.8,5bbf259ff136
-18.86,201,5.6,5bbf259ff136
-18.748,201,6.3,5bbf259ff136
-18.642,201,6.0,5bbf259ff136
-18.533,201,5.0,5bbf259ff136
-18.426,201,5.5,7cfd91ddf780
-18.315,201,5.3,5bbf259ff136
-18.208,201,6.1,7cfd91ddf780
-18.092,201,4.6,5bbf259ff136
-17.979,201,5.3,5bbf259ff136
-17.867,201,5.5,5bbf259ff136
-17.752,201,3.8,7cfd91ddf780
-17.643,201,5.2,7cfd91ddf780
-17.531,201,5.1,7cfd91ddf780
-17.415,201,7.0,5bbf259ff136
-17.3,201,5.9,5bbf259ff136
-17.187,201,5.5,5bbf259ff136
-17.076,201,7.6,7cfd91ddf780
-16.967,201,5.9,5bbf259ff136
-16.86,201,4.9,5bbf259ff136
-16.747,201,6.0,5bbf259ff136
-16.631,201,6.8,7cfd91ddf780
-16.516,201,5.4,7cfd91ddf780
-16.407,201,4.9,7cfd91ddf780
-16.297,201,4.4,7cfd91ddf780
-16.188,201,4.9,7cfd91ddf780
-16.073,201,5.0,5bbf259ff136
-15.964,201,5.2,5bbf259ff136
-15.849,201,4.9,5bbf259ff136
-15.74,201,3.9,5bbf259ff136
-15.636,201,3.4,7cfd91ddf780
-15.523,201,5.0,5bbf259ff136
-15.416,201,4.3,7cfd91ddf780
-15.302,201,5.4,5bbf259ff136
-15.192,201,5.1,5bbf259ff136
-15.077,201,5.5,5bbf259ff136
-14.969,201,6.1,7cfd91ddf780
-14.859,201,5.1,7cfd91ddf780
-14.745,201,5.3,7cfd91ddf780
-14.63,201,6.8,5bbf259ff136
-14.514,201,5.5,5bbf259ff136
-14.398,201,6.2,7cfd91ddf780
-14.282,201,6.5,5bbf259ff136
-14.168,201,7.5,5bbf259ff136
-14.059,201,6.1,5bbf259ff136
-13.952,201,5.3,5bbf259ff136
-13.838,201,5.4,5bbf259ff136
-13.727,201,6.0,5bbf259ff136
-13.611,201,4.8,7cfd91ddf780
-13.504,201,6.4,5bbf259ff136
-13.394,201,6.9,7cfd91ddf780
-13.283,201,5.9,7cfd91ddf780
-13.172,201,6.3,7cfd91ddf780
-13.059,201,4.9,7cfd91ddf780
-12.948,201,4.7,7cfd91ddf780
-12.835,201,7.7,7cfd91ddf780
-12.722,201,6.1,5bbf259ff136
-12.607,201,5.3,5bbf259ff136
-12.5,201,5.3,5bbf259ff136
-12.395,201,6.2,7cfd91ddf780
-12.288,201,4.9,7cfd91ddf780
-12.18,201,5.3,7cfd91ddf780
-12.074,201,6.5,7cfd91ddf780
-11.967,201,5.8,5bbf259ff136
-11.859,201,4.6,5bbf259ff136
-11.747,201,5.1,5bbf259ff136
-11.637,201,4.7,5bbf259ff136
-11.525,201,5.4,5bbf259ff136
-11.41,201,5.2,7cfd91ddf780
-11.296,201,5.5,7cfd91ddf780
-11.189,201,5.4,7cfd91ddf780
-11.083,201,5.3,7cfd91ddf780
-10.968,201,4.5,7cfd91ddf780
-10.858,201,5.1,7cfd91ddf780
-10.75,201,5.1,7cfd91ddf780
-10.643,201,6.3,7cfd91ddf780
-10.534,201,3.8,7cfd91ddf780
-10.427,201,4.0,5bbf259ff136
-10.32,201,5.9,5bbf259ff136
-10.209,201,5.5,5bbf259ff136
-10.095,201,5.4,5bbf259ff136
-9.98,201,4.9,7cfd91ddf780
-9.868,201,5.4,7cfd91ddf780
-9.761,201,6.5,7cfd91ddf780
-9.644,201,4.8,5bbf259ff136
-9.531,201,6.3,5bbf259ff136
-9.417,201,5.1,5bbf259ff136
-9.303,201,4.8,7cfd91ddf780
-9.192,201,5.6,7cfd91ddf780
-9.084,201,4.8,7cfd91ddf780
-8.975,201,4.7,5bbf259ff136
-8.863,201,4.7,7cfd91ddf780
-8.75,201,4.8,7cfd91ddf780
-8.643,201,4.7,7cfd91ddf780
-8.536,201,5.2,5bbf259ff136
-8.424,201,5.2,5bbf259ff136
-8.318,201,7.7,5bbf259ff136
-8.205,201,5.1,5bbf259ff136
-8.098,201,5.7,5bbf259ff136
-7.983,201,6.8,7cfd91ddf780
-7.869,201,4.6,7cfd91ddf780
-7.76,201,5.0,7cfd91ddf780
-7.645,201,5.5,7cfd91ddf780
-7.531,201,5.0,5bbf259ff136
-7.425,201,3.3,7cfd91ddf780
-7.315,201,5.0,7cfd91ddf780
-7.202,201,5.6,5bbf259ff136
-7.092,201,5.2,5bbf259ff136
-6.985,201,4.9,7cfd91ddf780
-6.877,201,6.5,7cfd91ddf780
-6.76,201,5.0,5bbf259ff136
-6.65,201,4.6,5bbf259ff136
-6.536,201,5.2,5bbf259ff136
-6.423,201,5.4,7cfd91ddf780
-6.307,201,4.0,7cfd91ddf780
-6.203,201,4.3,7cfd91ddf780
-6.093,201,4.3,7cfd91ddf780
-5.985,201,7.2,5bbf259ff136
-5.868,201,4.4,7cfd91ddf780
-5.761,201,4.2,7cfd91ddf780
-5.657,201,4.9,5bbf259ff136
-5.546,201,5.7,5bbf259ff136
-5.434,201,4.5,7cfd91ddf780
-5.325,201,3.8,5bbf259ff136
-5.216,201,3.9,5bbf259ff136
-5.112,201,5.1,5bbf259ff136
-5.0,201,6.2,5bbf259ff136
-4.893,201,5.2,5bbf259ff136
-4.784,201,6.3,5bbf259ff136
-4.675,201,5.5,7cfd91ddf780
-4.567,201,4.6,7cfd91ddf780
-4.453,201,4.8,5bbf259ff136
-4.338,201,5.0,5bbf259ff136
-4.229,201,6.4,5bbf259ff136
-4.115,201,6.0,5bbf259ff136
-4.007,201,5.4,5bbf259ff136
-3.896,201,6.5,5bbf259ff136
-3.782,201,5.5,7cfd91ddf780
-3.669,201,5.5,7cfd91ddf780
-3.562,201,5.4,7cfd91ddf780
-3.452,201,5.5,7cfd91ddf780
-3.341,201,5.9,7cfd91ddf780
-3.234,201,6.5,7cfd91ddf780
-3.117,201,5.1,7cfd91ddf780
-3.007,201,6.6,7cfd91ddf780
-2.892,201,6.3,5bbf259ff136
-2.775,201,5.6,5bbf259ff136
-2.669,201,6.0,5bbf259ff136
-2.559,201,6.6,5bbf259ff136
-2.442,201,6.4,7cfd91ddf780
-2.326,201,3.6,7cfd91ddf780
-2.214,201,5.1,5bbf259ff136
-2.099,201,4.8,5bbf259ff136
-1.986,201,6.5,5bbf259ff136
-1.877,201,7.0,5bbf259ff136
-1.768,201,4.7,5bbf259ff136
-1.658,201,5.8,5bbf259ff136
-1.548,201,5.2,5bbf259ff136
-1.433,201,5.4,7cfd91ddf780
-1.326,201,7.0,5bbf259ff136
-1.217,201,5.3,5bbf259ff136
-1.108,201,5.1,5bbf259ff136
-0.995,201,4.4,5bbf259ff136
-0.884,201,5.8,7cfd91ddf780
-0.776,201,5.7,5bbf259ff136
-0.662,201,5.5,7cfd91ddf780
-0.554,201,6.5,7cfd91ddf780
-0.442,201,4.7,7cfd91ddf780
-0.331,201,5.1,7cfd91ddf780
-0.223,201,3.6,5bbf259ff136
-0.111,201,3.9,7cfd91ddf780
-0.004,201,5.0,5bbf259ff136
0.106,201,4.8,7cfd91ddf780
0.217,201,5.2,5bbf259ff136
0.323,201,6.3,5bbf259ff136
0.44,201,5.2,7cfd91ddf780
0.547,201,5.5,7cfd91ddf780
0.657,201,3.2,7cfd91ddf780
0.771,201,2.8,7cfd91ddf780
0.879,201,3.9,7cfd91ddf780
0.993,201,3.9,7cfd91ddf780
1.107,201,4.7,5bbf259ff136
1.222,201,4.9,5bbf259ff136
1.333,201,3.9,5bbf259ff136
1.439,201,6.0,5bbf259ff136
1.551,201,6.0,7cfd91ddf780
1.66,201,6.1,7cfd91ddf780
1.775,201,5.1,7cfd91ddf780
1.887,201,7.0,7cfd91ddf780
2.004,201,5.9,7cfd91ddf780
2.12,201,5.4,7cfd91ddf780
2.233,201,4.1,7cfd91ddf780
2.338,201,3.8,7cfd91ddf780
2.449,201,6.8,7cfd91ddf780
2.557,201,4.3,7cfd91ddf780
2.661,201,6.9,7cfd91ddf780
2.768,201,4.5,7cfd91ddf780
2.876,201,4.2,7cfd91ddf780
2.983,201,4.6,7cfd91ddf780
3.098,201,4.4,7cfd91ddf780
3.203,201,5.2,7cfd91ddf780
3.31,201,5.2,7cfd91ddf780
3.425,201,5.5,7cfd91ddf780
3.537,201,5.9,7cfd91ddf780
3.646,201,8.7,7cfd91ddf780
3.758,201,5.7,7cfd91ddf780
3.867,201,7.2,7cfd91ddf780
3.982,201,6.7,7cfd91ddf780
4.099,201,5.7,7cfd91ddf780
4.206,201,4.6,7cfd91ddf780
4.316,201,13.6,7cfd91ddf780
4.439,201,4.2,7cfd91ddf780
4.554,201,5.9,7cfd91ddf780
4.665,201,7.6,7cfd91ddf780
4.781,201,4.8,7cfd91ddf780
4.896,201,5.9,7cfd91ddf780
5.008,201,5.5,7cfd91ddf780
5.123,201,4.3,7cfd91ddf780
5.233,201,4.4,7cfd91ddf780
5.338,201,5.1,7cfd91ddf780
5.449,201,5.8,7cfd91ddf780
5.557,201,5.6,7cfd91ddf780
5.673,201,6.9,7cfd91ddf780
5.781,201,6.3,7cfd91ddf780
5.887,201,6.8,7cfd91ddf780
6.004,201,5.0,7cfd91ddf780
6.118,201,5.1,7cfd91ddf780
6.232,201,5.5,7cfd91ddf780
6.347,201,5.2,7cfd91ddf780
6.454,201,5.8,7cfd91ddf780
6.564,201,5.1,7cfd91ddf780
6.674,201,4.4,7cfd91ddf780
6.783,201,5.7,7cfd91ddf780
6.892,201,3.0,7cfd91ddf780
7.004,201,6.7,7cfd91ddf780
7.119,201,6.2,7cfd91ddf780
7.235,201,5.3,7cfd91ddf780
7.351,201,6.6,7cfd91ddf780
7.458,201,6.4,7cfd91ddf780
7.568,201,5.2,7cfd91ddf780
7.677,201,7.3,7cfd91ddf780
7.793,201,5.2,7cfd91ddf780
7.899,201,3.3,7cfd91ddf780
8.012,201,2.8,7cfd91ddf780
8.124,201,3.9,7cfd91ddf780
8.232,201,4.9,7cfd91ddf780
8.337,201,6.0,7cfd91ddf780
8.449,201,5.9,7cfd91ddf780
8.563,201,5.8,7cfd91ddf780
8.674,201,7.4,7cfd91ddf780
8.782,201,4.3,7cfd91ddf780
8.894,201,6.0,7cfd91ddf780
9.01,201,4.9,7cfd91ddf780
9.122,201,5.6,7cfd91ddf780
9.233,201,6.0,7cfd91ddf780
9.339,201,5.2,7cfd91ddf780
9.449,201,6.0,7cfd91ddf780
9.556,201,6.4,7cfd91ddf780
9.673,201,5.0,7cfd91ddf780
9.788,201,5.0,7cfd91ddf780
9.899,201,4.8,7cfd91ddf780
10.009,201,5.2,7cfd91ddf780
10.12,201,5.8,7cfd91ddf780
10.233,201,4.7,7cfd91ddf780
10.348,201,4.6,7cfd91ddf780
10.453,201,4.3,7cfd91ddf780
10.566,201,5.3,7cfd91ddf780
10.681,201,5.9,7cfd91ddf780
10.789,201,7.5,7cfd91ddf780
10.899,201,6.3,7cfd91ddf780
11.012,201,6.7,7cfd91ddf780
11.122,201,4.8,7cfd91ddf780
11.228,201,5.5,7cfd91ddf780
11.343,201,4.9,7cfd91ddf780
11.458,201,5.8,7cfd91ddf780
11.573,201,5.4,7cfd91ddf780
11.688,201,6.7,7cfd91ddf780
11.805,201,5.5,7cfd91ddf780
11.916,201,6.0,7cfd91ddf780
12.023,201,5.8,7cfd91ddf780
12.137,201,6.0,7cfd91ddf780
12.244,201,4.7,7cfd91ddf780
12.355,201,6.5,7cfd91ddf780
12.466,201,5.1,7cfd91ddf780
12.578,201,5.1,7cfd91ddf780
12.69,201,5.4,7cfd91ddf780
12.8,201,5.2,7cfd91ddf780
12.915,201,4.0,7cfd91ddf780
13.026,201,4.9,7cfd91ddf780
13.138,201,3.7,7cfd91ddf780
13.242,201,4.3,7cfd91ddf780
13.351,201,3.3,7cfd91ddf780
13.455,201,3.9,7cfd91ddf780
13.569,201,3.5,7cfd91ddf780
13.676,201,3.9,7cfd91ddf780
13.782,201,3.1,7cfd91ddf780
13.89,201,3.8,7cfd91ddf780
13.999,201,4.0,7cfd91ddf780
14.103,201,4.8,7cfd91ddf780
14.21,201,4.8,7cfd91ddf780
14.318,201,5.0,7cfd91ddf780
14.43,201,5.3,7cfd91ddf780
14.543,201,5.1,7cfd91ddf780
14.65,201,5.2,7cfd91ddf780
14.756,201,4.8,7cfd91ddf780
14.863,201,5.7,7cfd91ddf780
14.979,201,5.9,7cfd91ddf780
15.093,201,5.5,7cfd91ddf780
15.203,201,5.1,7cfd91ddf780
15.309,201,4.9,7cfd91ddf780
15.416,201,8.0,7cfd91ddf780
15.534,201,6.0,7cfd91ddf780
15.642,201,3.5,7cfd91ddf780
15.756,201,4.7,5bbf259ff136
15.871,201,6.0,5bbf259ff136
15.987,201,4.7,7cfd91ddf780
16.097,201,4.9,7cfd91ddf780
16.212,201,5.2,7cfd91ddf780
16.324,201,6.2,7cfd91ddf780
16.44,201,5.5,5bbf259ff136
16.556,201,4.9,7cfd91ddf780
16.666,201,5.2,7cfd91ddf780
16.777,201,6.3,7cfd91ddf780
16.893,201,5.8,7cfd91ddf780
17.009,201,5.4,5bbf259ff136
17.123,201,5.5,5bbf259ff136
17.229,201,5.4,5bbf259ff136
17.343,201,5.1,5bbf259ff136
17.457,201,5.4,7cfd91ddf780
17.564,201,5.2,5bbf259ff136
17.679,201,7.2,7cfd91ddf780
17.79,201,6.8,7cfd91ddf780
17.899,201,5.0,7cfd91ddf780
18.013,201,5.1,7cfd91ddf780
18.126,201,8.5,5bbf259ff136
18.241,201,3.9,5bbf259ff136
18.352,201,4.5,5bbf259ff136
18.465,201,5.5,7cfd91ddf780
18.577,201,5.9,7cfd91ddf780
18.691,201,4.8,7cfd91ddf780
18.806,201,14.2,5bbf259ff136
18.92,201,5.3,5bbf259ff136
19.03,201,4.6,5bbf259ff136
19.141,201,5.5,5bbf259ff136
19.249,201,5.7,5bbf259ff136
19.357,201,4.8,5bbf259ff136
19.468,201,5.1,5bbf259ff136
19.582,201,6.6,5bbf259ff136
19.695,201,5.3,7cfd91ddf780
19.802,201,5.1,5bbf259ff136
19.912,201,4.9,5bbf259ff136
20.021,201,5.2,5bbf259ff136
20.136,201,5.4,7cfd91ddf780
20.251,201,4.2,7cfd91ddf780
20.361,201,5.0,7cfd91ddf780
20.473,201,5.2,7cfd91ddf780
20.582,201,5.0,7cfd91ddf780
20.692,201,5.9,7cfd91ddf780
20.805,201,4.7,7cfd91ddf780
20.912,201,4.5,7cfd91ddf780
21.023,201,4.7,7cfd91ddf780
21.137,201,5.2,5bbf259ff136
21.249,201,4.4,5bbf259ff136
21.362,201,5.1,5bbf259ff136
21.472,201,5.0,5bbf259ff136
21.583,201,5.6,5bbf259ff136
21.691,201,6.1,5bbf259ff136
21.8,201,7.2,5bbf259ff136
21.917,201,6.8,7cfd91ddf780
22.03,201,5.0,7cfd91ddf780
22.137,201,6.5,7cfd91ddf780
22.253,201,7.0,7cfd91ddf780
22.364,201,5.3,7cfd91ddf780
22.474,201,5.3,7cfd91ddf780
22.582,201,5.7,7cfd91ddf780
22.691,201,5.6,7cfd91ddf780
22.801,201,4.9,7cfd91ddf780
22.916,201,4.4,5bbf259ff136
23.02,201,4.9,7cfd91ddf780
23.135,201,5.3,5bbf259ff136
23.242,201,6.3,7cfd91ddf780
23.358,201,4.7,5bbf259ff136
23.467,201,4.5,5bbf259ff136
23.572,201,4.1,7cfd91ddf780
23.682,201,5.6,7cfd91ddf780
23.79,201,4.8,7cfd91ddf780
23.905,201,5.1,5bbf259ff136
24.015,201,5.0,5bbf259ff136
24.122,201,4.7,7cfd91ddf780
24.233,201,4.4,7cfd91ddf780
24.342,201,5.8,7cfd91ddf780
24.458,201,6.0,5bbf259ff136
24.569,201,5.4,5bbf259ff136
24.684,201,6.7,7cfd91ddf780
24.801,201,5.3,7cfd91ddf780
24.916,201,5.2,5bbf259ff136
25.023,201,6.6,7cfd91ddf780
25.14,201,5.7,5bbf259ff136
25.251,201,4.5,5bbf259ff136
25.357,201,5.0,5bbf259ff136
25.472,201,5.1,5bbf259ff136
25.582,201,4.8,5bbf259ff136
25.691,201,6.0,5bbf259ff136
25.807,201,5.2,7cfd91ddf780
25.915,201,4.9,7cfd91ddf780
26.03,201,5.1,7cfd91ddf780
26.14,201,5.1,7cfd91ddf780
26.247,201,5.6,7cfd91ddf780
26.354,201,5.3,5bbf259ff136
26.467,201,6.8,7cfd91ddf780
26.583,201,5.2,7cfd91ddf780
26.694,201,5.2,7cfd91ddf780
26.806,201,6.2,5bbf259ff136
26.914,201,6.5,5bbf259ff136
27.031,201,5.9,5bbf259ff136
27.144,201,5.4,7cfd91ddf780
27.255,201,5.1,7cfd91ddf780
27.362,201,6.0,5bbf259ff136
27.478,201,6.3,7cfd91ddf780
27.59,201,6.3,7cfd91ddf780
27.707,201,5.4,5bbf259ff136
27.814,201,7.4,5bbf259ff136
27.929,201,3.9,5bbf259ff136
28.04,201,4.0,5bbf259ff136
28.153,201,5.2,5bbf259ff136
28.269,201,4.8,7cfd91ddf780
28.381,201,5.6,7cfd91ddf780
28.487,201,5.1,7cfd91ddf780
28.597,201,5.1,7cfd91ddf780
28.708,201,3.9,7cfd91ddf780
28.816,201,5.1,7cfd91ddf780
28.931,201,4.9,7cfd91ddf780
29.046,201,5.9,5bbf259ff136
29.162,201,4.9,5bbf259ff136
29.276,201,3.8,7cfd91ddf780
29.381,201,5.3,5bbf259ff136
29.489,201,4.7,5bbf259ff136
29.6,201,4.9,5bbf259ff136
29.715,201,5.9,7cfd91ddf780
29.825,201,5.5,7cfd91ddf780
29.94,201,5.9,7cfd91ddf780
30.047,201,7.0,7cfd91ddf780
30.155,201,5.5,7cfd91ddf780
30.271,201,6.1,7cfd91ddf780
30.38,201,4.9,7cfd91ddf780
30.49,201,5.3,7cfd91ddf780
30.597,201,7.2,7cfd91ddf780
30.714,201,6.6,5bbf259ff136
30.822,201,6.9,7cfd91ddf780
30.933,201,6.4,7cfd91ddf780
31.049,201,3.8,5bbf259ff136
31.163,201,4.9,5bbf259ff136
31.273,201,5.4,5bbf259ff136
31.383,201,5.1,5bbf259ff136
31.49,201,5.0,5bbf259ff136
31.605,201,5.9,7cfd91ddf780
31.717,201,6.5,7cfd91ddf780
31.825,201,5.7,7cfd91ddf780
31.938,201,5.0,7cfd91ddf780
32.053,201,4.8,7cfd91ddf780
32.164,201,4.9,7cfd91ddf780
32.271,201,4.6,7cfd91ddf780
32.378,201,4.7,7cfd91ddf780
32.49,201,5.0,7cfd91ddf780
32.605,201,4.2,7cfd91ddf780
32.717,201,4.1,5bbf259ff136
32.828,201,5.4,5bbf259ff136
32.937,201,6.0,5bbf259ff136
33.048,201,6.2,5bbf259ff136
33.163,201,5.3,5bbf259ff136
33.276,201,6.7,7cfd91ddf780
33.39,201,6.6,7cfd91ddf780
33.501,201,5.0,7cfd91ddf780
33.616,201,5.3,5bbf259ff136
33.722,201,4.9,7cfd91ddf780
33.831,201,3.9,7cfd91ddf780
33.945,201,5.9,5bbf259ff136
34.06,201,5.4,5bbf259ff136
34.168,201,5.5,5bbf259ff136
34.28,201,5.6,5bbf259ff136
34.392,201,3.1,5bbf259ff136
34.505,201,5.5,7cfd91ddf780
34.621,201,4.7,7cfd91ddf780
34.736,201,5.2,5bbf259ff136
34.851,201,6.5,5bbf259ff136
34.965,201,5.7,7cfd91ddf780
35.072,201,4.9,5bbf259ff136
35.182,201,6.6,5bbf259ff136
35.291,201,4.8,5bbf259ff136
35.403,201,6.7,5bbf259ff136
35.518,201,6.8,7cfd91ddf780
35.627,201,4.7,7cfd91ddf780
35.732,201,6.7,5bbf259ff136
35.848,201,5.8,7cfd91ddf780
35.962,201,6.7,7cfd91ddf780
36.073,201,5.2,7cfd91ddf780
36.182,201,6.8,7cfd91ddf780
36.29,201,6.2,7cfd91ddf780
36.405,201,5.0,5bbf259ff136
36.52,201,5.0,5bbf259ff136
36.634,201,5.0,5bbf259ff136
36.747,201,4.6,7cfd91ddf780
36.861,201,5.0,7cfd91ddf780
36.974,201,5.6,5bbf259ff136
37.088,201,4.8,5bbf259ff136
37.203,201,5.6,5bbf259ff136
37.314,201,5.5,7cfd91ddf780
37.43,201,5.7,7cfd91ddf780
37.545,201,4.8,7cfd91ddf780
37.659,201,4.3,5bbf259ff136
37.765,201,5.4,5bbf259ff136
37.873,201,5.3,7cfd91ddf780
37.981,201,6.1,7cfd91ddf780
38.097,201,6.0,5bbf259ff136
38.214,201,6.3,7cfd91ddf780
38.327,201,5.5,7cfd91ddf780
38.44,201,6.0,7cfd91ddf780
38.548,201,5.4,7cfd91ddf780
38.656,201,6.9,7cfd91ddf780
38.765,201,3.5,5bbf259ff136
38.868,201,3.5,5bbf259ff136
38.981,201,3.7,5bbf259ff136
39.088,201,3.1,5bbf259ff136
39.2,201,3.6,5bbf259ff136
39.308,201,4.0,5bbf259ff136
39.414,201,4.3,7cfd91ddf780
39.523,201,3.5,7cfd91ddf780
39.635,201,4.3,5bbf259ff136
39.744,201,4.2,5bbf259ff136
39.859,201,4.0,5bbf259ff136
39.965,201,3.4,5bbf259ff136
40.076,201,7.7,5bbf259ff136
40.192,201,6.5,5bbf259ff136
40.306,201,5.0,7cfd91ddf780
40.414,201,3.5,5bbf259ff136
40.518,201,2.6,5bbf259ff136
40.623,201,2.6,7cfd91ddf780
40.733,201,4.6,7cfd91ddf780
40.845,201,4.6,5bbf259ff136
40.958,201,4.2,5bbf259ff136
41.064,201,4.2,7cfd91ddf780
41.171,201,2.8,7cfd91ddf780
41.281,201,4.9,7cfd91ddf780
41.388,201,4.3,7cfd91ddf780
41.497,201,5.0,7cfd91ddf780
41.606,201,5.1,7cfd91ddf780
41.721,201,2.9,7cfd91ddf780
41.829,201,4.8,7cfd91ddf780
41.942,201,3.0,7cfd91ddf780
42.053,201,5.6,7cfd91ddf780
42.164,201,6.5,7cfd91ddf780
42.281,201,5.6,5bbf259ff136
42.389,201,4.5,5bbf259ff136
42.503,201,4.6,5bbf259ff136
42.618,201,5.8,7cfd91ddf780
42.734,201,5.2,7cfd91ddf780
42.849,201,5.9,5bbf259ff136
42.959,201,5.0,5bbf259ff136
43.066,201,4.9,5bbf259ff136
43.181,201,6.2,5bbf259ff136
43.289,201,5.7,5bbf259ff136
43.4,201,6.0,5bbf259ff136
43.516,201,7.1,7cfd91ddf780
43.631,201,6.1,7cfd91ddf780
43.746,201,6.7,5bbf259ff136
43.862,201,5.9,5bbf259ff136
43.969,201,5.5,5bbf259ff136
44.084,201,5.4,7cfd91ddf780
44.2,201,4.6,7cfd91ddf780
44.305,201,5.8,7cfd91ddf780
44.421,201,6.1,7cfd91ddf780
44.53,201,5.2,7cfd91ddf780
44.637,201,3.7,7cfd91ddf780
44.75,201,3.3,7cfd91ddf780
44.855,201,3.8,5bbf259ff136
44.961,201,4.7,5bbf259ff136
45.072,201,6.1,7cfd91ddf780
45.184,201,7.3,5bbf259ff136
45.296,201,7.5,7cfd91ddf780
45.409,201,5.2,5bbf259ff136
45.521,201,5.5,7cfd91ddf780
1 # date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
2 t_rel_s,status,latency_ms,instance
3 -25.748,201,3.4,7cfd91ddf780
4 -25.644,201,5.5,5bbf259ff136
5 -25.536,201,4.8,7cfd91ddf780
6 -25.431,201,3.4,7cfd91ddf780
7 -25.325,201,3.2,7cfd91ddf780
8 -25.217,201,4.9,5bbf259ff136
9 -25.107,201,3.4,7cfd91ddf780
10 -24.997,201,3.0,7cfd91ddf780
11 -24.884,201,3.5,7cfd91ddf780
12 -24.778,201,5.8,7cfd91ddf780
13 -24.664,201,5.3,7cfd91ddf780
14 -24.558,201,6.9,7cfd91ddf780
15 -24.442,201,4.8,5bbf259ff136
16 -24.331,201,5.8,5bbf259ff136
17 -24.215,201,5.9,5bbf259ff136
18 -24.1,201,5.1,7cfd91ddf780
19 -23.99,201,5.2,7cfd91ddf780
20 -23.875,201,5.0,7cfd91ddf780
21 -23.766,201,4.3,7cfd91ddf780
22 -23.657,201,5.1,7cfd91ddf780
23 -23.541,201,5.3,5bbf259ff136
24 -23.426,201,6.7,5bbf259ff136
25 -23.318,201,5.7,5bbf259ff136
26 -23.208,201,5.1,5bbf259ff136
27 -23.092,201,6.1,7cfd91ddf780
28 -22.978,201,4.6,7cfd91ddf780
29 -22.864,201,4.3,5bbf259ff136
30 -22.759,201,4.6,7cfd91ddf780
31 -22.644,201,5.3,5bbf259ff136
32 -22.531,201,5.7,5bbf259ff136
33 -22.417,201,4.9,5bbf259ff136
34 -22.308,201,4.6,5bbf259ff136
35 -22.197,201,5.7,5bbf259ff136
36 -22.082,201,5.0,7cfd91ddf780
37 -21.967,201,5.8,7cfd91ddf780
38 -21.852,201,5.3,5bbf259ff136
39 -21.74,201,4.5,5bbf259ff136
40 -21.625,201,6.9,7cfd91ddf780
41 -21.515,201,6.3,5bbf259ff136
42 -21.402,201,5.0,7cfd91ddf780
43 -21.287,201,4.5,7cfd91ddf780
44 -21.179,201,4.6,7cfd91ddf780
45 -21.067,201,5.3,7cfd91ddf780
46 -20.95,201,6.0,5bbf259ff136
47 -20.835,201,3.9,5bbf259ff136
48 -20.724,201,3.8,7cfd91ddf780
49 -20.617,201,4.8,5bbf259ff136
50 -20.506,201,6.4,5bbf259ff136
51 -20.392,201,5.9,7cfd91ddf780
52 -20.284,201,5.1,7cfd91ddf780
53 -20.175,201,7.0,5bbf259ff136
54 -20.068,201,4.9,5bbf259ff136
55 -19.958,201,5.2,5bbf259ff136
56 -19.843,201,5.2,7cfd91ddf780
57 -19.728,201,4.6,7cfd91ddf780
58 -19.622,201,6.1,7cfd91ddf780
59 -19.514,201,5.2,7cfd91ddf780
60 -19.405,201,5.7,7cfd91ddf780
61 -19.295,201,4.9,5bbf259ff136
62 -19.182,201,4.7,7cfd91ddf780
63 -19.076,201,6.0,5bbf259ff136
64 -18.967,201,5.8,5bbf259ff136
65 -18.86,201,5.6,5bbf259ff136
66 -18.748,201,6.3,5bbf259ff136
67 -18.642,201,6.0,5bbf259ff136
68 -18.533,201,5.0,5bbf259ff136
69 -18.426,201,5.5,7cfd91ddf780
70 -18.315,201,5.3,5bbf259ff136
71 -18.208,201,6.1,7cfd91ddf780
72 -18.092,201,4.6,5bbf259ff136
73 -17.979,201,5.3,5bbf259ff136
74 -17.867,201,5.5,5bbf259ff136
75 -17.752,201,3.8,7cfd91ddf780
76 -17.643,201,5.2,7cfd91ddf780
77 -17.531,201,5.1,7cfd91ddf780
78 -17.415,201,7.0,5bbf259ff136
79 -17.3,201,5.9,5bbf259ff136
80 -17.187,201,5.5,5bbf259ff136
81 -17.076,201,7.6,7cfd91ddf780
82 -16.967,201,5.9,5bbf259ff136
83 -16.86,201,4.9,5bbf259ff136
84 -16.747,201,6.0,5bbf259ff136
85 -16.631,201,6.8,7cfd91ddf780
86 -16.516,201,5.4,7cfd91ddf780
87 -16.407,201,4.9,7cfd91ddf780
88 -16.297,201,4.4,7cfd91ddf780
89 -16.188,201,4.9,7cfd91ddf780
90 -16.073,201,5.0,5bbf259ff136
91 -15.964,201,5.2,5bbf259ff136
92 -15.849,201,4.9,5bbf259ff136
93 -15.74,201,3.9,5bbf259ff136
94 -15.636,201,3.4,7cfd91ddf780
95 -15.523,201,5.0,5bbf259ff136
96 -15.416,201,4.3,7cfd91ddf780
97 -15.302,201,5.4,5bbf259ff136
98 -15.192,201,5.1,5bbf259ff136
99 -15.077,201,5.5,5bbf259ff136
100 -14.969,201,6.1,7cfd91ddf780
101 -14.859,201,5.1,7cfd91ddf780
102 -14.745,201,5.3,7cfd91ddf780
103 -14.63,201,6.8,5bbf259ff136
104 -14.514,201,5.5,5bbf259ff136
105 -14.398,201,6.2,7cfd91ddf780
106 -14.282,201,6.5,5bbf259ff136
107 -14.168,201,7.5,5bbf259ff136
108 -14.059,201,6.1,5bbf259ff136
109 -13.952,201,5.3,5bbf259ff136
110 -13.838,201,5.4,5bbf259ff136
111 -13.727,201,6.0,5bbf259ff136
112 -13.611,201,4.8,7cfd91ddf780
113 -13.504,201,6.4,5bbf259ff136
114 -13.394,201,6.9,7cfd91ddf780
115 -13.283,201,5.9,7cfd91ddf780
116 -13.172,201,6.3,7cfd91ddf780
117 -13.059,201,4.9,7cfd91ddf780
118 -12.948,201,4.7,7cfd91ddf780
119 -12.835,201,7.7,7cfd91ddf780
120 -12.722,201,6.1,5bbf259ff136
121 -12.607,201,5.3,5bbf259ff136
122 -12.5,201,5.3,5bbf259ff136
123 -12.395,201,6.2,7cfd91ddf780
124 -12.288,201,4.9,7cfd91ddf780
125 -12.18,201,5.3,7cfd91ddf780
126 -12.074,201,6.5,7cfd91ddf780
127 -11.967,201,5.8,5bbf259ff136
128 -11.859,201,4.6,5bbf259ff136
129 -11.747,201,5.1,5bbf259ff136
130 -11.637,201,4.7,5bbf259ff136
131 -11.525,201,5.4,5bbf259ff136
132 -11.41,201,5.2,7cfd91ddf780
133 -11.296,201,5.5,7cfd91ddf780
134 -11.189,201,5.4,7cfd91ddf780
135 -11.083,201,5.3,7cfd91ddf780
136 -10.968,201,4.5,7cfd91ddf780
137 -10.858,201,5.1,7cfd91ddf780
138 -10.75,201,5.1,7cfd91ddf780
139 -10.643,201,6.3,7cfd91ddf780
140 -10.534,201,3.8,7cfd91ddf780
141 -10.427,201,4.0,5bbf259ff136
142 -10.32,201,5.9,5bbf259ff136
143 -10.209,201,5.5,5bbf259ff136
144 -10.095,201,5.4,5bbf259ff136
145 -9.98,201,4.9,7cfd91ddf780
146 -9.868,201,5.4,7cfd91ddf780
147 -9.761,201,6.5,7cfd91ddf780
148 -9.644,201,4.8,5bbf259ff136
149 -9.531,201,6.3,5bbf259ff136
150 -9.417,201,5.1,5bbf259ff136
151 -9.303,201,4.8,7cfd91ddf780
152 -9.192,201,5.6,7cfd91ddf780
153 -9.084,201,4.8,7cfd91ddf780
154 -8.975,201,4.7,5bbf259ff136
155 -8.863,201,4.7,7cfd91ddf780
156 -8.75,201,4.8,7cfd91ddf780
157 -8.643,201,4.7,7cfd91ddf780
158 -8.536,201,5.2,5bbf259ff136
159 -8.424,201,5.2,5bbf259ff136
160 -8.318,201,7.7,5bbf259ff136
161 -8.205,201,5.1,5bbf259ff136
162 -8.098,201,5.7,5bbf259ff136
163 -7.983,201,6.8,7cfd91ddf780
164 -7.869,201,4.6,7cfd91ddf780
165 -7.76,201,5.0,7cfd91ddf780
166 -7.645,201,5.5,7cfd91ddf780
167 -7.531,201,5.0,5bbf259ff136
168 -7.425,201,3.3,7cfd91ddf780
169 -7.315,201,5.0,7cfd91ddf780
170 -7.202,201,5.6,5bbf259ff136
171 -7.092,201,5.2,5bbf259ff136
172 -6.985,201,4.9,7cfd91ddf780
173 -6.877,201,6.5,7cfd91ddf780
174 -6.76,201,5.0,5bbf259ff136
175 -6.65,201,4.6,5bbf259ff136
176 -6.536,201,5.2,5bbf259ff136
177 -6.423,201,5.4,7cfd91ddf780
178 -6.307,201,4.0,7cfd91ddf780
179 -6.203,201,4.3,7cfd91ddf780
180 -6.093,201,4.3,7cfd91ddf780
181 -5.985,201,7.2,5bbf259ff136
182 -5.868,201,4.4,7cfd91ddf780
183 -5.761,201,4.2,7cfd91ddf780
184 -5.657,201,4.9,5bbf259ff136
185 -5.546,201,5.7,5bbf259ff136
186 -5.434,201,4.5,7cfd91ddf780
187 -5.325,201,3.8,5bbf259ff136
188 -5.216,201,3.9,5bbf259ff136
189 -5.112,201,5.1,5bbf259ff136
190 -5.0,201,6.2,5bbf259ff136
191 -4.893,201,5.2,5bbf259ff136
192 -4.784,201,6.3,5bbf259ff136
193 -4.675,201,5.5,7cfd91ddf780
194 -4.567,201,4.6,7cfd91ddf780
195 -4.453,201,4.8,5bbf259ff136
196 -4.338,201,5.0,5bbf259ff136
197 -4.229,201,6.4,5bbf259ff136
198 -4.115,201,6.0,5bbf259ff136
199 -4.007,201,5.4,5bbf259ff136
200 -3.896,201,6.5,5bbf259ff136
201 -3.782,201,5.5,7cfd91ddf780
202 -3.669,201,5.5,7cfd91ddf780
203 -3.562,201,5.4,7cfd91ddf780
204 -3.452,201,5.5,7cfd91ddf780
205 -3.341,201,5.9,7cfd91ddf780
206 -3.234,201,6.5,7cfd91ddf780
207 -3.117,201,5.1,7cfd91ddf780
208 -3.007,201,6.6,7cfd91ddf780
209 -2.892,201,6.3,5bbf259ff136
210 -2.775,201,5.6,5bbf259ff136
211 -2.669,201,6.0,5bbf259ff136
212 -2.559,201,6.6,5bbf259ff136
213 -2.442,201,6.4,7cfd91ddf780
214 -2.326,201,3.6,7cfd91ddf780
215 -2.214,201,5.1,5bbf259ff136
216 -2.099,201,4.8,5bbf259ff136
217 -1.986,201,6.5,5bbf259ff136
218 -1.877,201,7.0,5bbf259ff136
219 -1.768,201,4.7,5bbf259ff136
220 -1.658,201,5.8,5bbf259ff136
221 -1.548,201,5.2,5bbf259ff136
222 -1.433,201,5.4,7cfd91ddf780
223 -1.326,201,7.0,5bbf259ff136
224 -1.217,201,5.3,5bbf259ff136
225 -1.108,201,5.1,5bbf259ff136
226 -0.995,201,4.4,5bbf259ff136
227 -0.884,201,5.8,7cfd91ddf780
228 -0.776,201,5.7,5bbf259ff136
229 -0.662,201,5.5,7cfd91ddf780
230 -0.554,201,6.5,7cfd91ddf780
231 -0.442,201,4.7,7cfd91ddf780
232 -0.331,201,5.1,7cfd91ddf780
233 -0.223,201,3.6,5bbf259ff136
234 -0.111,201,3.9,7cfd91ddf780
235 -0.004,201,5.0,5bbf259ff136
236 0.106,201,4.8,7cfd91ddf780
237 0.217,201,5.2,5bbf259ff136
238 0.323,201,6.3,5bbf259ff136
239 0.44,201,5.2,7cfd91ddf780
240 0.547,201,5.5,7cfd91ddf780
241 0.657,201,3.2,7cfd91ddf780
242 0.771,201,2.8,7cfd91ddf780
243 0.879,201,3.9,7cfd91ddf780
244 0.993,201,3.9,7cfd91ddf780
245 1.107,201,4.7,5bbf259ff136
246 1.222,201,4.9,5bbf259ff136
247 1.333,201,3.9,5bbf259ff136
248 1.439,201,6.0,5bbf259ff136
249 1.551,201,6.0,7cfd91ddf780
250 1.66,201,6.1,7cfd91ddf780
251 1.775,201,5.1,7cfd91ddf780
252 1.887,201,7.0,7cfd91ddf780
253 2.004,201,5.9,7cfd91ddf780
254 2.12,201,5.4,7cfd91ddf780
255 2.233,201,4.1,7cfd91ddf780
256 2.338,201,3.8,7cfd91ddf780
257 2.449,201,6.8,7cfd91ddf780
258 2.557,201,4.3,7cfd91ddf780
259 2.661,201,6.9,7cfd91ddf780
260 2.768,201,4.5,7cfd91ddf780
261 2.876,201,4.2,7cfd91ddf780
262 2.983,201,4.6,7cfd91ddf780
263 3.098,201,4.4,7cfd91ddf780
264 3.203,201,5.2,7cfd91ddf780
265 3.31,201,5.2,7cfd91ddf780
266 3.425,201,5.5,7cfd91ddf780
267 3.537,201,5.9,7cfd91ddf780
268 3.646,201,8.7,7cfd91ddf780
269 3.758,201,5.7,7cfd91ddf780
270 3.867,201,7.2,7cfd91ddf780
271 3.982,201,6.7,7cfd91ddf780
272 4.099,201,5.7,7cfd91ddf780
273 4.206,201,4.6,7cfd91ddf780
274 4.316,201,13.6,7cfd91ddf780
275 4.439,201,4.2,7cfd91ddf780
276 4.554,201,5.9,7cfd91ddf780
277 4.665,201,7.6,7cfd91ddf780
278 4.781,201,4.8,7cfd91ddf780
279 4.896,201,5.9,7cfd91ddf780
280 5.008,201,5.5,7cfd91ddf780
281 5.123,201,4.3,7cfd91ddf780
282 5.233,201,4.4,7cfd91ddf780
283 5.338,201,5.1,7cfd91ddf780
284 5.449,201,5.8,7cfd91ddf780
285 5.557,201,5.6,7cfd91ddf780
286 5.673,201,6.9,7cfd91ddf780
287 5.781,201,6.3,7cfd91ddf780
288 5.887,201,6.8,7cfd91ddf780
289 6.004,201,5.0,7cfd91ddf780
290 6.118,201,5.1,7cfd91ddf780
291 6.232,201,5.5,7cfd91ddf780
292 6.347,201,5.2,7cfd91ddf780
293 6.454,201,5.8,7cfd91ddf780
294 6.564,201,5.1,7cfd91ddf780
295 6.674,201,4.4,7cfd91ddf780
296 6.783,201,5.7,7cfd91ddf780
297 6.892,201,3.0,7cfd91ddf780
298 7.004,201,6.7,7cfd91ddf780
299 7.119,201,6.2,7cfd91ddf780
300 7.235,201,5.3,7cfd91ddf780
301 7.351,201,6.6,7cfd91ddf780
302 7.458,201,6.4,7cfd91ddf780
303 7.568,201,5.2,7cfd91ddf780
304 7.677,201,7.3,7cfd91ddf780
305 7.793,201,5.2,7cfd91ddf780
306 7.899,201,3.3,7cfd91ddf780
307 8.012,201,2.8,7cfd91ddf780
308 8.124,201,3.9,7cfd91ddf780
309 8.232,201,4.9,7cfd91ddf780
310 8.337,201,6.0,7cfd91ddf780
311 8.449,201,5.9,7cfd91ddf780
312 8.563,201,5.8,7cfd91ddf780
313 8.674,201,7.4,7cfd91ddf780
314 8.782,201,4.3,7cfd91ddf780
315 8.894,201,6.0,7cfd91ddf780
316 9.01,201,4.9,7cfd91ddf780
317 9.122,201,5.6,7cfd91ddf780
318 9.233,201,6.0,7cfd91ddf780
319 9.339,201,5.2,7cfd91ddf780
320 9.449,201,6.0,7cfd91ddf780
321 9.556,201,6.4,7cfd91ddf780
322 9.673,201,5.0,7cfd91ddf780
323 9.788,201,5.0,7cfd91ddf780
324 9.899,201,4.8,7cfd91ddf780
325 10.009,201,5.2,7cfd91ddf780
326 10.12,201,5.8,7cfd91ddf780
327 10.233,201,4.7,7cfd91ddf780
328 10.348,201,4.6,7cfd91ddf780
329 10.453,201,4.3,7cfd91ddf780
330 10.566,201,5.3,7cfd91ddf780
331 10.681,201,5.9,7cfd91ddf780
332 10.789,201,7.5,7cfd91ddf780
333 10.899,201,6.3,7cfd91ddf780
334 11.012,201,6.7,7cfd91ddf780
335 11.122,201,4.8,7cfd91ddf780
336 11.228,201,5.5,7cfd91ddf780
337 11.343,201,4.9,7cfd91ddf780
338 11.458,201,5.8,7cfd91ddf780
339 11.573,201,5.4,7cfd91ddf780
340 11.688,201,6.7,7cfd91ddf780
341 11.805,201,5.5,7cfd91ddf780
342 11.916,201,6.0,7cfd91ddf780
343 12.023,201,5.8,7cfd91ddf780
344 12.137,201,6.0,7cfd91ddf780
345 12.244,201,4.7,7cfd91ddf780
346 12.355,201,6.5,7cfd91ddf780
347 12.466,201,5.1,7cfd91ddf780
348 12.578,201,5.1,7cfd91ddf780
349 12.69,201,5.4,7cfd91ddf780
350 12.8,201,5.2,7cfd91ddf780
351 12.915,201,4.0,7cfd91ddf780
352 13.026,201,4.9,7cfd91ddf780
353 13.138,201,3.7,7cfd91ddf780
354 13.242,201,4.3,7cfd91ddf780
355 13.351,201,3.3,7cfd91ddf780
356 13.455,201,3.9,7cfd91ddf780
357 13.569,201,3.5,7cfd91ddf780
358 13.676,201,3.9,7cfd91ddf780
359 13.782,201,3.1,7cfd91ddf780
360 13.89,201,3.8,7cfd91ddf780
361 13.999,201,4.0,7cfd91ddf780
362 14.103,201,4.8,7cfd91ddf780
363 14.21,201,4.8,7cfd91ddf780
364 14.318,201,5.0,7cfd91ddf780
365 14.43,201,5.3,7cfd91ddf780
366 14.543,201,5.1,7cfd91ddf780
367 14.65,201,5.2,7cfd91ddf780
368 14.756,201,4.8,7cfd91ddf780
369 14.863,201,5.7,7cfd91ddf780
370 14.979,201,5.9,7cfd91ddf780
371 15.093,201,5.5,7cfd91ddf780
372 15.203,201,5.1,7cfd91ddf780
373 15.309,201,4.9,7cfd91ddf780
374 15.416,201,8.0,7cfd91ddf780
375 15.534,201,6.0,7cfd91ddf780
376 15.642,201,3.5,7cfd91ddf780
377 15.756,201,4.7,5bbf259ff136
378 15.871,201,6.0,5bbf259ff136
379 15.987,201,4.7,7cfd91ddf780
380 16.097,201,4.9,7cfd91ddf780
381 16.212,201,5.2,7cfd91ddf780
382 16.324,201,6.2,7cfd91ddf780
383 16.44,201,5.5,5bbf259ff136
384 16.556,201,4.9,7cfd91ddf780
385 16.666,201,5.2,7cfd91ddf780
386 16.777,201,6.3,7cfd91ddf780
387 16.893,201,5.8,7cfd91ddf780
388 17.009,201,5.4,5bbf259ff136
389 17.123,201,5.5,5bbf259ff136
390 17.229,201,5.4,5bbf259ff136
391 17.343,201,5.1,5bbf259ff136
392 17.457,201,5.4,7cfd91ddf780
393 17.564,201,5.2,5bbf259ff136
394 17.679,201,7.2,7cfd91ddf780
395 17.79,201,6.8,7cfd91ddf780
396 17.899,201,5.0,7cfd91ddf780
397 18.013,201,5.1,7cfd91ddf780
398 18.126,201,8.5,5bbf259ff136
399 18.241,201,3.9,5bbf259ff136
400 18.352,201,4.5,5bbf259ff136
401 18.465,201,5.5,7cfd91ddf780
402 18.577,201,5.9,7cfd91ddf780
403 18.691,201,4.8,7cfd91ddf780
404 18.806,201,14.2,5bbf259ff136
405 18.92,201,5.3,5bbf259ff136
406 19.03,201,4.6,5bbf259ff136
407 19.141,201,5.5,5bbf259ff136
408 19.249,201,5.7,5bbf259ff136
409 19.357,201,4.8,5bbf259ff136
410 19.468,201,5.1,5bbf259ff136
411 19.582,201,6.6,5bbf259ff136
412 19.695,201,5.3,7cfd91ddf780
413 19.802,201,5.1,5bbf259ff136
414 19.912,201,4.9,5bbf259ff136
415 20.021,201,5.2,5bbf259ff136
416 20.136,201,5.4,7cfd91ddf780
417 20.251,201,4.2,7cfd91ddf780
418 20.361,201,5.0,7cfd91ddf780
419 20.473,201,5.2,7cfd91ddf780
420 20.582,201,5.0,7cfd91ddf780
421 20.692,201,5.9,7cfd91ddf780
422 20.805,201,4.7,7cfd91ddf780
423 20.912,201,4.5,7cfd91ddf780
424 21.023,201,4.7,7cfd91ddf780
425 21.137,201,5.2,5bbf259ff136
426 21.249,201,4.4,5bbf259ff136
427 21.362,201,5.1,5bbf259ff136
428 21.472,201,5.0,5bbf259ff136
429 21.583,201,5.6,5bbf259ff136
430 21.691,201,6.1,5bbf259ff136
431 21.8,201,7.2,5bbf259ff136
432 21.917,201,6.8,7cfd91ddf780
433 22.03,201,5.0,7cfd91ddf780
434 22.137,201,6.5,7cfd91ddf780
435 22.253,201,7.0,7cfd91ddf780
436 22.364,201,5.3,7cfd91ddf780
437 22.474,201,5.3,7cfd91ddf780
438 22.582,201,5.7,7cfd91ddf780
439 22.691,201,5.6,7cfd91ddf780
440 22.801,201,4.9,7cfd91ddf780
441 22.916,201,4.4,5bbf259ff136
442 23.02,201,4.9,7cfd91ddf780
443 23.135,201,5.3,5bbf259ff136
444 23.242,201,6.3,7cfd91ddf780
445 23.358,201,4.7,5bbf259ff136
446 23.467,201,4.5,5bbf259ff136
447 23.572,201,4.1,7cfd91ddf780
448 23.682,201,5.6,7cfd91ddf780
449 23.79,201,4.8,7cfd91ddf780
450 23.905,201,5.1,5bbf259ff136
451 24.015,201,5.0,5bbf259ff136
452 24.122,201,4.7,7cfd91ddf780
453 24.233,201,4.4,7cfd91ddf780
454 24.342,201,5.8,7cfd91ddf780
455 24.458,201,6.0,5bbf259ff136
456 24.569,201,5.4,5bbf259ff136
457 24.684,201,6.7,7cfd91ddf780
458 24.801,201,5.3,7cfd91ddf780
459 24.916,201,5.2,5bbf259ff136
460 25.023,201,6.6,7cfd91ddf780
461 25.14,201,5.7,5bbf259ff136
462 25.251,201,4.5,5bbf259ff136
463 25.357,201,5.0,5bbf259ff136
464 25.472,201,5.1,5bbf259ff136
465 25.582,201,4.8,5bbf259ff136
466 25.691,201,6.0,5bbf259ff136
467 25.807,201,5.2,7cfd91ddf780
468 25.915,201,4.9,7cfd91ddf780
469 26.03,201,5.1,7cfd91ddf780
470 26.14,201,5.1,7cfd91ddf780
471 26.247,201,5.6,7cfd91ddf780
472 26.354,201,5.3,5bbf259ff136
473 26.467,201,6.8,7cfd91ddf780
474 26.583,201,5.2,7cfd91ddf780
475 26.694,201,5.2,7cfd91ddf780
476 26.806,201,6.2,5bbf259ff136
477 26.914,201,6.5,5bbf259ff136
478 27.031,201,5.9,5bbf259ff136
479 27.144,201,5.4,7cfd91ddf780
480 27.255,201,5.1,7cfd91ddf780
481 27.362,201,6.0,5bbf259ff136
482 27.478,201,6.3,7cfd91ddf780
483 27.59,201,6.3,7cfd91ddf780
484 27.707,201,5.4,5bbf259ff136
485 27.814,201,7.4,5bbf259ff136
486 27.929,201,3.9,5bbf259ff136
487 28.04,201,4.0,5bbf259ff136
488 28.153,201,5.2,5bbf259ff136
489 28.269,201,4.8,7cfd91ddf780
490 28.381,201,5.6,7cfd91ddf780
491 28.487,201,5.1,7cfd91ddf780
492 28.597,201,5.1,7cfd91ddf780
493 28.708,201,3.9,7cfd91ddf780
494 28.816,201,5.1,7cfd91ddf780
495 28.931,201,4.9,7cfd91ddf780
496 29.046,201,5.9,5bbf259ff136
497 29.162,201,4.9,5bbf259ff136
498 29.276,201,3.8,7cfd91ddf780
499 29.381,201,5.3,5bbf259ff136
500 29.489,201,4.7,5bbf259ff136
501 29.6,201,4.9,5bbf259ff136
502 29.715,201,5.9,7cfd91ddf780
503 29.825,201,5.5,7cfd91ddf780
504 29.94,201,5.9,7cfd91ddf780
505 30.047,201,7.0,7cfd91ddf780
506 30.155,201,5.5,7cfd91ddf780
507 30.271,201,6.1,7cfd91ddf780
508 30.38,201,4.9,7cfd91ddf780
509 30.49,201,5.3,7cfd91ddf780
510 30.597,201,7.2,7cfd91ddf780
511 30.714,201,6.6,5bbf259ff136
512 30.822,201,6.9,7cfd91ddf780
513 30.933,201,6.4,7cfd91ddf780
514 31.049,201,3.8,5bbf259ff136
515 31.163,201,4.9,5bbf259ff136
516 31.273,201,5.4,5bbf259ff136
517 31.383,201,5.1,5bbf259ff136
518 31.49,201,5.0,5bbf259ff136
519 31.605,201,5.9,7cfd91ddf780
520 31.717,201,6.5,7cfd91ddf780
521 31.825,201,5.7,7cfd91ddf780
522 31.938,201,5.0,7cfd91ddf780
523 32.053,201,4.8,7cfd91ddf780
524 32.164,201,4.9,7cfd91ddf780
525 32.271,201,4.6,7cfd91ddf780
526 32.378,201,4.7,7cfd91ddf780
527 32.49,201,5.0,7cfd91ddf780
528 32.605,201,4.2,7cfd91ddf780
529 32.717,201,4.1,5bbf259ff136
530 32.828,201,5.4,5bbf259ff136
531 32.937,201,6.0,5bbf259ff136
532 33.048,201,6.2,5bbf259ff136
533 33.163,201,5.3,5bbf259ff136
534 33.276,201,6.7,7cfd91ddf780
535 33.39,201,6.6,7cfd91ddf780
536 33.501,201,5.0,7cfd91ddf780
537 33.616,201,5.3,5bbf259ff136
538 33.722,201,4.9,7cfd91ddf780
539 33.831,201,3.9,7cfd91ddf780
540 33.945,201,5.9,5bbf259ff136
541 34.06,201,5.4,5bbf259ff136
542 34.168,201,5.5,5bbf259ff136
543 34.28,201,5.6,5bbf259ff136
544 34.392,201,3.1,5bbf259ff136
545 34.505,201,5.5,7cfd91ddf780
546 34.621,201,4.7,7cfd91ddf780
547 34.736,201,5.2,5bbf259ff136
548 34.851,201,6.5,5bbf259ff136
549 34.965,201,5.7,7cfd91ddf780
550 35.072,201,4.9,5bbf259ff136
551 35.182,201,6.6,5bbf259ff136
552 35.291,201,4.8,5bbf259ff136
553 35.403,201,6.7,5bbf259ff136
554 35.518,201,6.8,7cfd91ddf780
555 35.627,201,4.7,7cfd91ddf780
556 35.732,201,6.7,5bbf259ff136
557 35.848,201,5.8,7cfd91ddf780
558 35.962,201,6.7,7cfd91ddf780
559 36.073,201,5.2,7cfd91ddf780
560 36.182,201,6.8,7cfd91ddf780
561 36.29,201,6.2,7cfd91ddf780
562 36.405,201,5.0,5bbf259ff136
563 36.52,201,5.0,5bbf259ff136
564 36.634,201,5.0,5bbf259ff136
565 36.747,201,4.6,7cfd91ddf780
566 36.861,201,5.0,7cfd91ddf780
567 36.974,201,5.6,5bbf259ff136
568 37.088,201,4.8,5bbf259ff136
569 37.203,201,5.6,5bbf259ff136
570 37.314,201,5.5,7cfd91ddf780
571 37.43,201,5.7,7cfd91ddf780
572 37.545,201,4.8,7cfd91ddf780
573 37.659,201,4.3,5bbf259ff136
574 37.765,201,5.4,5bbf259ff136
575 37.873,201,5.3,7cfd91ddf780
576 37.981,201,6.1,7cfd91ddf780
577 38.097,201,6.0,5bbf259ff136
578 38.214,201,6.3,7cfd91ddf780
579 38.327,201,5.5,7cfd91ddf780
580 38.44,201,6.0,7cfd91ddf780
581 38.548,201,5.4,7cfd91ddf780
582 38.656,201,6.9,7cfd91ddf780
583 38.765,201,3.5,5bbf259ff136
584 38.868,201,3.5,5bbf259ff136
585 38.981,201,3.7,5bbf259ff136
586 39.088,201,3.1,5bbf259ff136
587 39.2,201,3.6,5bbf259ff136
588 39.308,201,4.0,5bbf259ff136
589 39.414,201,4.3,7cfd91ddf780
590 39.523,201,3.5,7cfd91ddf780
591 39.635,201,4.3,5bbf259ff136
592 39.744,201,4.2,5bbf259ff136
593 39.859,201,4.0,5bbf259ff136
594 39.965,201,3.4,5bbf259ff136
595 40.076,201,7.7,5bbf259ff136
596 40.192,201,6.5,5bbf259ff136
597 40.306,201,5.0,7cfd91ddf780
598 40.414,201,3.5,5bbf259ff136
599 40.518,201,2.6,5bbf259ff136
600 40.623,201,2.6,7cfd91ddf780
601 40.733,201,4.6,7cfd91ddf780
602 40.845,201,4.6,5bbf259ff136
603 40.958,201,4.2,5bbf259ff136
604 41.064,201,4.2,7cfd91ddf780
605 41.171,201,2.8,7cfd91ddf780
606 41.281,201,4.9,7cfd91ddf780
607 41.388,201,4.3,7cfd91ddf780
608 41.497,201,5.0,7cfd91ddf780
609 41.606,201,5.1,7cfd91ddf780
610 41.721,201,2.9,7cfd91ddf780
611 41.829,201,4.8,7cfd91ddf780
612 41.942,201,3.0,7cfd91ddf780
613 42.053,201,5.6,7cfd91ddf780
614 42.164,201,6.5,7cfd91ddf780
615 42.281,201,5.6,5bbf259ff136
616 42.389,201,4.5,5bbf259ff136
617 42.503,201,4.6,5bbf259ff136
618 42.618,201,5.8,7cfd91ddf780
619 42.734,201,5.2,7cfd91ddf780
620 42.849,201,5.9,5bbf259ff136
621 42.959,201,5.0,5bbf259ff136
622 43.066,201,4.9,5bbf259ff136
623 43.181,201,6.2,5bbf259ff136
624 43.289,201,5.7,5bbf259ff136
625 43.4,201,6.0,5bbf259ff136
626 43.516,201,7.1,7cfd91ddf780
627 43.631,201,6.1,7cfd91ddf780
628 43.746,201,6.7,5bbf259ff136
629 43.862,201,5.9,5bbf259ff136
630 43.969,201,5.5,5bbf259ff136
631 44.084,201,5.4,7cfd91ddf780
632 44.2,201,4.6,7cfd91ddf780
633 44.305,201,5.8,7cfd91ddf780
634 44.421,201,6.1,7cfd91ddf780
635 44.53,201,5.2,7cfd91ddf780
636 44.637,201,3.7,7cfd91ddf780
637 44.75,201,3.3,7cfd91ddf780
638 44.855,201,3.8,5bbf259ff136
639 44.961,201,4.7,5bbf259ff136
640 45.072,201,6.1,7cfd91ddf780
641 45.184,201,7.3,5bbf259ff136
642 45.296,201,7.5,7cfd91ddf780
643 45.409,201,5.2,5bbf259ff136
644 45.521,201,5.5,7cfd91ddf780
@@ -0,0 +1,71 @@
{"date": "2026-11-05T19:18:13.470607+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"label": "5bbf259ff136",
"action": [
"sh",
"-c",
"scripts/stop-one.sh && docker compose ps -a --format '{{.ID}} {{.Service}} {{.Status}}' api && { scripts/stand-usage.sh & sleep 10; wait; } && scripts/restore.sh"
],
"action_exit": 0,
"action_seconds": 15.2,
"action_finished_before_load_end": true,
"lb_up_before": 2,
"lb_up_min": 1,
"lb_samples_missing": 0,
"detection_seconds": 1.498,
"rejoin_seconds": 14.99,
"probe": {
"attempts": 642,
"failed_attempts": 0,
"first_failure_s": null,
"first_success_s": 0.111,
"recovery_s": 0.0,
"instances_before": {
"7cfd91ddf780": 114,
"5bbf259ff136": 119
},
"instances_during_outage": {
"7cfd91ddf780": 121
},
"instances_after": {
"7cfd91ddf780": 149,
"5bbf259ff136": 124
}
},
"history": {
"confirmed": 642,
"stored": 642,
"exact_match": true,
"unique": true
},
"lb_counters": {
"wretr": 0,
"wredis": 0,
"econ": 0,
"eresp": 0,
"hrsp_5xx": 0
},
"k6": {
"requests": 6001,
"rps": 100.02,
"ok_rps": 100.02,
"failed_ratio": 0,
"dropped_iterations": 0,
"p50_ms": 2.98,
"p95_ms": 3.88,
"p99_ms": 4.53,
"exit": 0,
"rate": 100
},
"checks": {
"action_ok": true,
"load_errors_ok": true,
"load_delivered": true,
"lb_observed": true,
"write_recovery_ok": true,
"history_preserved": true,
"detected": true,
"target_excluded": true,
"rejoined": true
},
"pass": true
}
@@ -0,0 +1,15 @@
date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
7cfd91ddf780 api Exited (0) Less than a second ago
5bbf259ff136 api Up 3 minutes (healthy)
19:18:43 database bytes,messages: 9385651,2542
mtusi2026lab3-grade4-20261105-api-2 cpu=23.33% mem=217.6MiB / 512MiB
mtusi2026lab3-grade4-20261105-lb-1 cpu=3.14% mem=30.17MiB / 128MiB
mtusi2026lab3-grade4-20261105-postgres-1 cpu=6.03% mem=58.73MiB / 1GiB
mtusi2026lab3-grade4-20261105-valkey-1 cpu=0.42% mem=12.97MiB / 128MiB
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
@@ -0,0 +1,3 @@
date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
time="2026-11-05T19:18:15Z" level=info msg=LOAD-START source=console
measure: 6001 requests, failed ratio 0
@@ -0,0 +1,309 @@
{"date": "2026-11-05T19:18:13.470607+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"root_group": {
"checks": [
{
"name": "message 201",
"path": "::message 201",
"id": "6445aff337e1ade0bc10402fbac79882",
"passes": 5614,
"fails": 0
},
{
"name": "history 200",
"path": "::history 200",
"id": "fe27b3b8edd292c7f2170a6357b087d0",
"passes": 1388,
"fails": 0
}
],
"name": "",
"path": "",
"id": "d41d8cd98f00b204e9800998ecf8427e",
"groups": []
},
"options": {
"summaryTrendStats": [
"avg",
"min",
"med",
"p(90)",
"p(95)",
"p(99)",
"max"
],
"summaryTimeUnit": "",
"noColor": false
},
"state": {
"isStdOutTTY": false,
"isStdErrTTY": false,
"testRunDurationMs": 70538.919963
},
"metrics": {
"http_req_tls_handshaking": {
"type": "trend",
"contains": "time",
"values": {
"min": 0,
"med": 0,
"p(90)": 0,
"p(95)": 0,
"p(99)": 0,
"max": 0,
"avg": 0
}
},
"http_req_failed": {
"type": "rate",
"contains": "default",
"values": {
"rate": 0,
"passes": 0,
"fails": 7052
}
},
"http_req_duration": {
"type": "trend",
"contains": "time",
"values": {
"p(95)": 3.943366299999998,
"p(99)": 7.941836829999957,
"max": 52.49775,
"avg": 3.1087168380601247,
"min": 1.647417,
"med": 2.9766874999999997,
"p(90)": 3.6688584
}
},
"checks": {
"type": "rate",
"contains": "default",
"values": {
"rate": 1,
"passes": 7002,
"fails": 0
}
},
"iterations{scenario:measure}": {
"type": "counter",
"contains": "default",
"values": {
"count": 6001,
"rate": 85.07360196537917
}
},
"http_req_duration{expected_response:true}": {
"type": "trend",
"contains": "time",
"values": {
"avg": 3.1087168380601247,
"min": 1.647417,
"med": 2.9766874999999997,
"p(90)": 3.6688584,
"p(95)": 3.943366299999998,
"p(99)": 7.941836829999957,
"max": 52.49775
}
},
"http_req_sending": {
"contains": "time",
"values": {
"max": 0.354375,
"avg": 0.01261951956891675,
"min": 0.00275,
"med": 0.011459,
"p(90)": 0.015125,
"p(95)": 0.01775,
"p(99)": 0.033123339999999994
},
"type": "trend"
},
"http_req_receiving": {
"type": "trend",
"contains": "time",
"values": {
"avg": 0.022591304452637576,
"min": 0.008958,
"med": 0.019917,
"p(90)": 0.032,
"p(95)": 0.03826844999999999,
"p(99)": 0.06532848999999998,
"max": 0.210875
}
},
"data_sent": {
"values": {
"count": 2053317,
"rate": 29108.994028786277
},
"type": "counter",
"contains": "data"
},
"data_received": {
"values": {
"count": 17042097,
"rate": 241598.4963894988
},
"type": "counter",
"contains": "data"
},
"http_req_duration{scenario:measure}": {
"type": "trend",
"contains": "time",
"values": {
"p(95)": 3.862542,
"p(99)": 4.473916,
"max": 52.49775,
"avg": 3.049362646058984,
"min": 1.684875,
"med": 2.9745,
"p(90)": 3.631833
}
},
"http_req_connecting": {
"type": "trend",
"contains": "time",
"values": {
"max": 0.224708,
"avg": 0.00034415215541690295,
"min": 0,
"med": 0,
"p(90)": 0,
"p(95)": 0,
"p(99)": 0
}
},
"vus": {
"type": "gauge",
"contains": "default",
"values": {
"value": 1,
"min": 0,
"max": 1
}
},
"http_req_failed{scenario:measure}": {
"values": {
"fails": 6001,
"rate": 0,
"passes": 0
},
"type": "rate",
"contains": "default"
},
"dropped_iterations{scenario:measure}": {
"type": "counter",
"contains": "default",
"values": {
"count": 0,
"rate": 0
}
},
"http_req_duration{scenario:measure,name:post_message}": {
"type": "trend",
"contains": "time",
"values": {
"med": 2.940125,
"p(90)": 3.551959,
"p(95)": 3.786104,
"p(99)": 4.346612499999998,
"max": 52.49775,
"avg": 3.0002135637081597,
"min": 1.684875
}
},
"http_req_waiting": {
"values": {
"max": 52.465792,
"avg": 3.073506014038576,
"min": 1.628417,
"med": 2.941875,
"p(90)": 3.6291869,
"p(95)": 3.8983437499999996,
"p(99)": 7.918076749999957
},
"type": "trend",
"contains": "time"
},
"http_reqs{scenario:measure}": {
"type": "counter",
"contains": "default",
"values": {
"count": 6001,
"rate": 85.07360196537917
}
},
"dropped_iterations": {
"type": "counter",
"contains": "default",
"values": {
"count": 0,
"rate": 0
}
},
"iterations": {
"type": "counter",
"contains": "default",
"values": {
"count": 7002,
"rate": 99.26434943535826
}
},
"http_req_blocked": {
"type": "trend",
"contains": "time",
"values": {
"min": 0.000708,
"med": 0.001667,
"p(90)": 0.0025,
"p(95)": 0.002959,
"p(99)": 0.006083,
"max": 1.817417,
"avg": 0.0025302468803176624
}
},
"vus_max": {
"type": "gauge",
"contains": "default",
"values": {
"min": 20,
"max": 20,
"value": 20
}
},
"http_reqs": {
"type": "counter",
"contains": "default",
"values": {
"count": 7052,
"rate": 99.97317798031226
}
},
"iteration_duration": {
"values": {
"avg": 3.1430217764924397,
"min": 1.686459,
"med": 3.0623125,
"p(90)": 3.7471503,
"p(95)": 4.001064599999999,
"p(99)": 4.828713,
"max": 52.592501
},
"type": "trend",
"contains": "time"
},
"http_req_duration{scenario:measure,name:get_history}": {
"type": "trend",
"contains": "time",
"values": {
"avg": 3.2480653647058872,
"min": 1.856375,
"med": 3.166271,
"p(90)": 3.8746452,
"p(95)": 4.109600299999999,
"p(99)": 5.1775943700000004,
"max": 17.655583
}
}
}
}
@@ -0,0 +1,663 @@
# date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
t_rel_s,up
-25.852,2
-25.745,2
-25.643,2
-25.532,2
-25.426,2
-25.319,2
-25.21,2
-25.1,2
-24.995,2
-24.894,2
-24.79,2
-24.686,2
-24.577,2
-24.469,2
-24.358,2
-24.255,2
-24.148,2
-24.042,2
-23.939,2
-23.836,2
-23.727,2
-23.625,2
-23.521,2
-23.412,2
-23.303,2
-23.192,2
-23.088,2
-22.978,2
-22.868,2
-22.757,2
-22.648,2
-22.541,2
-22.44,2
-22.33,2
-22.227,2
-22.121,2
-22.019,2
-21.908,2
-21.804,2
-21.699,2
-21.588,2
-21.476,2
-21.363,2
-21.259,2
-21.148,2
-21.036,2
-20.928,2
-20.82,2
-20.709,2
-20.604,2
-20.493,2
-20.381,2
-20.269,2
-20.158,2
-20.053,2
-19.944,2
-19.837,2
-19.729,2
-19.619,2
-19.511,2
-19.406,2
-19.304,2
-19.191,2
-19.083,2
-18.972,2
-18.869,2
-18.761,2
-18.649,2
-18.542,2
-18.43,2
-18.318,2
-18.216,2
-18.114,2
-18.005,2
-17.899,2
-17.792,2
-17.685,2
-17.581,2
-17.472,2
-17.359,2
-17.253,2
-17.148,2
-17.043,2
-16.936,2
-16.823,2
-16.712,2
-16.602,2
-16.495,2
-16.386,2
-16.276,2
-16.164,2
-16.061,2
-15.957,2
-15.846,2
-15.736,2
-15.632,2
-15.526,2
-15.422,2
-15.311,2
-15.205,2
-15.101,2
-14.991,2
-14.879,2
-14.768,2
-14.661,2
-14.554,2
-14.444,2
-14.335,2
-14.228,2
-14.123,2
-14.018,2
-13.906,2
-13.792,2
-13.68,2
-13.574,2
-13.465,2
-13.358,2
-13.247,2
-13.141,2
-13.029,2
-12.922,2
-12.809,2
-12.697,2
-12.586,2
-12.474,2
-12.37,2
-12.26,2
-12.154,2
-12.041,2
-11.935,2
-11.824,2
-11.719,2
-11.608,2
-11.506,2
-11.397,2
-11.283,2
-11.176,2
-11.07,2
-10.962,2
-10.851,2
-10.741,2
-10.629,2
-10.519,2
-10.408,2
-10.296,2
-10.185,2
-10.078,2
-9.975,2
-9.87,2
-9.76,2
-9.653,2
-9.54,2
-9.43,2
-9.319,2
-9.211,2
-9.102,2
-8.989,2
-8.876,2
-8.765,2
-8.656,2
-8.546,2
-8.437,2
-8.328,2
-8.22,2
-8.106,2
-7.995,2
-7.886,2
-7.782,2
-7.67,2
-7.563,2
-7.452,2
-7.345,2
-7.236,2
-7.13,2
-7.018,2
-6.911,2
-6.798,2
-6.686,2
-6.579,2
-6.471,2
-6.367,2
-6.256,2
-6.149,2
-6.042,2
-5.934,2
-5.828,2
-5.72,2
-5.616,2
-5.503,2
-5.395,2
-5.286,2
-5.178,2
-5.067,2
-4.961,2
-4.855,2
-4.742,2
-4.635,2
-4.526,2
-4.418,2
-4.304,2
-4.195,2
-4.083,2
-3.971,2
-3.86,2
-3.755,2
-3.641,2
-3.532,2
-3.428,2
-3.32,2
-3.209,2
-3.098,2
-2.994,2
-2.882,2
-2.777,2
-2.665,2
-2.553,2
-2.446,2
-2.337,2
-2.228,2
-2.124,2
-2.018,2
-1.908,2
-1.803,2
-1.693,2
-1.587,2
-1.476,2
-1.37,2
-1.261,2
-1.149,2
-1.037,2
-0.929,2
-0.816,2
-0.713,2
-0.601,2
-0.495,2
-0.387,2
-0.277,2
-0.17,2
-0.066,2
0.036,2
0.142,2
0.253,2
0.358,2
0.461,2
0.571,2
0.675,2
0.78,2
0.884,1
0.992,1
1.098,1
1.205,1
1.314,1
1.426,1
1.538,1
1.645,1
1.755,1
1.864,1
1.972,1
2.078,1
2.188,1
2.302,1
2.411,1
2.522,1
2.626,1
2.737,1
2.838,1
2.941,1
3.049,1
3.156,1
3.268,1
3.377,1
3.49,1
3.604,1
3.716,1
3.825,1
3.937,1
4.044,1
4.154,1
4.259,1
4.369,1
4.479,1
4.588,1
4.693,1
4.8,1
4.911,1
5.018,1
5.127,1
5.239,1
5.35,1
5.457,1
5.563,1
5.664,1
5.767,1
5.871,1
5.976,1
6.086,1
6.198,1
6.306,1
6.413,1
6.525,1
6.638,1
6.747,1
6.859,1
6.97,1
7.081,1
7.189,1
7.302,1
7.411,1
7.518,1
7.631,1
7.74,1
7.847,1
7.96,1
8.071,1
8.184,1
8.288,1
8.396,1
8.501,1
8.605,1
8.711,1
8.825,1
8.93,1
9.034,1
9.147,1
9.259,1
9.367,1
9.48,1
9.584,1
9.687,1
9.792,1
9.904,1
10.011,1
10.115,1
10.225,1
10.327,1
10.429,1
10.539,1
10.64,1
10.752,1
10.862,1
10.967,1
11.073,1
11.185,1
11.297,1
11.411,1
11.521,1
11.631,1
11.737,1
11.85,1
11.955,1
12.063,1
12.175,1
12.288,1
12.397,1
12.502,1
12.616,1
12.72,1
12.83,1
12.934,1
13.042,1
13.151,1
13.264,1
13.371,1
13.485,1
13.587,1
13.696,1
13.807,1
13.912,1
14.024,1
14.136,1
14.237,1
14.346,1
14.46,1
14.571,1
14.678,1
14.783,1
14.885,2
14.996,2
15.101,2
15.203,2
15.309,2
15.423,2
15.533,2
15.647,2
15.759,2
15.87,2
15.976,2
16.088,2
16.196,2
16.305,2
16.411,2
16.523,2
16.629,2
16.742,2
16.854,2
16.962,2
17.067,2
17.181,2
17.288,2
17.397,2
17.509,2
17.621,2
17.733,2
17.84,2
17.946,2
18.054,2
18.163,2
18.267,2
18.379,2
18.492,2
18.606,2
18.71,2
18.819,2
18.93,2
19.038,2
19.14,2
19.242,2
19.346,2
19.455,2
19.565,2
19.672,2
19.786,2
19.891,2
20.0,2
20.103,2
20.211,2
20.315,2
20.42,2
20.529,2
20.64,2
20.747,2
20.854,2
20.965,2
21.073,2
21.181,2
21.286,2
21.396,2
21.505,2
21.618,2
21.73,2
21.843,2
21.948,2
22.055,2
22.16,2
22.273,2
22.385,2
22.496,2
22.602,2
22.712,2
22.82,2
22.93,2
23.042,2
23.146,2
23.253,2
23.36,2
23.469,2
23.581,2
23.69,2
23.803,2
23.917,2
24.025,2
24.13,2
24.236,2
24.348,2
24.455,2
24.567,2
24.678,2
24.786,2
24.9,2
25.013,2
25.126,2
25.241,2
25.353,2
25.463,2
25.574,2
25.686,2
25.796,2
25.908,2
26.017,2
26.129,2
26.239,2
26.35,2
26.454,2
26.563,2
26.672,2
26.784,2
26.889,2
26.994,2
27.103,2
27.212,2
27.325,2
27.437,2
27.545,2
27.658,2
27.762,2
27.874,2
27.978,2
28.085,2
28.192,2
28.301,2
28.412,2
28.524,2
28.638,2
28.749,2
28.856,2
28.966,2
29.072,2
29.182,2
29.29,2
29.394,2
29.499,2
29.607,2
29.711,2
29.821,2
29.929,2
30.035,2
30.144,2
30.255,2
30.367,2
30.472,2
30.585,2
30.691,2
30.799,2
30.911,2
31.021,2
31.13,2
31.238,2
31.352,2
31.462,2
31.576,2
31.69,2
31.797,2
31.909,2
32.021,2
32.129,2
32.233,2
32.337,2
32.444,2
32.555,2
32.658,2
32.769,2
32.881,2
32.987,2
33.095,2
33.209,2
33.317,2
33.42,2
33.532,2
33.64,2
33.751,2
33.86,2
33.963,2
34.074,2
34.179,2
34.282,2
34.387,2
34.495,2
34.601,2
34.709,2
34.821,2
34.926,2
35.037,2
35.141,2
35.244,2
35.354,2
35.462,2
35.575,2
35.687,2
35.796,2
35.908,2
36.013,2
36.12,2
36.233,2
36.34,2
36.446,2
36.553,2
36.663,2
36.771,2
36.881,2
36.989,2
37.095,2
37.208,2
37.312,2
37.424,2
37.534,2
37.644,2
37.748,2
37.859,2
37.964,2
38.068,2
38.173,2
38.28,2
38.392,2
38.496,2
38.601,2
38.712,2
38.82,2
38.933,2
39.045,2
39.155,2
39.263,2
39.376,2
39.49,2
39.606,2
39.72,2
39.829,2
39.939,2
40.042,2
40.154,2
40.259,2
40.365,2
40.478,2
40.582,2
40.692,2
40.796,2
40.907,2
41.015,2
41.118,2
41.228,2
41.338,2
41.445,2
41.551,2
41.662,2
41.774,2
41.882,2
41.993,2
42.099,2
42.204,2
42.312,2
42.419,2
42.527,2
42.637,2
42.739,2
42.85,2
42.961,2
43.068,2
43.176,2
43.278,2
43.39,2
43.494,2
43.599,2
43.71,2
43.816,2
43.92,2
44.025,2
44.128,2
44.233,2
44.337,2
44.445,2
44.552,2
44.663,2
44.77,2
44.881,2
44.988,2
45.1,2
45.203,2
45.312,2
45.416,2
45.523,2
45.634,2
45.737,2
1 # date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
2 t_rel_s,up
3 -25.852,2
4 -25.745,2
5 -25.643,2
6 -25.532,2
7 -25.426,2
8 -25.319,2
9 -25.21,2
10 -25.1,2
11 -24.995,2
12 -24.894,2
13 -24.79,2
14 -24.686,2
15 -24.577,2
16 -24.469,2
17 -24.358,2
18 -24.255,2
19 -24.148,2
20 -24.042,2
21 -23.939,2
22 -23.836,2
23 -23.727,2
24 -23.625,2
25 -23.521,2
26 -23.412,2
27 -23.303,2
28 -23.192,2
29 -23.088,2
30 -22.978,2
31 -22.868,2
32 -22.757,2
33 -22.648,2
34 -22.541,2
35 -22.44,2
36 -22.33,2
37 -22.227,2
38 -22.121,2
39 -22.019,2
40 -21.908,2
41 -21.804,2
42 -21.699,2
43 -21.588,2
44 -21.476,2
45 -21.363,2
46 -21.259,2
47 -21.148,2
48 -21.036,2
49 -20.928,2
50 -20.82,2
51 -20.709,2
52 -20.604,2
53 -20.493,2
54 -20.381,2
55 -20.269,2
56 -20.158,2
57 -20.053,2
58 -19.944,2
59 -19.837,2
60 -19.729,2
61 -19.619,2
62 -19.511,2
63 -19.406,2
64 -19.304,2
65 -19.191,2
66 -19.083,2
67 -18.972,2
68 -18.869,2
69 -18.761,2
70 -18.649,2
71 -18.542,2
72 -18.43,2
73 -18.318,2
74 -18.216,2
75 -18.114,2
76 -18.005,2
77 -17.899,2
78 -17.792,2
79 -17.685,2
80 -17.581,2
81 -17.472,2
82 -17.359,2
83 -17.253,2
84 -17.148,2
85 -17.043,2
86 -16.936,2
87 -16.823,2
88 -16.712,2
89 -16.602,2
90 -16.495,2
91 -16.386,2
92 -16.276,2
93 -16.164,2
94 -16.061,2
95 -15.957,2
96 -15.846,2
97 -15.736,2
98 -15.632,2
99 -15.526,2
100 -15.422,2
101 -15.311,2
102 -15.205,2
103 -15.101,2
104 -14.991,2
105 -14.879,2
106 -14.768,2
107 -14.661,2
108 -14.554,2
109 -14.444,2
110 -14.335,2
111 -14.228,2
112 -14.123,2
113 -14.018,2
114 -13.906,2
115 -13.792,2
116 -13.68,2
117 -13.574,2
118 -13.465,2
119 -13.358,2
120 -13.247,2
121 -13.141,2
122 -13.029,2
123 -12.922,2
124 -12.809,2
125 -12.697,2
126 -12.586,2
127 -12.474,2
128 -12.37,2
129 -12.26,2
130 -12.154,2
131 -12.041,2
132 -11.935,2
133 -11.824,2
134 -11.719,2
135 -11.608,2
136 -11.506,2
137 -11.397,2
138 -11.283,2
139 -11.176,2
140 -11.07,2
141 -10.962,2
142 -10.851,2
143 -10.741,2
144 -10.629,2
145 -10.519,2
146 -10.408,2
147 -10.296,2
148 -10.185,2
149 -10.078,2
150 -9.975,2
151 -9.87,2
152 -9.76,2
153 -9.653,2
154 -9.54,2
155 -9.43,2
156 -9.319,2
157 -9.211,2
158 -9.102,2
159 -8.989,2
160 -8.876,2
161 -8.765,2
162 -8.656,2
163 -8.546,2
164 -8.437,2
165 -8.328,2
166 -8.22,2
167 -8.106,2
168 -7.995,2
169 -7.886,2
170 -7.782,2
171 -7.67,2
172 -7.563,2
173 -7.452,2
174 -7.345,2
175 -7.236,2
176 -7.13,2
177 -7.018,2
178 -6.911,2
179 -6.798,2
180 -6.686,2
181 -6.579,2
182 -6.471,2
183 -6.367,2
184 -6.256,2
185 -6.149,2
186 -6.042,2
187 -5.934,2
188 -5.828,2
189 -5.72,2
190 -5.616,2
191 -5.503,2
192 -5.395,2
193 -5.286,2
194 -5.178,2
195 -5.067,2
196 -4.961,2
197 -4.855,2
198 -4.742,2
199 -4.635,2
200 -4.526,2
201 -4.418,2
202 -4.304,2
203 -4.195,2
204 -4.083,2
205 -3.971,2
206 -3.86,2
207 -3.755,2
208 -3.641,2
209 -3.532,2
210 -3.428,2
211 -3.32,2
212 -3.209,2
213 -3.098,2
214 -2.994,2
215 -2.882,2
216 -2.777,2
217 -2.665,2
218 -2.553,2
219 -2.446,2
220 -2.337,2
221 -2.228,2
222 -2.124,2
223 -2.018,2
224 -1.908,2
225 -1.803,2
226 -1.693,2
227 -1.587,2
228 -1.476,2
229 -1.37,2
230 -1.261,2
231 -1.149,2
232 -1.037,2
233 -0.929,2
234 -0.816,2
235 -0.713,2
236 -0.601,2
237 -0.495,2
238 -0.387,2
239 -0.277,2
240 -0.17,2
241 -0.066,2
242 0.036,2
243 0.142,2
244 0.253,2
245 0.358,2
246 0.461,2
247 0.571,2
248 0.675,2
249 0.78,2
250 0.884,1
251 0.992,1
252 1.098,1
253 1.205,1
254 1.314,1
255 1.426,1
256 1.538,1
257 1.645,1
258 1.755,1
259 1.864,1
260 1.972,1
261 2.078,1
262 2.188,1
263 2.302,1
264 2.411,1
265 2.522,1
266 2.626,1
267 2.737,1
268 2.838,1
269 2.941,1
270 3.049,1
271 3.156,1
272 3.268,1
273 3.377,1
274 3.49,1
275 3.604,1
276 3.716,1
277 3.825,1
278 3.937,1
279 4.044,1
280 4.154,1
281 4.259,1
282 4.369,1
283 4.479,1
284 4.588,1
285 4.693,1
286 4.8,1
287 4.911,1
288 5.018,1
289 5.127,1
290 5.239,1
291 5.35,1
292 5.457,1
293 5.563,1
294 5.664,1
295 5.767,1
296 5.871,1
297 5.976,1
298 6.086,1
299 6.198,1
300 6.306,1
301 6.413,1
302 6.525,1
303 6.638,1
304 6.747,1
305 6.859,1
306 6.97,1
307 7.081,1
308 7.189,1
309 7.302,1
310 7.411,1
311 7.518,1
312 7.631,1
313 7.74,1
314 7.847,1
315 7.96,1
316 8.071,1
317 8.184,1
318 8.288,1
319 8.396,1
320 8.501,1
321 8.605,1
322 8.711,1
323 8.825,1
324 8.93,1
325 9.034,1
326 9.147,1
327 9.259,1
328 9.367,1
329 9.48,1
330 9.584,1
331 9.687,1
332 9.792,1
333 9.904,1
334 10.011,1
335 10.115,1
336 10.225,1
337 10.327,1
338 10.429,1
339 10.539,1
340 10.64,1
341 10.752,1
342 10.862,1
343 10.967,1
344 11.073,1
345 11.185,1
346 11.297,1
347 11.411,1
348 11.521,1
349 11.631,1
350 11.737,1
351 11.85,1
352 11.955,1
353 12.063,1
354 12.175,1
355 12.288,1
356 12.397,1
357 12.502,1
358 12.616,1
359 12.72,1
360 12.83,1
361 12.934,1
362 13.042,1
363 13.151,1
364 13.264,1
365 13.371,1
366 13.485,1
367 13.587,1
368 13.696,1
369 13.807,1
370 13.912,1
371 14.024,1
372 14.136,1
373 14.237,1
374 14.346,1
375 14.46,1
376 14.571,1
377 14.678,1
378 14.783,1
379 14.885,2
380 14.996,2
381 15.101,2
382 15.203,2
383 15.309,2
384 15.423,2
385 15.533,2
386 15.647,2
387 15.759,2
388 15.87,2
389 15.976,2
390 16.088,2
391 16.196,2
392 16.305,2
393 16.411,2
394 16.523,2
395 16.629,2
396 16.742,2
397 16.854,2
398 16.962,2
399 17.067,2
400 17.181,2
401 17.288,2
402 17.397,2
403 17.509,2
404 17.621,2
405 17.733,2
406 17.84,2
407 17.946,2
408 18.054,2
409 18.163,2
410 18.267,2
411 18.379,2
412 18.492,2
413 18.606,2
414 18.71,2
415 18.819,2
416 18.93,2
417 19.038,2
418 19.14,2
419 19.242,2
420 19.346,2
421 19.455,2
422 19.565,2
423 19.672,2
424 19.786,2
425 19.891,2
426 20.0,2
427 20.103,2
428 20.211,2
429 20.315,2
430 20.42,2
431 20.529,2
432 20.64,2
433 20.747,2
434 20.854,2
435 20.965,2
436 21.073,2
437 21.181,2
438 21.286,2
439 21.396,2
440 21.505,2
441 21.618,2
442 21.73,2
443 21.843,2
444 21.948,2
445 22.055,2
446 22.16,2
447 22.273,2
448 22.385,2
449 22.496,2
450 22.602,2
451 22.712,2
452 22.82,2
453 22.93,2
454 23.042,2
455 23.146,2
456 23.253,2
457 23.36,2
458 23.469,2
459 23.581,2
460 23.69,2
461 23.803,2
462 23.917,2
463 24.025,2
464 24.13,2
465 24.236,2
466 24.348,2
467 24.455,2
468 24.567,2
469 24.678,2
470 24.786,2
471 24.9,2
472 25.013,2
473 25.126,2
474 25.241,2
475 25.353,2
476 25.463,2
477 25.574,2
478 25.686,2
479 25.796,2
480 25.908,2
481 26.017,2
482 26.129,2
483 26.239,2
484 26.35,2
485 26.454,2
486 26.563,2
487 26.672,2
488 26.784,2
489 26.889,2
490 26.994,2
491 27.103,2
492 27.212,2
493 27.325,2
494 27.437,2
495 27.545,2
496 27.658,2
497 27.762,2
498 27.874,2
499 27.978,2
500 28.085,2
501 28.192,2
502 28.301,2
503 28.412,2
504 28.524,2
505 28.638,2
506 28.749,2
507 28.856,2
508 28.966,2
509 29.072,2
510 29.182,2
511 29.29,2
512 29.394,2
513 29.499,2
514 29.607,2
515 29.711,2
516 29.821,2
517 29.929,2
518 30.035,2
519 30.144,2
520 30.255,2
521 30.367,2
522 30.472,2
523 30.585,2
524 30.691,2
525 30.799,2
526 30.911,2
527 31.021,2
528 31.13,2
529 31.238,2
530 31.352,2
531 31.462,2
532 31.576,2
533 31.69,2
534 31.797,2
535 31.909,2
536 32.021,2
537 32.129,2
538 32.233,2
539 32.337,2
540 32.444,2
541 32.555,2
542 32.658,2
543 32.769,2
544 32.881,2
545 32.987,2
546 33.095,2
547 33.209,2
548 33.317,2
549 33.42,2
550 33.532,2
551 33.64,2
552 33.751,2
553 33.86,2
554 33.963,2
555 34.074,2
556 34.179,2
557 34.282,2
558 34.387,2
559 34.495,2
560 34.601,2
561 34.709,2
562 34.821,2
563 34.926,2
564 35.037,2
565 35.141,2
566 35.244,2
567 35.354,2
568 35.462,2
569 35.575,2
570 35.687,2
571 35.796,2
572 35.908,2
573 36.013,2
574 36.12,2
575 36.233,2
576 36.34,2
577 36.446,2
578 36.553,2
579 36.663,2
580 36.771,2
581 36.881,2
582 36.989,2
583 37.095,2
584 37.208,2
585 37.312,2
586 37.424,2
587 37.534,2
588 37.644,2
589 37.748,2
590 37.859,2
591 37.964,2
592 38.068,2
593 38.173,2
594 38.28,2
595 38.392,2
596 38.496,2
597 38.601,2
598 38.712,2
599 38.82,2
600 38.933,2
601 39.045,2
602 39.155,2
603 39.263,2
604 39.376,2
605 39.49,2
606 39.606,2
607 39.72,2
608 39.829,2
609 39.939,2
610 40.042,2
611 40.154,2
612 40.259,2
613 40.365,2
614 40.478,2
615 40.582,2
616 40.692,2
617 40.796,2
618 40.907,2
619 41.015,2
620 41.118,2
621 41.228,2
622 41.338,2
623 41.445,2
624 41.551,2
625 41.662,2
626 41.774,2
627 41.882,2
628 41.993,2
629 42.099,2
630 42.204,2
631 42.312,2
632 42.419,2
633 42.527,2
634 42.637,2
635 42.739,2
636 42.85,2
637 42.961,2
638 43.068,2
639 43.176,2
640 43.278,2
641 43.39,2
642 43.494,2
643 43.599,2
644 43.71,2
645 43.816,2
646 43.92,2
647 44.025,2
648 44.128,2
649 44.233,2
650 44.337,2
651 44.445,2
652 44.552,2
653 44.663,2
654 44.77,2
655 44.881,2
656 44.988,2
657 45.1,2
658 45.203,2
659 45.312,2
660 45.416,2
661 45.523,2
662 45.634,2
663 45.737,2
@@ -0,0 +1,647 @@
# date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
t_rel_s,status,latency_ms,instance
-25.852,201,5.2,5bbf259ff136
-25.744,201,9.9,7cfd91ddf780
-25.632,201,5.8,5bbf259ff136
-25.522,201,3.8,7cfd91ddf780
-25.411,201,12.4,7cfd91ddf780
-25.288,201,3.8,7cfd91ddf780
-25.181,201,5.8,5bbf259ff136
-25.074,201,3.9,5bbf259ff136
-24.97,201,3.4,5bbf259ff136
-24.858,201,3.5,5bbf259ff136
-24.752,201,3.9,7cfd91ddf780
-24.641,201,6.8,5bbf259ff136
-24.525,201,4.5,5bbf259ff136
-24.411,201,4.0,7cfd91ddf780
-24.302,201,3.2,5bbf259ff136
-24.192,201,2.8,5bbf259ff136
-24.087,201,3.0,5bbf259ff136
-23.974,201,5.0,5bbf259ff136
-23.859,201,5.2,7cfd91ddf780
-23.753,201,5.8,5bbf259ff136
-23.644,201,4.1,5bbf259ff136
-23.537,201,3.4,5bbf259ff136
-23.426,201,3.4,5bbf259ff136
-23.32,201,3.4,5bbf259ff136
-23.21,201,3.2,5bbf259ff136
-23.099,201,4.2,5bbf259ff136
-22.994,201,4.0,7cfd91ddf780
-22.89,201,3.0,7cfd91ddf780
-22.777,201,3.0,7cfd91ddf780
-22.673,201,3.1,5bbf259ff136
-22.56,201,8.6,7cfd91ddf780
-22.444,201,4.4,7cfd91ddf780
-22.33,201,3.6,5bbf259ff136
-22.223,201,2.7,7cfd91ddf780
-22.12,201,3.6,7cfd91ddf780
-22.016,201,2.8,5bbf259ff136
-21.909,201,7.4,5bbf259ff136
-21.791,201,4.0,7cfd91ddf780
-21.678,201,5.2,7cfd91ddf780
-21.571,201,5.3,5bbf259ff136
-21.458,201,5.3,7cfd91ddf780
-21.343,201,5.7,7cfd91ddf780
-21.227,201,5.0,5bbf259ff136
-21.12,201,5.7,5bbf259ff136
-21.009,201,4.8,5bbf259ff136
-20.894,201,5.2,5bbf259ff136
-20.787,201,5.9,5bbf259ff136
-20.676,201,5.1,5bbf259ff136
-20.569,201,5.8,5bbf259ff136
-20.461,201,4.7,5bbf259ff136
-20.355,201,4.5,7cfd91ddf780
-20.243,201,4.7,5bbf259ff136
-20.128,201,3.5,5bbf259ff136
-20.015,201,4.0,5bbf259ff136
-19.91,201,5.1,5bbf259ff136
-19.795,201,3.7,5bbf259ff136
-19.683,201,5.2,5bbf259ff136
-19.569,201,6.1,7cfd91ddf780
-19.463,201,6.1,7cfd91ddf780
-19.35,201,4.4,7cfd91ddf780
-19.245,201,3.9,5bbf259ff136
-19.137,201,3.7,5bbf259ff136
-19.029,201,3.4,5bbf259ff136
-18.925,201,4.8,7cfd91ddf780
-18.811,201,5.3,5bbf259ff136
-18.701,201,5.2,5bbf259ff136
-18.588,201,4.5,5bbf259ff136
-18.477,201,5.4,5bbf259ff136
-18.362,201,5.6,7cfd91ddf780
-18.25,201,4.7,7cfd91ddf780
-18.136,201,5.0,7cfd91ddf780
-18.022,201,5.6,5bbf259ff136
-17.91,201,5.7,5bbf259ff136
-17.794,201,5.1,5bbf259ff136
-17.681,201,5.1,7cfd91ddf780
-17.575,201,6.1,5bbf259ff136
-17.461,201,5.2,7cfd91ddf780
-17.348,201,5.9,7cfd91ddf780
-17.238,201,4.8,7cfd91ddf780
-17.126,201,5.6,7cfd91ddf780
-17.011,201,6.3,5bbf259ff136
-16.898,201,5.2,5bbf259ff136
-16.785,201,5.4,5bbf259ff136
-16.671,201,5.4,7cfd91ddf780
-16.56,201,4.4,7cfd91ddf780
-16.453,201,4.8,5bbf259ff136
-16.342,201,6.1,7cfd91ddf780
-16.226,201,4.5,7cfd91ddf780
-16.118,201,4.7,7cfd91ddf780
-16.009,201,5.1,7cfd91ddf780
-15.898,201,5.1,7cfd91ddf780
-15.789,201,5.6,7cfd91ddf780
-15.673,201,4.5,7cfd91ddf780
-15.567,201,5.1,7cfd91ddf780
-15.453,201,5.1,5bbf259ff136
-15.339,201,6.0,5bbf259ff136
-15.233,201,5.6,5bbf259ff136
-15.117,201,3.4,5bbf259ff136
-15.004,201,10.7,5bbf259ff136
-14.886,201,6.0,5bbf259ff136
-14.773,201,5.8,5bbf259ff136
-14.659,201,5.1,7cfd91ddf780
-14.548,201,4.0,7cfd91ddf780
-14.437,201,4.3,7cfd91ddf780
-14.328,201,3.7,7cfd91ddf780
-14.217,201,3.2,7cfd91ddf780
-14.106,201,5.6,7cfd91ddf780
-13.997,201,5.7,7cfd91ddf780
-13.886,201,4.7,7cfd91ddf780
-13.771,201,5.3,5bbf259ff136
-13.659,201,4.6,5bbf259ff136
-13.545,201,6.1,5bbf259ff136
-13.437,201,5.0,5bbf259ff136
-13.328,201,4.8,5bbf259ff136
-13.221,201,4.7,5bbf259ff136
-13.11,201,4.8,5bbf259ff136
-12.995,201,5.4,5bbf259ff136
-12.886,201,5.8,5bbf259ff136
-12.771,201,4.9,7cfd91ddf780
-12.66,201,5.4,7cfd91ddf780
-12.553,201,6.2,5bbf259ff136
-12.438,201,5.3,7cfd91ddf780
-12.322,201,4.5,5bbf259ff136
-12.215,201,5.2,7cfd91ddf780
-12.1,201,5.2,5bbf259ff136
-11.987,201,4.8,5bbf259ff136
-11.878,201,5.2,5bbf259ff136
-11.766,201,5.1,5bbf259ff136
-11.657,201,4.4,5bbf259ff136
-11.545,201,6.1,5bbf259ff136
-11.436,201,4.6,5bbf259ff136
-11.325,201,5.4,5bbf259ff136
-11.209,201,4.7,7cfd91ddf780
-11.098,201,5.5,7cfd91ddf780
-10.982,201,5.2,5bbf259ff136
-10.87,201,5.4,5bbf259ff136
-10.76,201,5.7,5bbf259ff136
-10.646,201,6.0,5bbf259ff136
-10.535,201,5.0,5bbf259ff136
-10.425,201,4.7,5bbf259ff136
-10.311,201,5.4,7cfd91ddf780
-10.2,201,4.5,7cfd91ddf780
-10.085,201,5.1,7cfd91ddf780
-9.974,201,4.6,7cfd91ddf780
-9.864,201,3.1,7cfd91ddf780
-9.753,201,3.5,7cfd91ddf780
-9.649,201,4.3,7cfd91ddf780
-9.536,201,4.2,7cfd91ddf780
-9.427,201,4.4,7cfd91ddf780
-9.319,201,6.4,7cfd91ddf780
-9.211,201,6.6,7cfd91ddf780
-9.101,201,4.1,7cfd91ddf780
-8.989,201,5.0,7cfd91ddf780
-8.876,201,5.0,7cfd91ddf780
-8.765,201,6.1,7cfd91ddf780
-8.653,201,5.9,5bbf259ff136
-8.537,201,6.2,5bbf259ff136
-8.426,201,5.2,5bbf259ff136
-8.312,201,5.0,5bbf259ff136
-8.2,201,6.5,7cfd91ddf780
-8.088,201,4.4,7cfd91ddf780
-7.973,201,4.4,7cfd91ddf780
-7.861,201,5.0,5bbf259ff136
-7.746,201,5.8,5bbf259ff136
-7.636,201,5.9,5bbf259ff136
-7.52,201,5.3,7cfd91ddf780
-7.411,201,5.2,7cfd91ddf780
-7.298,201,4.9,7cfd91ddf780
-7.186,201,5.1,7cfd91ddf780
-7.075,201,5.5,7cfd91ddf780
-6.966,201,4.8,7cfd91ddf780
-6.853,201,7.0,5bbf259ff136
-6.741,201,5.7,5bbf259ff136
-6.632,201,4.9,5bbf259ff136
-6.517,201,5.1,5bbf259ff136
-6.402,201,5.1,7cfd91ddf780
-6.287,201,4.3,7cfd91ddf780
-6.176,201,5.5,7cfd91ddf780
-6.06,201,5.7,5bbf259ff136
-5.945,201,5.3,5bbf259ff136
-5.829,201,5.0,7cfd91ddf780
-5.719,201,4.2,7cfd91ddf780
-5.604,201,5.3,7cfd91ddf780
-5.49,201,4.7,5bbf259ff136
-5.385,201,3.9,7cfd91ddf780
-5.28,201,4.5,7cfd91ddf780
-5.171,201,4.4,7cfd91ddf780
-5.058,201,5.1,7cfd91ddf780
-4.951,201,4.9,7cfd91ddf780
-4.845,201,6.2,5bbf259ff136
-4.729,201,2.9,7cfd91ddf780
-4.626,201,3.3,5bbf259ff136
-4.516,201,3.9,5bbf259ff136
-4.412,201,4.6,5bbf259ff136
-4.303,201,5.2,5bbf259ff136
-4.194,201,4.7,7cfd91ddf780
-4.089,201,4.7,7cfd91ddf780
-3.974,201,5.0,7cfd91ddf780
-3.862,201,5.4,5bbf259ff136
-3.755,201,6.0,7cfd91ddf780
-3.641,201,6.5,5bbf259ff136
-3.532,201,5.1,5bbf259ff136
-3.418,201,4.7,5bbf259ff136
-3.305,201,4.8,5bbf259ff136
-3.195,201,5.7,5bbf259ff136
-3.085,201,4.4,5bbf259ff136
-2.975,201,5.2,5bbf259ff136
-2.862,201,4.9,7cfd91ddf780
-2.748,201,4.5,7cfd91ddf780
-2.637,201,4.6,7cfd91ddf780
-2.529,201,6.1,7cfd91ddf780
-2.413,201,5.2,5bbf259ff136
-2.302,201,5.6,5bbf259ff136
-2.187,201,4.9,5bbf259ff136
-2.072,201,5.5,7cfd91ddf780
-1.956,201,5.1,7cfd91ddf780
-1.849,201,5.2,7cfd91ddf780
-1.737,201,5.4,7cfd91ddf780
-1.625,201,5.3,7cfd91ddf780
-1.51,201,5.3,5bbf259ff136
-1.404,201,6.3,7cfd91ddf780
-1.291,201,5.5,5bbf259ff136
-1.185,201,5.8,7cfd91ddf780
-1.078,201,6.7,7cfd91ddf780
-0.964,201,7.0,5bbf259ff136
-0.855,201,5.7,7cfd91ddf780
-0.748,201,4.7,7cfd91ddf780
-0.642,201,5.7,7cfd91ddf780
-0.526,201,5.6,7cfd91ddf780
-0.42,201,5.1,7cfd91ddf780
-0.309,201,5.5,7cfd91ddf780
-0.199,201,5.0,7cfd91ddf780
-0.088,201,5.2,7cfd91ddf780
0.019,201,4.0,7cfd91ddf780
0.133,201,3.5,7cfd91ddf780
0.241,201,3.7,7cfd91ddf780
0.352,201,6.6,7cfd91ddf780
0.46,201,5.2,7cfd91ddf780
0.569,201,4.6,7cfd91ddf780
0.675,201,5.2,5bbf259ff136
0.79,201,4.4,7cfd91ddf780
0.896,201,4.5,5bbf259ff136
1.005,201,5.1,5bbf259ff136
1.118,201,5.4,5bbf259ff136
1.233,201,3.4,5bbf259ff136
1.343,201,4.1,5bbf259ff136
1.457,201,4.8,5bbf259ff136
1.565,201,4.2,5bbf259ff136
1.679,201,4.6,5bbf259ff136
1.785,201,6.0,5bbf259ff136
1.895,201,6.1,5bbf259ff136
2.011,201,4.3,5bbf259ff136
2.117,201,6.7,5bbf259ff136
2.234,201,4.1,5bbf259ff136
2.342,201,5.5,5bbf259ff136
2.457,201,6.2,5bbf259ff136
2.57,201,3.6,5bbf259ff136
2.675,201,4.6,5bbf259ff136
2.78,201,4.0,5bbf259ff136
2.892,201,3.2,5bbf259ff136
2.995,201,3.1,5bbf259ff136
3.106,201,6.7,5bbf259ff136
3.218,201,6.4,5bbf259ff136
3.334,201,6.6,5bbf259ff136
3.451,201,6.3,5bbf259ff136
3.563,201,5.6,5bbf259ff136
3.669,201,7.1,5bbf259ff136
3.78,201,4.6,5bbf259ff136
3.887,201,5.8,5bbf259ff136
4.003,201,6.2,5bbf259ff136
4.12,201,5.4,5bbf259ff136
4.234,201,5.0,5bbf259ff136
4.348,201,6.5,5bbf259ff136
4.458,201,6.0,5bbf259ff136
4.564,201,5.9,5bbf259ff136
4.674,201,5.4,5bbf259ff136
4.787,201,7.3,5bbf259ff136
4.9,201,5.7,5bbf259ff136
5.014,201,5.3,5bbf259ff136
5.126,201,5.2,5bbf259ff136
5.241,201,5.2,5bbf259ff136
5.352,201,3.0,5bbf259ff136
5.458,201,3.6,5bbf259ff136
5.566,201,2.8,5bbf259ff136
5.672,201,3.0,5bbf259ff136
5.776,201,4.3,5bbf259ff136
5.882,201,4.2,5bbf259ff136
5.99,201,5.6,5bbf259ff136
6.097,201,3.8,5bbf259ff136
6.204,201,5.5,5bbf259ff136
6.31,201,5.2,5bbf259ff136
6.421,201,3.4,5bbf259ff136
6.529,201,4.4,5bbf259ff136
6.636,201,3.7,5bbf259ff136
6.747,201,4.6,5bbf259ff136
6.861,201,4.7,5bbf259ff136
6.974,201,3.9,5bbf259ff136
7.081,201,5.7,5bbf259ff136
7.189,201,6.0,5bbf259ff136
7.302,201,4.3,5bbf259ff136
7.412,201,4.8,5bbf259ff136
7.522,201,4.8,5bbf259ff136
7.631,201,4.5,5bbf259ff136
7.739,201,6.3,5bbf259ff136
7.854,201,3.7,5bbf259ff136
7.959,201,6.1,5bbf259ff136
8.075,201,6.3,5bbf259ff136
8.191,201,5.6,5bbf259ff136
8.306,201,6.0,5bbf259ff136
8.422,201,5.4,5bbf259ff136
8.537,201,5.8,5bbf259ff136
8.651,201,5.3,5bbf259ff136
8.758,201,6.5,5bbf259ff136
8.869,201,5.5,5bbf259ff136
8.977,201,7.0,5bbf259ff136
9.094,201,4.9,5bbf259ff136
9.202,201,5.9,5bbf259ff136
9.313,201,5.8,5bbf259ff136
9.421,201,4.4,5bbf259ff136
9.526,201,6.7,5bbf259ff136
9.64,201,7.0,5bbf259ff136
9.753,201,7.7,5bbf259ff136
9.869,201,5.7,5bbf259ff136
9.979,201,5.9,5bbf259ff136
10.086,201,6.6,5bbf259ff136
10.194,201,4.8,5bbf259ff136
10.309,201,4.9,5bbf259ff136
10.419,201,3.7,5bbf259ff136
10.529,201,4.7,5bbf259ff136
10.64,201,5.3,5bbf259ff136
10.751,201,4.1,5bbf259ff136
10.862,201,4.6,5bbf259ff136
10.968,201,6.9,5bbf259ff136
11.084,201,5.0,5bbf259ff136
11.191,201,4.0,5bbf259ff136
11.296,201,7.0,5bbf259ff136
11.411,201,6.1,5bbf259ff136
11.527,201,6.0,5bbf259ff136
11.641,201,4.6,5bbf259ff136
11.753,201,4.7,5bbf259ff136
11.868,201,5.1,5bbf259ff136
11.976,201,6.4,5bbf259ff136
12.088,201,4.8,5bbf259ff136
12.199,201,3.8,5bbf259ff136
12.313,201,4.7,5bbf259ff136
12.424,201,4.9,5bbf259ff136
12.535,201,4.9,5bbf259ff136
12.65,201,5.2,5bbf259ff136
12.762,201,4.6,5bbf259ff136
12.869,201,4.6,5bbf259ff136
12.977,201,3.8,5bbf259ff136
13.089,201,3.6,5bbf259ff136
13.196,201,5.8,5bbf259ff136
13.304,201,4.5,5bbf259ff136
13.413,201,4.0,5bbf259ff136
13.526,201,5.2,5bbf259ff136
13.633,201,5.3,5bbf259ff136
13.747,201,3.9,5bbf259ff136
13.859,201,3.8,5bbf259ff136
13.969,201,3.9,5bbf259ff136
14.076,201,3.7,5bbf259ff136
14.184,201,3.5,5bbf259ff136
14.296,201,5.1,5bbf259ff136
14.409,201,4.4,5bbf259ff136
14.519,201,7.0,5bbf259ff136
14.632,201,6.5,5bbf259ff136
14.746,201,6.7,5bbf259ff136
14.855,201,5.9,5bbf259ff136
14.968,201,11.9,7cfd91ddf780
15.088,201,5.6,5bbf259ff136
15.203,201,4.0,5bbf259ff136
15.31,201,4.9,5bbf259ff136
15.423,201,6.8,5bbf259ff136
15.538,201,4.5,7cfd91ddf780
15.646,201,5.7,7cfd91ddf780
15.758,201,7.3,7cfd91ddf780
15.868,201,8.8,7cfd91ddf780
15.987,201,3.4,5bbf259ff136
16.1,201,4.6,5bbf259ff136
16.207,201,4.9,5bbf259ff136
16.319,201,4.9,5bbf259ff136
16.432,201,4.5,5bbf259ff136
16.538,201,4.7,5bbf259ff136
16.651,201,6.0,5bbf259ff136
16.763,201,4.9,5bbf259ff136
16.874,201,4.4,5bbf259ff136
16.979,201,4.1,5bbf259ff136
17.09,201,5.1,5bbf259ff136
17.197,201,5.2,5bbf259ff136
17.312,201,5.9,5bbf259ff136
17.426,201,5.1,5bbf259ff136
17.541,201,5.4,7cfd91ddf780
17.652,201,5.2,7cfd91ddf780
17.761,201,5.1,7cfd91ddf780
17.877,201,6.2,5bbf259ff136
17.993,201,6.3,5bbf259ff136
18.109,201,6.2,7cfd91ddf780
18.218,201,5.0,7cfd91ddf780
18.334,201,5.3,7cfd91ddf780
18.442,201,5.2,7cfd91ddf780
18.55,201,5.5,7cfd91ddf780
18.663,201,5.2,7cfd91ddf780
18.775,201,5.8,5bbf259ff136
18.891,201,4.3,5bbf259ff136
19.006,201,11.6,7cfd91ddf780
19.127,201,4.9,5bbf259ff136
19.241,201,6.1,5bbf259ff136
19.35,201,5.0,5bbf259ff136
19.463,201,4.9,5bbf259ff136
19.571,201,5.1,5bbf259ff136
19.682,201,4.7,5bbf259ff136
19.795,201,5.0,5bbf259ff136
19.91,201,4.4,7cfd91ddf780
20.02,201,6.2,7cfd91ddf780
20.129,201,5.4,7cfd91ddf780
20.244,201,5.8,7cfd91ddf780
20.354,201,5.2,7cfd91ddf780
20.468,201,5.6,5bbf259ff136
20.579,201,7.0,5bbf259ff136
20.686,201,4.7,7cfd91ddf780
20.793,201,4.9,7cfd91ddf780
20.901,201,5.0,7cfd91ddf780
21.009,201,3.9,7cfd91ddf780
21.121,201,4.9,7cfd91ddf780
21.229,201,5.9,7cfd91ddf780
21.337,201,4.9,7cfd91ddf780
21.446,201,5.4,7cfd91ddf780
21.562,201,6.4,7cfd91ddf780
21.671,201,6.0,7cfd91ddf780
21.787,201,5.8,5bbf259ff136
21.893,201,4.9,7cfd91ddf780
22.007,201,5.0,7cfd91ddf780
22.116,201,5.8,5bbf259ff136
22.222,201,5.2,7cfd91ddf780
22.329,201,4.9,7cfd91ddf780
22.438,201,5.8,7cfd91ddf780
22.553,201,6.3,7cfd91ddf780
22.669,201,5.5,5bbf259ff136
22.785,201,6.3,7cfd91ddf780
22.896,201,5.5,5bbf259ff136
23.006,201,6.2,7cfd91ddf780
23.115,201,6.6,5bbf259ff136
23.232,201,5.3,7cfd91ddf780
23.347,201,6.7,5bbf259ff136
23.461,201,6.8,5bbf259ff136
23.578,201,4.1,7cfd91ddf780
23.687,201,6.1,7cfd91ddf780
23.802,201,6.8,7cfd91ddf780
23.917,201,6.0,5bbf259ff136
24.033,201,3.2,5bbf259ff136
24.145,201,3.9,5bbf259ff136
24.256,201,4.2,7cfd91ddf780
24.363,201,4.9,5bbf259ff136
24.468,201,5.0,5bbf259ff136
24.577,201,4.5,5bbf259ff136
24.687,201,5.2,7cfd91ddf780
24.797,201,5.3,5bbf259ff136
24.909,201,4.7,5bbf259ff136
25.021,201,5.0,5bbf259ff136
25.126,201,7.2,5bbf259ff136
25.239,201,6.0,5bbf259ff136
25.35,201,5.8,5bbf259ff136
25.463,201,6.2,5bbf259ff136
25.573,201,5.5,5bbf259ff136
25.687,201,5.2,7cfd91ddf780
25.797,201,5.8,7cfd91ddf780
25.912,201,5.2,7cfd91ddf780
26.021,201,4.8,7cfd91ddf780
26.131,201,3.5,7cfd91ddf780
26.235,201,3.7,5bbf259ff136
26.349,201,5.5,7cfd91ddf780
26.465,201,4.8,7cfd91ddf780
26.57,201,4.5,7cfd91ddf780
26.679,201,4.2,7cfd91ddf780
26.793,201,4.8,7cfd91ddf780
26.903,201,4.9,7cfd91ddf780
27.012,201,5.4,7cfd91ddf780
27.121,201,5.7,7cfd91ddf780
27.227,201,5.0,7cfd91ddf780
27.342,201,5.4,7cfd91ddf780
27.452,201,5.1,7cfd91ddf780
27.565,201,4.8,7cfd91ddf780
27.675,201,5.0,7cfd91ddf780
27.79,201,5.4,5bbf259ff136
27.904,201,5.8,5bbf259ff136
28.014,201,6.5,5bbf259ff136
28.131,201,5.5,7cfd91ddf780
28.246,201,5.7,5bbf259ff136
28.354,201,5.8,7cfd91ddf780
28.467,201,6.2,5bbf259ff136
28.581,201,5.6,5bbf259ff136
28.69,201,4.3,5bbf259ff136
28.795,201,5.1,7cfd91ddf780
28.907,201,5.1,5bbf259ff136
29.015,201,6.1,7cfd91ddf780
29.123,201,6.4,7cfd91ddf780
29.237,201,3.9,5bbf259ff136
29.349,201,4.2,5bbf259ff136
29.455,201,7.7,5bbf259ff136
29.569,201,7.2,5bbf259ff136
29.679,201,6.3,5bbf259ff136
29.794,201,7.5,5bbf259ff136
29.91,201,5.8,7cfd91ddf780
30.022,201,6.9,7cfd91ddf780
30.136,201,6.7,5bbf259ff136
30.252,201,6.3,5bbf259ff136
30.367,201,6.1,7cfd91ddf780
30.479,201,6.8,7cfd91ddf780
30.595,201,4.9,7cfd91ddf780
30.703,201,5.1,7cfd91ddf780
30.813,201,4.7,7cfd91ddf780
30.924,201,5.3,7cfd91ddf780
31.032,201,5.1,7cfd91ddf780
31.143,201,4.5,7cfd91ddf780
31.257,201,4.8,5bbf259ff136
31.371,201,3.3,5bbf259ff136
31.477,201,4.6,5bbf259ff136
31.586,201,3.6,5bbf259ff136
31.699,201,4.4,5bbf259ff136
31.813,201,4.8,5bbf259ff136
31.927,201,4.6,7cfd91ddf780
32.042,201,5.3,7cfd91ddf780
32.158,201,5.0,5bbf259ff136
32.27,201,4.2,5bbf259ff136
32.378,201,5.6,5bbf259ff136
32.487,201,5.7,5bbf259ff136
32.603,201,4.3,5bbf259ff136
32.712,201,6.5,5bbf259ff136
32.828,201,6.7,7cfd91ddf780
32.945,201,5.3,7cfd91ddf780
33.054,201,5.8,7cfd91ddf780
33.168,201,6.3,5bbf259ff136
33.279,201,8.0,5bbf259ff136
33.393,201,5.6,5bbf259ff136
33.503,201,4.7,5bbf259ff136
33.616,201,6.1,7cfd91ddf780
33.731,201,4.7,7cfd91ddf780
33.845,201,7.1,7cfd91ddf780
33.954,201,5.1,7cfd91ddf780
34.069,201,5.8,5bbf259ff136
34.179,201,5.2,5bbf259ff136
34.288,201,4.7,5bbf259ff136
34.399,201,3.1,5bbf259ff136
34.512,201,3.5,5bbf259ff136
34.625,201,4.0,5bbf259ff136
34.733,201,4.6,5bbf259ff136
34.848,201,5.8,7cfd91ddf780
34.957,201,4.2,7cfd91ddf780
35.062,201,6.9,5bbf259ff136
35.169,201,5.2,5bbf259ff136
35.282,201,6.0,5bbf259ff136
35.395,201,5.3,5bbf259ff136
35.503,201,5.2,5bbf259ff136
35.614,201,5.8,5bbf259ff136
35.72,201,4.9,5bbf259ff136
35.83,201,6.2,5bbf259ff136
35.938,201,5.5,5bbf259ff136
36.05,201,6.1,5bbf259ff136
36.159,201,5.0,5bbf259ff136
36.273,201,5.2,5bbf259ff136
36.387,201,6.5,7cfd91ddf780
36.495,201,8.3,5bbf259ff136
36.611,201,3.5,7cfd91ddf780
36.716,201,4.1,7cfd91ddf780
36.823,201,7.0,5bbf259ff136
36.937,201,4.8,7cfd91ddf780
37.046,201,6.6,7cfd91ddf780
37.16,201,5.2,7cfd91ddf780
37.271,201,4.7,7cfd91ddf780
37.378,201,5.3,7cfd91ddf780
37.487,201,6.1,7cfd91ddf780
37.596,201,4.5,7cfd91ddf780
37.71,201,4.0,7cfd91ddf780
37.821,201,5.1,7cfd91ddf780
37.927,201,4.4,7cfd91ddf780
38.037,201,6.3,7cfd91ddf780
38.145,201,6.1,5bbf259ff136
38.259,201,5.1,7cfd91ddf780
38.373,201,8.5,7cfd91ddf780
38.485,201,5.3,7cfd91ddf780
38.592,201,4.8,7cfd91ddf780
38.706,201,4.2,7cfd91ddf780
38.82,201,4.7,5bbf259ff136
38.933,201,5.9,5bbf259ff136
39.041,201,6.6,5bbf259ff136
39.155,201,6.8,7cfd91ddf780
39.269,201,5.0,7cfd91ddf780
39.379,201,5.5,7cfd91ddf780
39.49,201,11.5,7cfd91ddf780
39.605,201,6.4,5bbf259ff136
39.72,201,5.7,5bbf259ff136
39.828,201,6.5,5bbf259ff136
39.939,201,6.0,5bbf259ff136
40.054,201,5.0,5bbf259ff136
40.161,201,4.9,5bbf259ff136
40.27,201,5.6,5bbf259ff136
40.377,201,6.1,7cfd91ddf780
40.493,201,4.2,5bbf259ff136
40.604,201,6.2,5bbf259ff136
40.71,201,4.2,5bbf259ff136
40.817,201,4.2,5bbf259ff136
40.927,201,5.0,5bbf259ff136
41.039,201,5.1,5bbf259ff136
41.154,201,5.1,5bbf259ff136
41.264,201,4.9,5bbf259ff136
41.372,201,5.1,5bbf259ff136
41.487,201,6.8,7cfd91ddf780
41.597,201,3.7,7cfd91ddf780
41.711,201,3.9,7cfd91ddf780
41.824,201,4.3,7cfd91ddf780
41.939,201,5.0,5bbf259ff136
42.049,201,6.2,5bbf259ff136
42.16,201,5.7,5bbf259ff136
42.27,201,3.6,5bbf259ff136
42.378,201,3.7,5bbf259ff136
42.492,201,4.5,5bbf259ff136
42.599,201,4.3,5bbf259ff136
42.711,201,4.0,5bbf259ff136
42.821,201,6.6,5bbf259ff136
42.937,201,4.8,7cfd91ddf780
43.048,201,6.1,7cfd91ddf780
43.16,201,3.3,7cfd91ddf780
43.265,201,3.2,5bbf259ff136
43.37,201,3.5,5bbf259ff136
43.482,201,3.4,5bbf259ff136
43.59,201,3.1,5bbf259ff136
43.698,201,7.8,5bbf259ff136
43.816,201,7.4,7cfd91ddf780
43.928,201,5.0,7cfd91ddf780
44.036,201,5.0,7cfd91ddf780
44.149,201,5.4,7cfd91ddf780
44.264,201,6.0,7cfd91ddf780
44.371,201,5.1,7cfd91ddf780
44.481,201,4.8,7cfd91ddf780
44.595,201,3.4,7cfd91ddf780
44.7,201,3.2,7cfd91ddf780
44.812,201,2.8,7cfd91ddf780
44.925,201,4.3,7cfd91ddf780
45.034,201,5.7,5bbf259ff136
45.145,201,8.0,7cfd91ddf780
45.26,201,8.5,5bbf259ff136
45.369,201,8.2,7cfd91ddf780
45.487,201,11.7,5bbf259ff136
45.607,201,11.0,7cfd91ddf780
45.727,201,4.3,5bbf259ff136
1 # date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
2 t_rel_s,status,latency_ms,instance
3 -25.852,201,5.2,5bbf259ff136
4 -25.744,201,9.9,7cfd91ddf780
5 -25.632,201,5.8,5bbf259ff136
6 -25.522,201,3.8,7cfd91ddf780
7 -25.411,201,12.4,7cfd91ddf780
8 -25.288,201,3.8,7cfd91ddf780
9 -25.181,201,5.8,5bbf259ff136
10 -25.074,201,3.9,5bbf259ff136
11 -24.97,201,3.4,5bbf259ff136
12 -24.858,201,3.5,5bbf259ff136
13 -24.752,201,3.9,7cfd91ddf780
14 -24.641,201,6.8,5bbf259ff136
15 -24.525,201,4.5,5bbf259ff136
16 -24.411,201,4.0,7cfd91ddf780
17 -24.302,201,3.2,5bbf259ff136
18 -24.192,201,2.8,5bbf259ff136
19 -24.087,201,3.0,5bbf259ff136
20 -23.974,201,5.0,5bbf259ff136
21 -23.859,201,5.2,7cfd91ddf780
22 -23.753,201,5.8,5bbf259ff136
23 -23.644,201,4.1,5bbf259ff136
24 -23.537,201,3.4,5bbf259ff136
25 -23.426,201,3.4,5bbf259ff136
26 -23.32,201,3.4,5bbf259ff136
27 -23.21,201,3.2,5bbf259ff136
28 -23.099,201,4.2,5bbf259ff136
29 -22.994,201,4.0,7cfd91ddf780
30 -22.89,201,3.0,7cfd91ddf780
31 -22.777,201,3.0,7cfd91ddf780
32 -22.673,201,3.1,5bbf259ff136
33 -22.56,201,8.6,7cfd91ddf780
34 -22.444,201,4.4,7cfd91ddf780
35 -22.33,201,3.6,5bbf259ff136
36 -22.223,201,2.7,7cfd91ddf780
37 -22.12,201,3.6,7cfd91ddf780
38 -22.016,201,2.8,5bbf259ff136
39 -21.909,201,7.4,5bbf259ff136
40 -21.791,201,4.0,7cfd91ddf780
41 -21.678,201,5.2,7cfd91ddf780
42 -21.571,201,5.3,5bbf259ff136
43 -21.458,201,5.3,7cfd91ddf780
44 -21.343,201,5.7,7cfd91ddf780
45 -21.227,201,5.0,5bbf259ff136
46 -21.12,201,5.7,5bbf259ff136
47 -21.009,201,4.8,5bbf259ff136
48 -20.894,201,5.2,5bbf259ff136
49 -20.787,201,5.9,5bbf259ff136
50 -20.676,201,5.1,5bbf259ff136
51 -20.569,201,5.8,5bbf259ff136
52 -20.461,201,4.7,5bbf259ff136
53 -20.355,201,4.5,7cfd91ddf780
54 -20.243,201,4.7,5bbf259ff136
55 -20.128,201,3.5,5bbf259ff136
56 -20.015,201,4.0,5bbf259ff136
57 -19.91,201,5.1,5bbf259ff136
58 -19.795,201,3.7,5bbf259ff136
59 -19.683,201,5.2,5bbf259ff136
60 -19.569,201,6.1,7cfd91ddf780
61 -19.463,201,6.1,7cfd91ddf780
62 -19.35,201,4.4,7cfd91ddf780
63 -19.245,201,3.9,5bbf259ff136
64 -19.137,201,3.7,5bbf259ff136
65 -19.029,201,3.4,5bbf259ff136
66 -18.925,201,4.8,7cfd91ddf780
67 -18.811,201,5.3,5bbf259ff136
68 -18.701,201,5.2,5bbf259ff136
69 -18.588,201,4.5,5bbf259ff136
70 -18.477,201,5.4,5bbf259ff136
71 -18.362,201,5.6,7cfd91ddf780
72 -18.25,201,4.7,7cfd91ddf780
73 -18.136,201,5.0,7cfd91ddf780
74 -18.022,201,5.6,5bbf259ff136
75 -17.91,201,5.7,5bbf259ff136
76 -17.794,201,5.1,5bbf259ff136
77 -17.681,201,5.1,7cfd91ddf780
78 -17.575,201,6.1,5bbf259ff136
79 -17.461,201,5.2,7cfd91ddf780
80 -17.348,201,5.9,7cfd91ddf780
81 -17.238,201,4.8,7cfd91ddf780
82 -17.126,201,5.6,7cfd91ddf780
83 -17.011,201,6.3,5bbf259ff136
84 -16.898,201,5.2,5bbf259ff136
85 -16.785,201,5.4,5bbf259ff136
86 -16.671,201,5.4,7cfd91ddf780
87 -16.56,201,4.4,7cfd91ddf780
88 -16.453,201,4.8,5bbf259ff136
89 -16.342,201,6.1,7cfd91ddf780
90 -16.226,201,4.5,7cfd91ddf780
91 -16.118,201,4.7,7cfd91ddf780
92 -16.009,201,5.1,7cfd91ddf780
93 -15.898,201,5.1,7cfd91ddf780
94 -15.789,201,5.6,7cfd91ddf780
95 -15.673,201,4.5,7cfd91ddf780
96 -15.567,201,5.1,7cfd91ddf780
97 -15.453,201,5.1,5bbf259ff136
98 -15.339,201,6.0,5bbf259ff136
99 -15.233,201,5.6,5bbf259ff136
100 -15.117,201,3.4,5bbf259ff136
101 -15.004,201,10.7,5bbf259ff136
102 -14.886,201,6.0,5bbf259ff136
103 -14.773,201,5.8,5bbf259ff136
104 -14.659,201,5.1,7cfd91ddf780
105 -14.548,201,4.0,7cfd91ddf780
106 -14.437,201,4.3,7cfd91ddf780
107 -14.328,201,3.7,7cfd91ddf780
108 -14.217,201,3.2,7cfd91ddf780
109 -14.106,201,5.6,7cfd91ddf780
110 -13.997,201,5.7,7cfd91ddf780
111 -13.886,201,4.7,7cfd91ddf780
112 -13.771,201,5.3,5bbf259ff136
113 -13.659,201,4.6,5bbf259ff136
114 -13.545,201,6.1,5bbf259ff136
115 -13.437,201,5.0,5bbf259ff136
116 -13.328,201,4.8,5bbf259ff136
117 -13.221,201,4.7,5bbf259ff136
118 -13.11,201,4.8,5bbf259ff136
119 -12.995,201,5.4,5bbf259ff136
120 -12.886,201,5.8,5bbf259ff136
121 -12.771,201,4.9,7cfd91ddf780
122 -12.66,201,5.4,7cfd91ddf780
123 -12.553,201,6.2,5bbf259ff136
124 -12.438,201,5.3,7cfd91ddf780
125 -12.322,201,4.5,5bbf259ff136
126 -12.215,201,5.2,7cfd91ddf780
127 -12.1,201,5.2,5bbf259ff136
128 -11.987,201,4.8,5bbf259ff136
129 -11.878,201,5.2,5bbf259ff136
130 -11.766,201,5.1,5bbf259ff136
131 -11.657,201,4.4,5bbf259ff136
132 -11.545,201,6.1,5bbf259ff136
133 -11.436,201,4.6,5bbf259ff136
134 -11.325,201,5.4,5bbf259ff136
135 -11.209,201,4.7,7cfd91ddf780
136 -11.098,201,5.5,7cfd91ddf780
137 -10.982,201,5.2,5bbf259ff136
138 -10.87,201,5.4,5bbf259ff136
139 -10.76,201,5.7,5bbf259ff136
140 -10.646,201,6.0,5bbf259ff136
141 -10.535,201,5.0,5bbf259ff136
142 -10.425,201,4.7,5bbf259ff136
143 -10.311,201,5.4,7cfd91ddf780
144 -10.2,201,4.5,7cfd91ddf780
145 -10.085,201,5.1,7cfd91ddf780
146 -9.974,201,4.6,7cfd91ddf780
147 -9.864,201,3.1,7cfd91ddf780
148 -9.753,201,3.5,7cfd91ddf780
149 -9.649,201,4.3,7cfd91ddf780
150 -9.536,201,4.2,7cfd91ddf780
151 -9.427,201,4.4,7cfd91ddf780
152 -9.319,201,6.4,7cfd91ddf780
153 -9.211,201,6.6,7cfd91ddf780
154 -9.101,201,4.1,7cfd91ddf780
155 -8.989,201,5.0,7cfd91ddf780
156 -8.876,201,5.0,7cfd91ddf780
157 -8.765,201,6.1,7cfd91ddf780
158 -8.653,201,5.9,5bbf259ff136
159 -8.537,201,6.2,5bbf259ff136
160 -8.426,201,5.2,5bbf259ff136
161 -8.312,201,5.0,5bbf259ff136
162 -8.2,201,6.5,7cfd91ddf780
163 -8.088,201,4.4,7cfd91ddf780
164 -7.973,201,4.4,7cfd91ddf780
165 -7.861,201,5.0,5bbf259ff136
166 -7.746,201,5.8,5bbf259ff136
167 -7.636,201,5.9,5bbf259ff136
168 -7.52,201,5.3,7cfd91ddf780
169 -7.411,201,5.2,7cfd91ddf780
170 -7.298,201,4.9,7cfd91ddf780
171 -7.186,201,5.1,7cfd91ddf780
172 -7.075,201,5.5,7cfd91ddf780
173 -6.966,201,4.8,7cfd91ddf780
174 -6.853,201,7.0,5bbf259ff136
175 -6.741,201,5.7,5bbf259ff136
176 -6.632,201,4.9,5bbf259ff136
177 -6.517,201,5.1,5bbf259ff136
178 -6.402,201,5.1,7cfd91ddf780
179 -6.287,201,4.3,7cfd91ddf780
180 -6.176,201,5.5,7cfd91ddf780
181 -6.06,201,5.7,5bbf259ff136
182 -5.945,201,5.3,5bbf259ff136
183 -5.829,201,5.0,7cfd91ddf780
184 -5.719,201,4.2,7cfd91ddf780
185 -5.604,201,5.3,7cfd91ddf780
186 -5.49,201,4.7,5bbf259ff136
187 -5.385,201,3.9,7cfd91ddf780
188 -5.28,201,4.5,7cfd91ddf780
189 -5.171,201,4.4,7cfd91ddf780
190 -5.058,201,5.1,7cfd91ddf780
191 -4.951,201,4.9,7cfd91ddf780
192 -4.845,201,6.2,5bbf259ff136
193 -4.729,201,2.9,7cfd91ddf780
194 -4.626,201,3.3,5bbf259ff136
195 -4.516,201,3.9,5bbf259ff136
196 -4.412,201,4.6,5bbf259ff136
197 -4.303,201,5.2,5bbf259ff136
198 -4.194,201,4.7,7cfd91ddf780
199 -4.089,201,4.7,7cfd91ddf780
200 -3.974,201,5.0,7cfd91ddf780
201 -3.862,201,5.4,5bbf259ff136
202 -3.755,201,6.0,7cfd91ddf780
203 -3.641,201,6.5,5bbf259ff136
204 -3.532,201,5.1,5bbf259ff136
205 -3.418,201,4.7,5bbf259ff136
206 -3.305,201,4.8,5bbf259ff136
207 -3.195,201,5.7,5bbf259ff136
208 -3.085,201,4.4,5bbf259ff136
209 -2.975,201,5.2,5bbf259ff136
210 -2.862,201,4.9,7cfd91ddf780
211 -2.748,201,4.5,7cfd91ddf780
212 -2.637,201,4.6,7cfd91ddf780
213 -2.529,201,6.1,7cfd91ddf780
214 -2.413,201,5.2,5bbf259ff136
215 -2.302,201,5.6,5bbf259ff136
216 -2.187,201,4.9,5bbf259ff136
217 -2.072,201,5.5,7cfd91ddf780
218 -1.956,201,5.1,7cfd91ddf780
219 -1.849,201,5.2,7cfd91ddf780
220 -1.737,201,5.4,7cfd91ddf780
221 -1.625,201,5.3,7cfd91ddf780
222 -1.51,201,5.3,5bbf259ff136
223 -1.404,201,6.3,7cfd91ddf780
224 -1.291,201,5.5,5bbf259ff136
225 -1.185,201,5.8,7cfd91ddf780
226 -1.078,201,6.7,7cfd91ddf780
227 -0.964,201,7.0,5bbf259ff136
228 -0.855,201,5.7,7cfd91ddf780
229 -0.748,201,4.7,7cfd91ddf780
230 -0.642,201,5.7,7cfd91ddf780
231 -0.526,201,5.6,7cfd91ddf780
232 -0.42,201,5.1,7cfd91ddf780
233 -0.309,201,5.5,7cfd91ddf780
234 -0.199,201,5.0,7cfd91ddf780
235 -0.088,201,5.2,7cfd91ddf780
236 0.019,201,4.0,7cfd91ddf780
237 0.133,201,3.5,7cfd91ddf780
238 0.241,201,3.7,7cfd91ddf780
239 0.352,201,6.6,7cfd91ddf780
240 0.46,201,5.2,7cfd91ddf780
241 0.569,201,4.6,7cfd91ddf780
242 0.675,201,5.2,5bbf259ff136
243 0.79,201,4.4,7cfd91ddf780
244 0.896,201,4.5,5bbf259ff136
245 1.005,201,5.1,5bbf259ff136
246 1.118,201,5.4,5bbf259ff136
247 1.233,201,3.4,5bbf259ff136
248 1.343,201,4.1,5bbf259ff136
249 1.457,201,4.8,5bbf259ff136
250 1.565,201,4.2,5bbf259ff136
251 1.679,201,4.6,5bbf259ff136
252 1.785,201,6.0,5bbf259ff136
253 1.895,201,6.1,5bbf259ff136
254 2.011,201,4.3,5bbf259ff136
255 2.117,201,6.7,5bbf259ff136
256 2.234,201,4.1,5bbf259ff136
257 2.342,201,5.5,5bbf259ff136
258 2.457,201,6.2,5bbf259ff136
259 2.57,201,3.6,5bbf259ff136
260 2.675,201,4.6,5bbf259ff136
261 2.78,201,4.0,5bbf259ff136
262 2.892,201,3.2,5bbf259ff136
263 2.995,201,3.1,5bbf259ff136
264 3.106,201,6.7,5bbf259ff136
265 3.218,201,6.4,5bbf259ff136
266 3.334,201,6.6,5bbf259ff136
267 3.451,201,6.3,5bbf259ff136
268 3.563,201,5.6,5bbf259ff136
269 3.669,201,7.1,5bbf259ff136
270 3.78,201,4.6,5bbf259ff136
271 3.887,201,5.8,5bbf259ff136
272 4.003,201,6.2,5bbf259ff136
273 4.12,201,5.4,5bbf259ff136
274 4.234,201,5.0,5bbf259ff136
275 4.348,201,6.5,5bbf259ff136
276 4.458,201,6.0,5bbf259ff136
277 4.564,201,5.9,5bbf259ff136
278 4.674,201,5.4,5bbf259ff136
279 4.787,201,7.3,5bbf259ff136
280 4.9,201,5.7,5bbf259ff136
281 5.014,201,5.3,5bbf259ff136
282 5.126,201,5.2,5bbf259ff136
283 5.241,201,5.2,5bbf259ff136
284 5.352,201,3.0,5bbf259ff136
285 5.458,201,3.6,5bbf259ff136
286 5.566,201,2.8,5bbf259ff136
287 5.672,201,3.0,5bbf259ff136
288 5.776,201,4.3,5bbf259ff136
289 5.882,201,4.2,5bbf259ff136
290 5.99,201,5.6,5bbf259ff136
291 6.097,201,3.8,5bbf259ff136
292 6.204,201,5.5,5bbf259ff136
293 6.31,201,5.2,5bbf259ff136
294 6.421,201,3.4,5bbf259ff136
295 6.529,201,4.4,5bbf259ff136
296 6.636,201,3.7,5bbf259ff136
297 6.747,201,4.6,5bbf259ff136
298 6.861,201,4.7,5bbf259ff136
299 6.974,201,3.9,5bbf259ff136
300 7.081,201,5.7,5bbf259ff136
301 7.189,201,6.0,5bbf259ff136
302 7.302,201,4.3,5bbf259ff136
303 7.412,201,4.8,5bbf259ff136
304 7.522,201,4.8,5bbf259ff136
305 7.631,201,4.5,5bbf259ff136
306 7.739,201,6.3,5bbf259ff136
307 7.854,201,3.7,5bbf259ff136
308 7.959,201,6.1,5bbf259ff136
309 8.075,201,6.3,5bbf259ff136
310 8.191,201,5.6,5bbf259ff136
311 8.306,201,6.0,5bbf259ff136
312 8.422,201,5.4,5bbf259ff136
313 8.537,201,5.8,5bbf259ff136
314 8.651,201,5.3,5bbf259ff136
315 8.758,201,6.5,5bbf259ff136
316 8.869,201,5.5,5bbf259ff136
317 8.977,201,7.0,5bbf259ff136
318 9.094,201,4.9,5bbf259ff136
319 9.202,201,5.9,5bbf259ff136
320 9.313,201,5.8,5bbf259ff136
321 9.421,201,4.4,5bbf259ff136
322 9.526,201,6.7,5bbf259ff136
323 9.64,201,7.0,5bbf259ff136
324 9.753,201,7.7,5bbf259ff136
325 9.869,201,5.7,5bbf259ff136
326 9.979,201,5.9,5bbf259ff136
327 10.086,201,6.6,5bbf259ff136
328 10.194,201,4.8,5bbf259ff136
329 10.309,201,4.9,5bbf259ff136
330 10.419,201,3.7,5bbf259ff136
331 10.529,201,4.7,5bbf259ff136
332 10.64,201,5.3,5bbf259ff136
333 10.751,201,4.1,5bbf259ff136
334 10.862,201,4.6,5bbf259ff136
335 10.968,201,6.9,5bbf259ff136
336 11.084,201,5.0,5bbf259ff136
337 11.191,201,4.0,5bbf259ff136
338 11.296,201,7.0,5bbf259ff136
339 11.411,201,6.1,5bbf259ff136
340 11.527,201,6.0,5bbf259ff136
341 11.641,201,4.6,5bbf259ff136
342 11.753,201,4.7,5bbf259ff136
343 11.868,201,5.1,5bbf259ff136
344 11.976,201,6.4,5bbf259ff136
345 12.088,201,4.8,5bbf259ff136
346 12.199,201,3.8,5bbf259ff136
347 12.313,201,4.7,5bbf259ff136
348 12.424,201,4.9,5bbf259ff136
349 12.535,201,4.9,5bbf259ff136
350 12.65,201,5.2,5bbf259ff136
351 12.762,201,4.6,5bbf259ff136
352 12.869,201,4.6,5bbf259ff136
353 12.977,201,3.8,5bbf259ff136
354 13.089,201,3.6,5bbf259ff136
355 13.196,201,5.8,5bbf259ff136
356 13.304,201,4.5,5bbf259ff136
357 13.413,201,4.0,5bbf259ff136
358 13.526,201,5.2,5bbf259ff136
359 13.633,201,5.3,5bbf259ff136
360 13.747,201,3.9,5bbf259ff136
361 13.859,201,3.8,5bbf259ff136
362 13.969,201,3.9,5bbf259ff136
363 14.076,201,3.7,5bbf259ff136
364 14.184,201,3.5,5bbf259ff136
365 14.296,201,5.1,5bbf259ff136
366 14.409,201,4.4,5bbf259ff136
367 14.519,201,7.0,5bbf259ff136
368 14.632,201,6.5,5bbf259ff136
369 14.746,201,6.7,5bbf259ff136
370 14.855,201,5.9,5bbf259ff136
371 14.968,201,11.9,7cfd91ddf780
372 15.088,201,5.6,5bbf259ff136
373 15.203,201,4.0,5bbf259ff136
374 15.31,201,4.9,5bbf259ff136
375 15.423,201,6.8,5bbf259ff136
376 15.538,201,4.5,7cfd91ddf780
377 15.646,201,5.7,7cfd91ddf780
378 15.758,201,7.3,7cfd91ddf780
379 15.868,201,8.8,7cfd91ddf780
380 15.987,201,3.4,5bbf259ff136
381 16.1,201,4.6,5bbf259ff136
382 16.207,201,4.9,5bbf259ff136
383 16.319,201,4.9,5bbf259ff136
384 16.432,201,4.5,5bbf259ff136
385 16.538,201,4.7,5bbf259ff136
386 16.651,201,6.0,5bbf259ff136
387 16.763,201,4.9,5bbf259ff136
388 16.874,201,4.4,5bbf259ff136
389 16.979,201,4.1,5bbf259ff136
390 17.09,201,5.1,5bbf259ff136
391 17.197,201,5.2,5bbf259ff136
392 17.312,201,5.9,5bbf259ff136
393 17.426,201,5.1,5bbf259ff136
394 17.541,201,5.4,7cfd91ddf780
395 17.652,201,5.2,7cfd91ddf780
396 17.761,201,5.1,7cfd91ddf780
397 17.877,201,6.2,5bbf259ff136
398 17.993,201,6.3,5bbf259ff136
399 18.109,201,6.2,7cfd91ddf780
400 18.218,201,5.0,7cfd91ddf780
401 18.334,201,5.3,7cfd91ddf780
402 18.442,201,5.2,7cfd91ddf780
403 18.55,201,5.5,7cfd91ddf780
404 18.663,201,5.2,7cfd91ddf780
405 18.775,201,5.8,5bbf259ff136
406 18.891,201,4.3,5bbf259ff136
407 19.006,201,11.6,7cfd91ddf780
408 19.127,201,4.9,5bbf259ff136
409 19.241,201,6.1,5bbf259ff136
410 19.35,201,5.0,5bbf259ff136
411 19.463,201,4.9,5bbf259ff136
412 19.571,201,5.1,5bbf259ff136
413 19.682,201,4.7,5bbf259ff136
414 19.795,201,5.0,5bbf259ff136
415 19.91,201,4.4,7cfd91ddf780
416 20.02,201,6.2,7cfd91ddf780
417 20.129,201,5.4,7cfd91ddf780
418 20.244,201,5.8,7cfd91ddf780
419 20.354,201,5.2,7cfd91ddf780
420 20.468,201,5.6,5bbf259ff136
421 20.579,201,7.0,5bbf259ff136
422 20.686,201,4.7,7cfd91ddf780
423 20.793,201,4.9,7cfd91ddf780
424 20.901,201,5.0,7cfd91ddf780
425 21.009,201,3.9,7cfd91ddf780
426 21.121,201,4.9,7cfd91ddf780
427 21.229,201,5.9,7cfd91ddf780
428 21.337,201,4.9,7cfd91ddf780
429 21.446,201,5.4,7cfd91ddf780
430 21.562,201,6.4,7cfd91ddf780
431 21.671,201,6.0,7cfd91ddf780
432 21.787,201,5.8,5bbf259ff136
433 21.893,201,4.9,7cfd91ddf780
434 22.007,201,5.0,7cfd91ddf780
435 22.116,201,5.8,5bbf259ff136
436 22.222,201,5.2,7cfd91ddf780
437 22.329,201,4.9,7cfd91ddf780
438 22.438,201,5.8,7cfd91ddf780
439 22.553,201,6.3,7cfd91ddf780
440 22.669,201,5.5,5bbf259ff136
441 22.785,201,6.3,7cfd91ddf780
442 22.896,201,5.5,5bbf259ff136
443 23.006,201,6.2,7cfd91ddf780
444 23.115,201,6.6,5bbf259ff136
445 23.232,201,5.3,7cfd91ddf780
446 23.347,201,6.7,5bbf259ff136
447 23.461,201,6.8,5bbf259ff136
448 23.578,201,4.1,7cfd91ddf780
449 23.687,201,6.1,7cfd91ddf780
450 23.802,201,6.8,7cfd91ddf780
451 23.917,201,6.0,5bbf259ff136
452 24.033,201,3.2,5bbf259ff136
453 24.145,201,3.9,5bbf259ff136
454 24.256,201,4.2,7cfd91ddf780
455 24.363,201,4.9,5bbf259ff136
456 24.468,201,5.0,5bbf259ff136
457 24.577,201,4.5,5bbf259ff136
458 24.687,201,5.2,7cfd91ddf780
459 24.797,201,5.3,5bbf259ff136
460 24.909,201,4.7,5bbf259ff136
461 25.021,201,5.0,5bbf259ff136
462 25.126,201,7.2,5bbf259ff136
463 25.239,201,6.0,5bbf259ff136
464 25.35,201,5.8,5bbf259ff136
465 25.463,201,6.2,5bbf259ff136
466 25.573,201,5.5,5bbf259ff136
467 25.687,201,5.2,7cfd91ddf780
468 25.797,201,5.8,7cfd91ddf780
469 25.912,201,5.2,7cfd91ddf780
470 26.021,201,4.8,7cfd91ddf780
471 26.131,201,3.5,7cfd91ddf780
472 26.235,201,3.7,5bbf259ff136
473 26.349,201,5.5,7cfd91ddf780
474 26.465,201,4.8,7cfd91ddf780
475 26.57,201,4.5,7cfd91ddf780
476 26.679,201,4.2,7cfd91ddf780
477 26.793,201,4.8,7cfd91ddf780
478 26.903,201,4.9,7cfd91ddf780
479 27.012,201,5.4,7cfd91ddf780
480 27.121,201,5.7,7cfd91ddf780
481 27.227,201,5.0,7cfd91ddf780
482 27.342,201,5.4,7cfd91ddf780
483 27.452,201,5.1,7cfd91ddf780
484 27.565,201,4.8,7cfd91ddf780
485 27.675,201,5.0,7cfd91ddf780
486 27.79,201,5.4,5bbf259ff136
487 27.904,201,5.8,5bbf259ff136
488 28.014,201,6.5,5bbf259ff136
489 28.131,201,5.5,7cfd91ddf780
490 28.246,201,5.7,5bbf259ff136
491 28.354,201,5.8,7cfd91ddf780
492 28.467,201,6.2,5bbf259ff136
493 28.581,201,5.6,5bbf259ff136
494 28.69,201,4.3,5bbf259ff136
495 28.795,201,5.1,7cfd91ddf780
496 28.907,201,5.1,5bbf259ff136
497 29.015,201,6.1,7cfd91ddf780
498 29.123,201,6.4,7cfd91ddf780
499 29.237,201,3.9,5bbf259ff136
500 29.349,201,4.2,5bbf259ff136
501 29.455,201,7.7,5bbf259ff136
502 29.569,201,7.2,5bbf259ff136
503 29.679,201,6.3,5bbf259ff136
504 29.794,201,7.5,5bbf259ff136
505 29.91,201,5.8,7cfd91ddf780
506 30.022,201,6.9,7cfd91ddf780
507 30.136,201,6.7,5bbf259ff136
508 30.252,201,6.3,5bbf259ff136
509 30.367,201,6.1,7cfd91ddf780
510 30.479,201,6.8,7cfd91ddf780
511 30.595,201,4.9,7cfd91ddf780
512 30.703,201,5.1,7cfd91ddf780
513 30.813,201,4.7,7cfd91ddf780
514 30.924,201,5.3,7cfd91ddf780
515 31.032,201,5.1,7cfd91ddf780
516 31.143,201,4.5,7cfd91ddf780
517 31.257,201,4.8,5bbf259ff136
518 31.371,201,3.3,5bbf259ff136
519 31.477,201,4.6,5bbf259ff136
520 31.586,201,3.6,5bbf259ff136
521 31.699,201,4.4,5bbf259ff136
522 31.813,201,4.8,5bbf259ff136
523 31.927,201,4.6,7cfd91ddf780
524 32.042,201,5.3,7cfd91ddf780
525 32.158,201,5.0,5bbf259ff136
526 32.27,201,4.2,5bbf259ff136
527 32.378,201,5.6,5bbf259ff136
528 32.487,201,5.7,5bbf259ff136
529 32.603,201,4.3,5bbf259ff136
530 32.712,201,6.5,5bbf259ff136
531 32.828,201,6.7,7cfd91ddf780
532 32.945,201,5.3,7cfd91ddf780
533 33.054,201,5.8,7cfd91ddf780
534 33.168,201,6.3,5bbf259ff136
535 33.279,201,8.0,5bbf259ff136
536 33.393,201,5.6,5bbf259ff136
537 33.503,201,4.7,5bbf259ff136
538 33.616,201,6.1,7cfd91ddf780
539 33.731,201,4.7,7cfd91ddf780
540 33.845,201,7.1,7cfd91ddf780
541 33.954,201,5.1,7cfd91ddf780
542 34.069,201,5.8,5bbf259ff136
543 34.179,201,5.2,5bbf259ff136
544 34.288,201,4.7,5bbf259ff136
545 34.399,201,3.1,5bbf259ff136
546 34.512,201,3.5,5bbf259ff136
547 34.625,201,4.0,5bbf259ff136
548 34.733,201,4.6,5bbf259ff136
549 34.848,201,5.8,7cfd91ddf780
550 34.957,201,4.2,7cfd91ddf780
551 35.062,201,6.9,5bbf259ff136
552 35.169,201,5.2,5bbf259ff136
553 35.282,201,6.0,5bbf259ff136
554 35.395,201,5.3,5bbf259ff136
555 35.503,201,5.2,5bbf259ff136
556 35.614,201,5.8,5bbf259ff136
557 35.72,201,4.9,5bbf259ff136
558 35.83,201,6.2,5bbf259ff136
559 35.938,201,5.5,5bbf259ff136
560 36.05,201,6.1,5bbf259ff136
561 36.159,201,5.0,5bbf259ff136
562 36.273,201,5.2,5bbf259ff136
563 36.387,201,6.5,7cfd91ddf780
564 36.495,201,8.3,5bbf259ff136
565 36.611,201,3.5,7cfd91ddf780
566 36.716,201,4.1,7cfd91ddf780
567 36.823,201,7.0,5bbf259ff136
568 36.937,201,4.8,7cfd91ddf780
569 37.046,201,6.6,7cfd91ddf780
570 37.16,201,5.2,7cfd91ddf780
571 37.271,201,4.7,7cfd91ddf780
572 37.378,201,5.3,7cfd91ddf780
573 37.487,201,6.1,7cfd91ddf780
574 37.596,201,4.5,7cfd91ddf780
575 37.71,201,4.0,7cfd91ddf780
576 37.821,201,5.1,7cfd91ddf780
577 37.927,201,4.4,7cfd91ddf780
578 38.037,201,6.3,7cfd91ddf780
579 38.145,201,6.1,5bbf259ff136
580 38.259,201,5.1,7cfd91ddf780
581 38.373,201,8.5,7cfd91ddf780
582 38.485,201,5.3,7cfd91ddf780
583 38.592,201,4.8,7cfd91ddf780
584 38.706,201,4.2,7cfd91ddf780
585 38.82,201,4.7,5bbf259ff136
586 38.933,201,5.9,5bbf259ff136
587 39.041,201,6.6,5bbf259ff136
588 39.155,201,6.8,7cfd91ddf780
589 39.269,201,5.0,7cfd91ddf780
590 39.379,201,5.5,7cfd91ddf780
591 39.49,201,11.5,7cfd91ddf780
592 39.605,201,6.4,5bbf259ff136
593 39.72,201,5.7,5bbf259ff136
594 39.828,201,6.5,5bbf259ff136
595 39.939,201,6.0,5bbf259ff136
596 40.054,201,5.0,5bbf259ff136
597 40.161,201,4.9,5bbf259ff136
598 40.27,201,5.6,5bbf259ff136
599 40.377,201,6.1,7cfd91ddf780
600 40.493,201,4.2,5bbf259ff136
601 40.604,201,6.2,5bbf259ff136
602 40.71,201,4.2,5bbf259ff136
603 40.817,201,4.2,5bbf259ff136
604 40.927,201,5.0,5bbf259ff136
605 41.039,201,5.1,5bbf259ff136
606 41.154,201,5.1,5bbf259ff136
607 41.264,201,4.9,5bbf259ff136
608 41.372,201,5.1,5bbf259ff136
609 41.487,201,6.8,7cfd91ddf780
610 41.597,201,3.7,7cfd91ddf780
611 41.711,201,3.9,7cfd91ddf780
612 41.824,201,4.3,7cfd91ddf780
613 41.939,201,5.0,5bbf259ff136
614 42.049,201,6.2,5bbf259ff136
615 42.16,201,5.7,5bbf259ff136
616 42.27,201,3.6,5bbf259ff136
617 42.378,201,3.7,5bbf259ff136
618 42.492,201,4.5,5bbf259ff136
619 42.599,201,4.3,5bbf259ff136
620 42.711,201,4.0,5bbf259ff136
621 42.821,201,6.6,5bbf259ff136
622 42.937,201,4.8,7cfd91ddf780
623 43.048,201,6.1,7cfd91ddf780
624 43.16,201,3.3,7cfd91ddf780
625 43.265,201,3.2,5bbf259ff136
626 43.37,201,3.5,5bbf259ff136
627 43.482,201,3.4,5bbf259ff136
628 43.59,201,3.1,5bbf259ff136
629 43.698,201,7.8,5bbf259ff136
630 43.816,201,7.4,7cfd91ddf780
631 43.928,201,5.0,7cfd91ddf780
632 44.036,201,5.0,7cfd91ddf780
633 44.149,201,5.4,7cfd91ddf780
634 44.264,201,6.0,7cfd91ddf780
635 44.371,201,5.1,7cfd91ddf780
636 44.481,201,4.8,7cfd91ddf780
637 44.595,201,3.4,7cfd91ddf780
638 44.7,201,3.2,7cfd91ddf780
639 44.812,201,2.8,7cfd91ddf780
640 44.925,201,4.3,7cfd91ddf780
641 45.034,201,5.7,5bbf259ff136
642 45.145,201,8.0,7cfd91ddf780
643 45.26,201,8.5,5bbf259ff136
644 45.369,201,8.2,7cfd91ddf780
645 45.487,201,11.7,5bbf259ff136
646 45.607,201,11.0,7cfd91ddf780
647 45.727,201,4.3,5bbf259ff136
@@ -0,0 +1,71 @@
{"date": "2026-11-05T19:18:13.470607+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"label": "7cfd91ddf780",
"action": [
"sh",
"-c",
"scripts/stop-one.sh && docker compose ps -a --format '{{.ID}} {{.Service}} {{.Status}}' api && { scripts/stand-usage.sh & sleep 10; wait; } && scripts/restore.sh"
],
"action_exit": 0,
"action_seconds": 15.204,
"action_finished_before_load_end": true,
"lb_up_before": 2,
"lb_up_min": 1,
"lb_samples_missing": 0,
"detection_seconds": 0.884,
"rejoin_seconds": 14.885,
"probe": {
"attempts": 645,
"failed_attempts": 0,
"first_failure_s": null,
"first_success_s": 0.023,
"recovery_s": 0.0,
"instances_before": {
"5bbf259ff136": 118,
"7cfd91ddf780": 115
},
"instances_during_outage": {
"5bbf259ff136": 126
},
"instances_after": {
"5bbf259ff136": 142,
"7cfd91ddf780": 132
}
},
"history": {
"confirmed": 645,
"stored": 645,
"exact_match": true,
"unique": true
},
"lb_counters": {
"wretr": 0,
"wredis": 0,
"econ": 0,
"eresp": 0,
"hrsp_5xx": 0
},
"k6": {
"requests": 6001,
"rps": 100.02,
"ok_rps": 100.02,
"failed_ratio": 0,
"dropped_iterations": 0,
"p50_ms": 2.97,
"p95_ms": 3.86,
"p99_ms": 4.47,
"exit": 0,
"rate": 100
},
"checks": {
"action_ok": true,
"load_errors_ok": true,
"load_delivered": true,
"lb_observed": true,
"write_recovery_ok": true,
"history_preserved": true,
"detected": true,
"target_excluded": true,
"rejoined": true
},
"pass": true
}
+142
View File
@@ -0,0 +1,142 @@
[{"date": "2026-11-05T19:18:13.470607+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"label": "7cfd91ddf780",
"action": [
"sh",
"-c",
"scripts/stop-one.sh && docker compose ps -a --format '{{.ID}} {{.Service}} {{.Status}}' api && { scripts/stand-usage.sh & sleep 10; wait; } && scripts/restore.sh"
],
"action_exit": 0,
"action_seconds": 15.204,
"action_finished_before_load_end": true,
"lb_up_before": 2,
"lb_up_min": 1,
"lb_samples_missing": 0,
"detection_seconds": 0.884,
"rejoin_seconds": 14.885,
"probe": {
"attempts": 645,
"failed_attempts": 0,
"first_failure_s": null,
"first_success_s": 0.023,
"recovery_s": 0.0,
"instances_before": {
"5bbf259ff136": 118,
"7cfd91ddf780": 115
},
"instances_during_outage": {
"5bbf259ff136": 126
},
"instances_after": {
"5bbf259ff136": 142,
"7cfd91ddf780": 132
}
},
"history": {
"confirmed": 645,
"stored": 645,
"exact_match": true,
"unique": true
},
"lb_counters": {
"wretr": 0,
"wredis": 0,
"econ": 0,
"eresp": 0,
"hrsp_5xx": 0
},
"k6": {
"requests": 6001,
"rps": 100.02,
"ok_rps": 100.02,
"failed_ratio": 0,
"dropped_iterations": 0,
"p50_ms": 2.97,
"p95_ms": 3.86,
"p99_ms": 4.47,
"exit": 0,
"rate": 100
},
"checks": {
"action_ok": true,
"load_errors_ok": true,
"load_delivered": true,
"lb_observed": true,
"write_recovery_ok": true,
"history_preserved": true,
"detected": true,
"target_excluded": true,
"rejoined": true
},
"pass": true
},
{"date": "2026-11-05T19:18:13.470607+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"label": "5bbf259ff136",
"action": [
"sh",
"-c",
"scripts/stop-one.sh && docker compose ps -a --format '{{.ID}} {{.Service}} {{.Status}}' api && { scripts/stand-usage.sh & sleep 10; wait; } && scripts/restore.sh"
],
"action_exit": 0,
"action_seconds": 15.2,
"action_finished_before_load_end": true,
"lb_up_before": 2,
"lb_up_min": 1,
"lb_samples_missing": 0,
"detection_seconds": 1.498,
"rejoin_seconds": 14.99,
"probe": {
"attempts": 642,
"failed_attempts": 0,
"first_failure_s": null,
"first_success_s": 0.111,
"recovery_s": 0.0,
"instances_before": {
"7cfd91ddf780": 114,
"5bbf259ff136": 119
},
"instances_during_outage": {
"7cfd91ddf780": 121
},
"instances_after": {
"7cfd91ddf780": 149,
"5bbf259ff136": 124
}
},
"history": {
"confirmed": 642,
"stored": 642,
"exact_match": true,
"unique": true
},
"lb_counters": {
"wretr": 0,
"wredis": 0,
"econ": 0,
"eresp": 0,
"hrsp_5xx": 0
},
"k6": {
"requests": 6001,
"rps": 100.02,
"ok_rps": 100.02,
"failed_ratio": 0,
"dropped_iterations": 0,
"p50_ms": 2.98,
"p95_ms": 3.88,
"p99_ms": 4.53,
"exit": 0,
"rate": 100
},
"checks": {
"action_ok": true,
"load_errors_ok": true,
"load_delivered": true,
"lb_observed": true,
"write_recovery_ok": true,
"history_preserved": true,
"detected": true,
"target_excluded": true,
"rejoined": true
},
"pass": true
}]
+39
View File
@@ -0,0 +1,39 @@
date: 2026-10-30T02:45:26Z commit: e049c26
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
ff81f93e8b0d running started=2026-10-30T02:45:24.812924046Z finished=2026-10-30T02:45:12.063064055Z
fe75c6c37e5a running started=2026-10-30T02:44:57.104698047Z finished=0001-01-01T00:00:00Z
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 136, "failed_attempts": 0, "first_recovery_seconds": 2.682}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
== after: api replicas
ff81f93e8b0d running started=2026-10-30T02:45:24.812924046Z finished=2026-10-30T02:45:12.063064055Z
fe75c6c37e5a exited started=2026-10-30T02:44:57.104698047Z finished=2026-10-30T02:45:29.956667174Z
== stopped replica: fe75c6c37e5a; shutdown: signal, drain window with readiness 503, close, exit
{"event":"Handling signal: term","level":"info","ts":"2026-10-30T02:45:27.514055Z"}
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-10-30T02:45:27.518751Z"}
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-10-30T02:45:27.528773Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"efd64978c14445e3a460198e8ef66a32","duration_ms":0.358,"event":"request.handled","level":"info","ts":"2026-10-30T02:45:27.962664Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"53b0876587c14b2cbae1936781f79fc0","duration_ms":0.401,"event":"request.handled","level":"info","ts":"2026-10-30T02:45:28.465375Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"947ec9729b774819b5de906d12ad0f91","duration_ms":0.306,"event":"request.handled","level":"info","ts":"2026-10-30T02:45:29.005486Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-30T02:45:29.520790Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-30T02:45:29.529825Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-30T02:45:29.623527Z"}
{"event":"Finished server process [14]","level":"info","ts":"2026-10-30T02:45:29.623728Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-30T02:45:29.632649Z"}
{"event":"Finished server process [13]","level":"info","ts":"2026-10-30T02:45:29.632781Z"}
{"event":"Worker (pid:13) was sent SIGTERM!","level":"info","ts":"2026-10-30T02:45:29.635792Z"}
{"event":"Worker (pid:14) was sent SIGTERM!","level":"info","ts":"2026-10-30T02:45:29.635917Z"}
{"event":"Shutting down: Master","level":"info","ts":"2026-10-30T02:45:29.737995Z"}
$ scripts/restore.sh
Container mtusi2026lab3-api-1 Running
Container mtusi2026lab3-api-2 Starting
Container mtusi2026lab3-api-2 Started
Container mtusi2026lab3-api-1 Waiting
Container mtusi2026lab3-api-2 Waiting
Container mtusi2026lab3-api-1 Healthy
Container mtusi2026lab3-api-2 Healthy
== after restore
ff81f93e8b0d running started=2026-10-30T02:45:24.812924046Z finished=2026-10-30T02:45:12.063064055Z
fe75c6c37e5a running started=2026-10-30T02:45:42.870380597Z finished=2026-10-30T02:45:29.956667174Z
+38
View File
@@ -0,0 +1,38 @@
date: 2026-10-30T02:45:08Z commit: e049c26
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
ff81f93e8b0d running started=2026-10-30T02:44:57.018195381Z finished=0001-01-01T00:00:00Z
fe75c6c37e5a running started=2026-10-30T02:44:57.104698047Z finished=0001-01-01T00:00:00Z
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 132, "failed_attempts": 0, "first_recovery_seconds": 2.858}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
== after: api replicas
ff81f93e8b0d exited started=2026-10-30T02:44:57.018195381Z finished=2026-10-30T02:45:12.063064055Z
fe75c6c37e5a running started=2026-10-30T02:44:57.104698047Z finished=0001-01-01T00:00:00Z
== stopped replica: ff81f93e8b0d; shutdown: signal, drain window with readiness 503, close, exit
{"event":"Handling signal: term","level":"info","ts":"2026-10-30T02:45:09.656770Z"}
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-10-30T02:45:09.714534Z"}
{"limit":2.0,"event":"service.draining","level":"info","ts":"2026-10-30T02:45:09.722268Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"468d7db9c6d24e9797a43d901e9bdbb1","duration_ms":0.312,"event":"request.handled","level":"info","ts":"2026-10-30T02:45:10.589248Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"771ff57a02304724b1de9c40033c5157","duration_ms":0.304,"event":"request.handled","level":"info","ts":"2026-10-30T02:45:11.091968Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-30T02:45:11.715907Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-30T02:45:11.728294Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-30T02:45:11.826861Z"}
{"event":"Finished server process [14]","level":"info","ts":"2026-10-30T02:45:11.827508Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-30T02:45:11.835753Z"}
{"event":"Finished server process [13]","level":"info","ts":"2026-10-30T02:45:11.835868Z"}
{"event":"Worker (pid:13) was sent SIGTERM!","level":"info","ts":"2026-10-30T02:45:11.887319Z"}
{"event":"Worker (pid:14) was sent SIGTERM!","level":"info","ts":"2026-10-30T02:45:11.887404Z"}
{"event":"Shutting down: Master","level":"info","ts":"2026-10-30T02:45:11.990788Z"}
$ scripts/restore.sh
Container mtusi2026lab3-api-2 Running
Container mtusi2026lab3-api-1 Starting
Container mtusi2026lab3-api-1 Started
Container mtusi2026lab3-api-1 Waiting
Container mtusi2026lab3-api-2 Waiting
Container mtusi2026lab3-api-1 Healthy
Container mtusi2026lab3-api-2 Healthy
== after restore
ff81f93e8b0d running started=2026-10-30T02:45:24.812924046Z finished=2026-10-30T02:45:12.063064055Z
fe75c6c37e5a running started=2026-10-30T02:44:57.104698047Z finished=0001-01-01T00:00:00Z
+55
View File
@@ -0,0 +1,55 @@
date: 2026-11-05T18:55:40.945444+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make test-faults
BASE_URL="http://127.0.0.1:18083" .venv/bin/pytest -m stack -v -s student-tests/stack
============================= test session starts ==============================
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0 -- <repo>/.venv/bin/python
cachedir: .pytest_cache
rootdir: <repo>
configfile: pyproject.toml
plugins: asyncio-1.4.0, anyio-4.15.1
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collecting ... collected 12 items
student-tests/stack/test_faults.py::test_registration_race_yields_exactly_one_user гонка 50 регистраций: 201×1, 409×49
PASSED
student-tests/stack/test_faults.py::test_chat_creation_rolls_back_on_unknown_member чат с несуществующим участником: 400 invalid_request
PASSED
student-tests/stack/test_faults.py::test_wrong_password_and_unknown_user_get_same_basic_challenge неверный пароль: 401 за 0.013 с
неизвестный пользователь: 401 за 0.012 с
PASSED
student-tests/stack/test_faults.py::test_logout_then_token_is_dead logout: 204, затем 401, повтор 401
PASSED
student-tests/stack/test_faults.py::test_valkey_serves_repeated_checks 5 проверок токена: keyspace_hits 3 → 8
PASSED
student-tests/stack/test_faults.py::test_valkey_stopped_is_bypassed_but_logout_waits valkey остановлен, действующий токен: 200 за 0.014 с
valkey остановлен, неизвестный токен: 401 за 0.004 с
valkey остановлен: ready 200, вход 201, выход 503
valkey снова запущен: повторный выход 204
PASSED
student-tests/stack/test_faults.py::test_valkey_restart_keeps_cache_and_revocations рестарт valkey: ключей 6 → 6
рестарт valkey: живой 200, отозванный 401
PASSED
student-tests/stack/test_faults.py::test_valkey_flushall_loses_nothing FLUSHALL: живой 200, отозванный 401
PASSED
student-tests/stack/test_faults.py::test_postgres_stopped_gives_bounded_503_and_recovers postgres остановлен, ready: 503 за 0.004 с
postgres остановлен, me: 503 за 0.003 с
postgres остановлен, stranger: 503 за 0.003 с
postgres остановлен, login: 503 за 0.003 с
postgres остановлен, register: 503 за 0.014 с
live внутри реплики 200; LB исключил все реплики ещё через 0.86 с
live через LB без реплик: 503 за 0.000 с
postgres запущен: готовность через 2.0 с, прежний токен 200
postgres запущен: 40 регистраций 201 через 2 реплики без рестарта API
PASSED
student-tests/stack/test_faults.py::test_api_restart_keeps_session_without_extending_it рестарт api: готовность через 1.5 с, токен 200
expires_at при входе 2026-11-05T19:55:55.410073Z, в БД после рестарта 2026-11-05T19:55:55.410073Z
PASSED
student-tests/stack/test_faults.py::test_full_restart_keeps_session_until_logout restart.sh: готовность через 0.0 с, прежний токен 200, выход 204, затем 401
PASSED
student-tests/stack/test_faults.py::test_session_expires_after_restart_at_original_time срок сессии сокращён до 20 с, рестарт api: готовность через 2.8 с, до срока 200, после срока 401
PASSED
============================= 12 passed in 47.62s ==============================
exit_code: 0 elapsed_seconds: 48.183
+67
View File
@@ -0,0 +1,67 @@
date: 2026-11-05T18:46:25.070058+00:00 commit: 7fc911c332aefe33285ea9e7811c37abd9bb20a6
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make test-faults
BASE_URL="http://127.0.0.1:18083" .venv/bin/pytest -m stack -v -s student-tests/stack
============================= test session starts ==============================
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0 -- <repo>/.venv/bin/python
cachedir: .pytest_cache
rootdir: <repo>
configfile: pyproject.toml
plugins: asyncio-1.4.0, anyio-4.15.1
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collecting ... collected 12 items
student-tests/stack/test_faults.py::test_registration_race_yields_exactly_one_user гонка 50 регистраций: 201×1, 409×49
PASSED
student-tests/stack/test_faults.py::test_chat_creation_rolls_back_on_unknown_member чат с несуществующим участником: 400 invalid_request
PASSED
student-tests/stack/test_faults.py::test_wrong_password_and_unknown_user_get_same_basic_challenge неверный пароль: 401 за 0.013 с
неизвестный пользователь: 401 за 0.012 с
PASSED
student-tests/stack/test_faults.py::test_logout_then_token_is_dead logout: 204, затем 401, повтор 401
PASSED
student-tests/stack/test_faults.py::test_valkey_serves_repeated_checks 5 проверок токена: keyspace_hits 4 → 9
PASSED
student-tests/stack/test_faults.py::test_valkey_stopped_is_bypassed_but_logout_waits valkey остановлен, действующий токен: 200 за 0.005 с
valkey остановлен, неизвестный токен: 401 за 0.003 с
valkey остановлен: ready 200, вход 201, выход 503
valkey снова запущен: повторный выход 204
PASSED
student-tests/stack/test_faults.py::test_valkey_restart_keeps_cache_and_revocations рестарт valkey: ключей 19 → 19
рестарт valkey: живой 200, отозванный 401
PASSED
student-tests/stack/test_faults.py::test_valkey_flushall_loses_nothing FLUSHALL: живой 200, отозванный 401
PASSED
student-tests/stack/test_faults.py::test_postgres_stopped_gives_bounded_503_and_recovers postgres остановлен, ready: 503 за 0.003 с
postgres остановлен, me: 503 за 0.002 с
postgres остановлен, stranger: 503 за 0.003 с
postgres остановлен, login: 503 за 0.003 с
postgres остановлен, register: 503 за 0.014 с
live внутри реплики 200; LB исключил все реплики ещё через 1.14 с
live через LB без реплик: 503 за 0.000 с
postgres запущен: готовность через 1.5 с, прежний токен 200
PASSED
student-tests/stack/test_faults.py::test_api_restart_keeps_session_without_extending_it FAILED
student-tests/stack/test_faults.py::test_full_restart_keeps_session_until_logout restart.sh: готовность через 0.0 с, прежний токен 200, выход 204, затем 401
PASSED
student-tests/stack/test_faults.py::test_session_expires_after_restart_at_original_time срок сессии сокращён до 20 с, рестарт api: готовность через 1.5 с, до срока 200, после срока 401
PASSED
=================================== FAILURES ===================================
_____________ test_api_restart_keeps_session_without_extending_it ______________
http = <httpx.AsyncClient object at 0x1057ed350>
async def test_api_restart_keeps_session_without_extending_it(http: AsyncClient) -> None:
body = new_user("restart")
> assert (await http.post("/api/v1/users", json=body)).status_code == 201
E assert 503 == 201
E + where 503 = <Response [503 Service Unavailable]>.status_code
student-tests/stack/test_faults.py:219: AssertionError
=========================== short test summary info ============================
FAILED student-tests/stack/test_faults.py::test_api_restart_keeps_session_without_extending_it
======================== 1 failed, 11 passed in 43.22s =========================
make: *** [test-faults] Error 1
exit_code: 2 elapsed_seconds: 43.788
+35
View File
@@ -0,0 +1,35 @@
date: 2026-11-05T19:06:46.410264+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ sh -c 'set -e; make check; make validate; make lint; openspec validate --all --strict; git diff --check; git diff --exit-code upstream/main -- contracts tests README.md COURSE.md lab.json MAINTAINERS.md; git diff --exit-code 0a1f48bd73e5780c732356880c23fdb476bcff98 -- src student-tests alembic pyproject.toml uv.lock Dockerfile compose.yaml Makefile infra scripts; git diff --exit-code 7fc911c332aefe33285ea9e7811c37abd9bb20a6 -- .pipeline; docker ps -a --filter label=com.docker.compose.project=mtusi2026lab3-grade3-final-20261105; docker ps -a --filter label=com.docker.compose.project=mtusi2026lab3-grade3-20261105; docker ps -a --filter name=mtusi-lab3-test'
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
.venv/bin/python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
.venv/bin/ruff check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
All checks passed!
.venv/bin/ruff format --check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
107 files already formatted
.venv/bin/ty check src student-tests alembic
All checks passed!
- Validating...
✓ change/2026-11-05-adopt-sqlalchemy-alembic
✓ spec/lab1-event-publication
✓ spec/lab1-messenger-chats
✓ spec/lab1-messenger-history
✓ spec/lab1-messenger-identity
✓ spec/lab1-service-operability
✓ spec/lab2-auth-sessions
✓ spec/lab2-dependency-failures
✓ spec/lab2-history-index
✓ spec/lab2-persistent-storage
✓ spec/lab2-session-cache
✓ spec/lab3-failover-operations
✓ spec/lab3-idempotent-messages
✓ spec/lab3-load-balancing
✓ spec/lab3-scaling-cost
Totals: 15 passed, 0 failed (15 items)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
exit_code: 0 elapsed_seconds: 4.870
+34
View File
@@ -0,0 +1,34 @@
date: 2026-11-05T18:53:15.466343+00:00 commit: 18de59574016564ce4eb69da9f4363441ba33f7d
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make down
docker compose --profile bench down
Container mtusi2026lab3-grade3-20261105-lb-1 Stopping
Container mtusi2026lab3-grade3-20261105-api-1 Stopping
Container mtusi2026lab3-grade3-20261105-api-2 Stopping
Container mtusi2026lab3-grade3-20261105-lb-1 Stopped
Container mtusi2026lab3-grade3-20261105-lb-1 Removing
Container mtusi2026lab3-grade3-20261105-lb-1 Removed
Container mtusi2026lab3-grade3-20261105-api-1 Stopped
Container mtusi2026lab3-grade3-20261105-api-1 Removing
Container mtusi2026lab3-grade3-20261105-api-1 Removed
Container mtusi2026lab3-grade3-20261105-api-2 Stopped
Container mtusi2026lab3-grade3-20261105-api-2 Removing
Container mtusi2026lab3-grade3-20261105-api-2 Removed
Container mtusi2026lab3-grade3-20261105-valkey-1 Stopping
Container mtusi2026lab3-grade3-20261105-migrate-1 Stopping
Container mtusi2026lab3-grade3-20261105-migrate-1 Stopped
Container mtusi2026lab3-grade3-20261105-migrate-1 Removing
Container mtusi2026lab3-grade3-20261105-migrate-1 Removed
Container mtusi2026lab3-grade3-20261105-postgres-1 Stopping
Container mtusi2026lab3-grade3-20261105-valkey-1 Stopped
Container mtusi2026lab3-grade3-20261105-valkey-1 Removing
Container mtusi2026lab3-grade3-20261105-postgres-1 Stopped
Container mtusi2026lab3-grade3-20261105-postgres-1 Removing
Container mtusi2026lab3-grade3-20261105-valkey-1 Removed
Container mtusi2026lab3-grade3-20261105-postgres-1 Removed
Network mtusi2026lab3-grade3-20261105_edge Removing
Network mtusi2026lab3-grade3-20261105_backend Removing
Network mtusi2026lab3-grade3-20261105_edge Removed
Network mtusi2026lab3-grade3-20261105_backend Removed
exit_code: 0 elapsed_seconds: 3.336
+27
View File
@@ -0,0 +1,27 @@
date: 2026-11-05T18:57:54.159450+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make lb-check
python3 scripts/probe.py check --rounds 20 --out evidence/lb-check.json
{
"instances_one_token": {
"1b4a73f61b07": 20,
"8ffe0c70f4ea": 20
},
"same_key": {
"rounds": 20,
"parallel": 8,
"statuses": {
"201": 160
},
"instances": {
"8ffe0c70f4ea": 80,
"1b4a73f61b07": 80
},
"identical_bodies_rounds": 20,
"single_copy_rounds": 20,
"conflict_rounds": 20
},
"pass": true
}
exit_code: 0 elapsed_seconds: 0.648
+25
View File
@@ -0,0 +1,25 @@
date: 2026-11-05T18:58:38.021999+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make persistence-evidence
sh scripts/persistence-evidence.sh "http://127.0.0.1:18083" > evidence/persistence.txt
cat evidence/persistence.txt
date: 2026-11-05T18:58:38Z commit: 0a1f48b
== before: service hostname StartedAt status
api 1b4a73f61b07 2026-11-05T18:58:36.142839135Z running
api 8ffe0c70f4ea 2026-11-05T18:58:18.239416584Z running
lb 936b69811632 2026-11-05T18:56:03.008030758Z running
migrate c73a6ab4f829 2026-11-05T18:56:03.5137618Z exited
postgres 097df27ee36a 2026-11-05T18:56:02.802565633Z running
valkey ac9a3cf7b7a0 2026-11-05T18:56:02.774072466Z running
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18083"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
== after: service hostname StartedAt status
api 1b4a73f61b07 2026-11-05T18:58:43.578633972Z running
api 8ffe0c70f4ea 2026-11-05T18:58:43.512173305Z running
lb 936b69811632 2026-11-05T18:58:41.899974554Z running
migrate c73a6ab4f829 2026-11-05T18:58:42.423420221Z exited
postgres 097df27ee36a 2026-11-05T18:58:41.642264971Z running
valkey ac9a3cf7b7a0 2026-11-05T18:58:41.694216387Z running
exit_code: 0 elapsed_seconds: 9.441
@@ -0,0 +1,9 @@
date: 2026-11-05T18:52:46.041538+00:00 commit: 18de59574016564ce4eb69da9f4363441ba33f7d
working_tree: pool_pre_ping and test changes before implementation commit
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make student-test 'PYTEST_ARGS=-q -k "closed_idle_connection or sigterm_leaves"'
.venv/bin/pytest -q -k "closed_idle_connection or sigterm_leaves"
.. [100%]
2 passed, 281 deselected in 4.28s
exit_code: 0 elapsed_seconds: 4.753
@@ -0,0 +1,29 @@
date: 2026-11-05T18:52:07.642995+00:00 commit: 18de59574016564ce4eb69da9f4363441ba33f7d
working_tree: added regression test in student-tests/api/test_pool.py; application code unchanged
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make student-test 'PYTEST_ARGS=-q -k closed_idle_connection'
.venv/bin/pytest -q -k closed_idle_connection
F [100%]
=================================== FAILURES ===================================
_________ test_closed_idle_connection_is_replaced_before_registration __________
async def test_closed_idle_connection_is_replaced_before_registration() -> None:
async with running_app(db_pool_max_size=1) as http:
database = await resolve(http, Database)
async with database.session() as session:
pid = await session.scalar(select(func.pg_backend_pid()))
async with sql_connection() as connection:
assert await connection.scalar(select(func.pg_terminate_backend(pid, 1000)))
body = new_user("reconnect")
response = await http.post("/api/v1/users", json=body)
> assert response.status_code == 201
E assert 503 == 201
E + where 503 = <Response [503 Service Unavailable]>.status_code
student-tests/api/test_pool.py:78: AssertionError
=========================== short test summary info ============================
FAILED student-tests/api/test_pool.py::test_closed_idle_connection_is_replaced_before_registration
1 failed, 282 deselected in 1.84s
make: *** [student-test] Error 1
exit_code: 2 elapsed_seconds: 2.461
+13
View File
@@ -0,0 +1,13 @@
date: 2026-11-05T18:58:18.083291+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make restore
scripts/restore.sh
Container mtusi2026lab3-grade3-final-20261105-api-2 Running
Container mtusi2026lab3-grade3-final-20261105-api-1 Starting
Container mtusi2026lab3-grade3-final-20261105-api-1 Started
Container mtusi2026lab3-grade3-final-20261105-api-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-api-2 Waiting
Container mtusi2026lab3-grade3-final-20261105-api-1 Healthy
Container mtusi2026lab3-grade3-final-20261105-api-2 Healthy
exit_code: 0 elapsed_seconds: 2.015
+13
View File
@@ -0,0 +1,13 @@
date: 2026-11-05T18:58:35.973739+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make restore
scripts/restore.sh
Container mtusi2026lab3-grade3-final-20261105-api-1 Running
Container mtusi2026lab3-grade3-final-20261105-api-2 Starting
Container mtusi2026lab3-grade3-final-20261105-api-2 Started
Container mtusi2026lab3-grade3-final-20261105-api-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-api-2 Waiting
Container mtusi2026lab3-grade3-final-20261105-api-1 Healthy
Container mtusi2026lab3-grade3-final-20261105-api-2 Healthy
exit_code: 0 elapsed_seconds: 2.004
+53
View File
@@ -0,0 +1,53 @@
date: 2026-11-05T18:57:54.853348+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make retry-check
python3 scripts/probe.py retry --out evidence/retry.json
{
"variants": [
{
"variant": "timeout",
"lost_attempt": {
"status": 0,
"client_timeout_s": 0.5,
"chat_lock_held_s": 1.5,
"replica": "1b4a73f61b07",
"replica_killed": false,
"replica_answered": 201
},
"retry": {
"after_s": 1.539,
"status": 201,
"attempts": 1,
"replica": "8ffe0c70f4ea"
},
"copies_in_history": 1,
"same_message": true,
"written_by": "lost attempt",
"pass": true
},
{
"variant": "kill",
"lost_attempt": {
"status": 0,
"client_timeout_s": 0.5,
"chat_lock_held_s": 1.5,
"replica": "8ffe0c70f4ea",
"replica_killed": true,
"replica_answered": null
},
"retry": {
"after_s": 1.551,
"status": 201,
"attempts": 1,
"replica": "1b4a73f61b07"
},
"copies_in_history": 1,
"same_message": true,
"written_by": "lost attempt",
"pass": true
}
],
"pass": true
}
exit_code: 0 elapsed_seconds: 7.326
+72
View File
@@ -0,0 +1,72 @@
date: 2026-11-05T18:58:59.414270+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make stack-evidence
sh scripts/evidence-stack.sh
date: 2026-11-05T18:58:59Z commit: 0a1f48b
$ docker compose --env-file .env config --quiet && echo valid
valid
$ docker compose ps --format '{{.Service}} {{.Name}} {{.Status}} {{.Ports}}'
api mtusi2026lab3-grade3-final-20261105-api-1 Up 16 seconds (healthy)
api mtusi2026lab3-grade3-final-20261105-api-2 Up 16 seconds (healthy)
lb mtusi2026lab3-grade3-final-20261105-lb-1 Up 17 seconds (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
postgres mtusi2026lab3-grade3-final-20261105-postgres-1 Up 18 seconds (healthy)
valkey mtusi2026lab3-grade3-final-20261105-valkey-1 Up 18 seconds (healthy)
$ docker compose config | grep -c container_name
0
$ docker port <каждая реплика api> # реплики не публикуют порт
8ffe0c70f4ea: []
1b4a73f61b07: []
$ docker inspect: hostname = X-Instance-Id, сети, лимиты CPU (nano) и памяти
api 1b4a73f61b07 /mtusi2026lab3-grade3-final-20261105-api-2 nets=mtusi2026lab3-grade3-final-20261105_backend, cpus=1000000000 mem=536870912 user=10001:10001 ro=true
api 8ffe0c70f4ea /mtusi2026lab3-grade3-final-20261105-api-1 nets=mtusi2026lab3-grade3-final-20261105_backend, cpus=1000000000 mem=536870912 user=10001:10001 ro=true
lb 936b69811632 /mtusi2026lab3-grade3-final-20261105-lb-1 nets=mtusi2026lab3-grade3-final-20261105_backend,mtusi2026lab3-grade3-final-20261105_edge, cpus=1000000000 mem=134217728 user=haproxy ro=true
postgres 097df27ee36a /mtusi2026lab3-grade3-final-20261105-postgres-1 nets=mtusi2026lab3-grade3-final-20261105_backend, cpus=2000000000 mem=1073741824 user=70:70 ro=false
valkey ac9a3cf7b7a0 /mtusi2026lab3-grade3-final-20261105-valkey-1 nets=mtusi2026lab3-grade3-final-20261105_backend, cpus=500000000 mem=134217728 user=999:1000 ro=false
$ curl LB stats: backend api, server status check
api1 UP L7OK 200
api2 UP L7OK 200
BACKEND UP
$ for i in 1..6: curl -D - http://127.0.0.1:18083/health/live | X-Instance-Id
x-instance-id: 1b4a73f61b07
x-instance-id: 8ffe0c70f4ea
x-instance-id: 1b4a73f61b07
x-instance-id: 8ffe0c70f4ea
x-instance-id: 1b4a73f61b07
x-instance-id: 8ffe0c70f4ea
date: 2026-11-05T18:59:00Z commit: 0a1f48b
host: Apple M4 Max, 16 CPU, 48 GiB RAM, macOS 15.1
docker: 28.3.2, VM: 16 CPU, 8217190400 bytes
compose: 2.38.2-desktop.1
images:
image: ${API_IMAGE:-mtusi-messenger:${COMPOSE_PROJECT_NAME}}
image: haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b
image: postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b
image: valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a
image: grafana/k6:2.3.0@sha256:2dd4756ec6e14e62778916e1eb850108e4b499304c02df56760fa0bdb0fba0b8
FROM python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d AS builder
COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
FROM python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d AS runtime
python in image: Python 3.14.7
haproxy: HAProxy version 3.2.26-3e0f11a 2026/10/14 - https://haproxy.org/
packages (uv.lock):
fastapi 0.141.1
uvicorn 0.54.0
uvicorn-worker 0.4.0
gunicorn 26.2.0
sqlalchemy 2.0.45
alembic 1.16.5
asyncpg 0.32.0
argon2-cffi 25.1.0
pydantic 2.13.5
pydantic-settings 2.15.0
dishka 1.10.1
structlog 26.1.0
redis 8.1.0
process users (service uid command):
api 10001 python
lb 99 haproxy
postgres 70 postgres
valkey 999 tini
valkey 999 valkey-server
exit_code: 0 elapsed_seconds: 2.112
+155
View File
@@ -0,0 +1,155 @@
date: 2026-11-05T18:55:27.662096+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ sh -c 'docker volume ls --filter label=com.docker.compose.project="$COMPOSE_PROJECT_NAME"; docker compose config --quiet && make up && docker compose ps -a && docker compose exec -T postgres psql -U messenger -d messenger -c "SELECT version_num FROM alembic_version"'
DRIVER VOLUME NAME
sh scripts/secrets.sh
docker compose up -d --build --wait
#1 [internal] load local bake definitions
#1 reading from stdin 454B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 1.65kB done
#2 DONE 0.0s
#3 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
#3 DONE 0.0s
#4 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
#4 DONE 1.7s
#5 [internal] load .dockerignore
#5 transferring context: 437B done
#5 DONE 0.0s
#6 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
#6 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 0.0s done
#6 DONE 0.0s
#7 [internal] load build context
#7 transferring context: 29.64kB done
#7 DONE 0.0s
#8 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
#8 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d 0.0s done
#8 DONE 0.0s
#9 [builder 4/7] COPY pyproject.toml uv.lock README.md ./
#9 CACHED
#10 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
#10 CACHED
#11 [builder 3/7] WORKDIR /build
#11 CACHED
#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable
#12 CACHED
#13 [builder 6/7] COPY src ./src
#13 DONE 0.0s
#14 [builder 7/7] RUN uv sync --locked --no-dev --no-editable
#14 0.139 Resolved 64 packages in 0.40ms
#14 0.140 Building mtusi-messenger @ file:///build
#14 1.569 Built mtusi-messenger @ file:///build
#14 1.572 Prepared 1 package in 1.43s
#14 1.576 Installed 1 package in 4ms
#14 1.653 Bytecode compiled 1275 files in 76ms
#14 1.653 + mtusi-messenger==1.3.0 (from file:///build)
#14 DONE 1.7s
#15 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
#15 CACHED
#16 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv
#16 DONE 0.2s
#17 [runtime 4/6] WORKDIR /app
#17 DONE 0.0s
#18 [runtime 5/6] COPY --chown=root:root alembic.ini ./
#18 DONE 0.0s
#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic
#19 DONE 0.0s
#20 exporting to image
#20 exporting layers
#20 exporting layers 1.8s done
#20 exporting manifest sha256:5038ad65552ef8a56c20f7f9f042205fa4f08bed2182f7d170da334d08a3bd61
#20 exporting manifest sha256:5038ad65552ef8a56c20f7f9f042205fa4f08bed2182f7d170da334d08a3bd61 done
#20 exporting config sha256:de74256583c9ad3781e5456b23c7688aa2ee86733f0d16bcd296b9112aee8335 done
#20 exporting attestation manifest sha256:206b908d058f5f2d5d194ed07ef9ab77cc18e8bcc9445e252eb82c397e4e5c81 done
#20 exporting manifest list sha256:59081a6760b0d025ed7c613a68f6f939f3223f3ad2c6e8a9952ded4551c932ee done
#20 naming to docker.io/library/mtusi-messenger:mtusi2026lab3-grade3-final-20261105 done
#20 unpacking to docker.io/library/mtusi-messenger:mtusi2026lab3-grade3-final-20261105
#20 unpacking to docker.io/library/mtusi-messenger:mtusi2026lab3-grade3-final-20261105 0.3s done
#20 DONE 2.1s
#21 resolving provenance for metadata file
#21 DONE 0.0s
api Built
Network mtusi2026lab3-grade3-final-20261105_backend Creating
Network mtusi2026lab3-grade3-final-20261105_backend Created
Network mtusi2026lab3-grade3-final-20261105_edge Creating
Network mtusi2026lab3-grade3-final-20261105_edge Created
Volume "mtusi2026lab3-grade3-final-20261105_valkeydata" Creating
Volume "mtusi2026lab3-grade3-final-20261105_valkeydata" Created
Volume "mtusi2026lab3-grade3-final-20261105_pgdata" Creating
Volume "mtusi2026lab3-grade3-final-20261105_pgdata" Created
Container mtusi2026lab3-grade3-final-20261105-lb-1 Creating
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Creating
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Creating
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Created
Container mtusi2026lab3-grade3-final-20261105-lb-1 Created
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Created
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Creating
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Created
Container mtusi2026lab3-grade3-final-20261105-api-2 Creating
Container mtusi2026lab3-grade3-final-20261105-api-1 Creating
Container mtusi2026lab3-grade3-final-20261105-api-2 Created
Container mtusi2026lab3-grade3-final-20261105-api-1 Created
Container mtusi2026lab3-grade3-final-20261105-lb-1 Starting
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Starting
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Starting
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Started
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Started
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-lb-1 Started
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Healthy
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Starting
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Started
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Exited
Container mtusi2026lab3-grade3-final-20261105-api-1 Starting
Container mtusi2026lab3-grade3-final-20261105-api-1 Started
Container mtusi2026lab3-grade3-final-20261105-api-2 Starting
Container mtusi2026lab3-grade3-final-20261105-api-2 Started
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-lb-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-api-1 Waiting
Container mtusi2026lab3-grade3-final-20261105-api-2 Waiting
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Exited
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Healthy
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Healthy
Container mtusi2026lab3-grade3-final-20261105-api-1 Healthy
Container mtusi2026lab3-grade3-final-20261105-api-2 Healthy
Container mtusi2026lab3-grade3-final-20261105-lb-1 Healthy
scripts/lb-wait.sh
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-grade3-final-20261105-api-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 6 seconds ago Up 3 seconds (healthy)
mtusi2026lab3-grade3-final-20261105-api-2 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "python -m gunicorn …" api 6 seconds ago Up 3 seconds (healthy)
mtusi2026lab3-grade3-final-20261105-lb-1 haproxy:3.2.26-alpine@sha256:5893840576071e6217cd52ebdcc14f454c6f7a631056fa6f4e0f40d3cac4215b "docker-entrypoint.s…" lb 6 seconds ago Up 6 seconds (healthy) 127.0.0.1:18083->8080/tcp, 127.0.0.1:23083->8404/tcp
mtusi2026lab3-grade3-final-20261105-migrate-1 mtusi-messenger:mtusi2026lab3-grade3-final-20261105 "alembic upgrade head" migrate 6 seconds ago Exited (0) 4 seconds ago
mtusi2026lab3-grade3-final-20261105-postgres-1 postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b "docker-entrypoint.s…" postgres 6 seconds ago Up 6 seconds (healthy)
mtusi2026lab3-grade3-final-20261105-valkey-1 valkey/valkey:8.1.11-alpine@sha256:2602ace2be6569bc2bbb06f873776516ab9089821525be34f4305c67eb9db02a "tini -- docker-entr…" valkey 6 seconds ago Up 6 seconds (healthy)
version_num
-----------------------
0002_idempotency_keys
(1 row)
exit_code: 0 elapsed_seconds: 13.244
+41
View File
@@ -0,0 +1,41 @@
date: 2026-11-05T18:59:05.166340+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ sh -c 'make down && docker compose ps -a && docker volume ls --filter label=com.docker.compose.project="$COMPOSE_PROJECT_NAME" && docker volume ls --filter label=com.docker.compose.project=mtusi2026lab3-grade3-20261105'
docker compose --profile bench down
Container mtusi2026lab3-grade3-final-20261105-api-2 Stopping
Container mtusi2026lab3-grade3-final-20261105-api-1 Stopping
Container mtusi2026lab3-grade3-final-20261105-lb-1 Stopping
Container mtusi2026lab3-grade3-final-20261105-lb-1 Stopped
Container mtusi2026lab3-grade3-final-20261105-lb-1 Removing
Container mtusi2026lab3-grade3-final-20261105-lb-1 Removed
Container mtusi2026lab3-grade3-final-20261105-api-2 Stopped
Container mtusi2026lab3-grade3-final-20261105-api-2 Removing
Container mtusi2026lab3-grade3-final-20261105-api-1 Stopped
Container mtusi2026lab3-grade3-final-20261105-api-1 Removing
Container mtusi2026lab3-grade3-final-20261105-api-2 Removed
Container mtusi2026lab3-grade3-final-20261105-api-1 Removed
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Stopping
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Stopping
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Stopped
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Removing
Container mtusi2026lab3-grade3-final-20261105-migrate-1 Removed
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Stopping
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Stopped
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Removing
Container mtusi2026lab3-grade3-final-20261105-postgres-1 Removed
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Stopped
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Removing
Container mtusi2026lab3-grade3-final-20261105-valkey-1 Removed
Network mtusi2026lab3-grade3-final-20261105_edge Removing
Network mtusi2026lab3-grade3-final-20261105_backend Removing
Network mtusi2026lab3-grade3-final-20261105_edge Removed
Network mtusi2026lab3-grade3-final-20261105_backend Removed
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
DRIVER VOLUME NAME
local mtusi2026lab3-grade3-final-20261105_pgdata
local mtusi2026lab3-grade3-final-20261105_valkeydata
DRIVER VOLUME NAME
local mtusi2026lab3-grade3-20261105_pgdata
local mtusi2026lab3-grade3-20261105_valkeydata
exit_code: 0 elapsed_seconds: 3.351
+7
View File
@@ -0,0 +1,7 @@
date: 2026-11-05T18:59:01.562450+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make storage-evidence
sh scripts/evidence-storage.sh
evidence/{schema,migrations,kdf,secrets}.txt обновлены
exit_code: 0 elapsed_seconds: 3.569
@@ -0,0 +1,69 @@
date: 2026-11-05T18:47:00.548192+00:00 commit: 7fc911c332aefe33285ea9e7811c37abd9bb20a6
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ make student-test PYTEST_ARGS=-vv
.venv/bin/pytest -vv
============================= test session starts ==============================
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0 -- <repo>/.venv/bin/python
cachedir: .pytest_cache
rootdir: <repo>
configfile: pyproject.toml
testpaths: student-tests
plugins: asyncio-1.4.0, anyio-4.15.1
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collecting ... collected 282 items / 12 deselected / 270 selected
student-tests/api/test_access.py::test_outsider_gets_404_on_chat PASSED [ 0%]
student-tests/api/test_access.py::test_unknown_chat_is_indistinguishable_from_foreign PASSED [ 0%]
student-tests/api/test_access.py::test_outsider_cannot_write PASSED [ 1%]
student-tests/api/test_access.py::test_outsider_cannot_read_history PASSED [ 1%]
student-tests/api/test_access.py::test_access_checked_before_body PASSED [ 1%]
student-tests/api/test_access.py::test_chat_list_hides_foreign_chats PASSED [ 2%]
student-tests/api/test_access.py::test_403_is_never_used PASSED [ 2%]
student-tests/api/test_access.py::test_request_shape_is_checked_before_access PASSED [ 2%]
student-tests/api/test_access.py::test_outsider_does_not_wait_for_members_lock PASSED [ 3%]
student-tests/api/test_bounded_contexts.py::test_identity_does_not_know_about_messaging PASSED [ 3%]
student-tests/api/test_bounded_contexts.py::test_domains_do_not_import_infrastructure PASSED [ 4%]
student-tests/api/test_bounded_contexts.py::test_core_layers_do_not_import_pydantic PASSED [ 4%]
student-tests/api/test_bounded_contexts.py::test_shared_knows_nothing_about_zones PASSED [ 4%]
student-tests/api/test_bounded_contexts.py::test_shared_core_is_free_of_transport PASSED [ 5%]
student-tests/api/test_bounded_contexts.py::test_shared_core_holds_only_platform PASSED [ 5%]
student-tests/api/test_bounded_contexts.py::test_shared_entrypoints_hold_only_transport PASSED [ 5%]
student-tests/api/test_bounded_contexts.py::test_every_zone_owns_its_errors_events_and_commands PASSED [ 6%]
student-tests/api/test_bounded_contexts.py::test_every_zone_owns_its_http_layer PASSED [ 6%]
student-tests/api/test_bounded_contexts.py::test_only_main_knows_both_zones PASSED [ 7%]
student-tests/api/test_bounded_contexts.py::test_application_has_no_separate_entrypoints_root PASSED [ 7%]
student-tests/api/test_bounded_contexts.py::test_shared_source_mentions_no_domain_vocabulary PASSED [ 7%]
student-tests/api/test_bounded_contexts.py::test_shared_declares_no_concrete_commands_or_events PASSED [ 8%]
student-tests/api/test_bounded_contexts.py::test_shared_has_no_test_doubles PASSED [ 8%]
student-tests/api/test_bounded_contexts.py::test_zone_errors_do_not_leak_transport_codes PASSED [ 8%]
student-tests/api/test_bounded_contexts.py::test_sql_of_each_zone_reads_only_its_tables PASSED [ 9%]
student-tests/api/test_bounded_contexts.py::test_messaging_does_not_import_identity_at_all PASSED [ 9%]
student-tests/api/test_bounded_contexts.py::test_sqlalchemy_stays_in_infrastructure_and_asyncpg_is_only_a_driver PASSED [ 10%]
student-tests/api/test_cache.py::test_second_check_is_served_from_cache PASSED [ 10%]
student-tests/api/test_cache.py::test_logout_writes_tombstone_before_database PASSED [ 10%]
student-tests/api/test_cache.py::test_logout_rejected_by_database_changes_nothing PASSED [ 11%]
student-tests/api/test_cache.py::test_fill_racing_with_logout_does_not_revive_token PASSED [ 11%]
student-tests/api/test_cache.py::test_flushall_loses_nothing PASSED [ 11%]
student-tests/api/test_cache.py::test_unreachable_cache_is_bypassed_without_anonymous_access PASSED [ 12%]
student-tests/api/test_concurrency.py::test_hundred_messages_from_ten_clients PASSED [ 12%]
student-tests/api/test_concurrency.py::test_history_follows_the_clock_but_never_moves_back PASSED [ 12%]
student-tests/api/test_concurrency.py::test_parallel_registration_keeps_username_unique PASSED [ 13%]
student-tests/api/test_concurrency.py::test_parallel_chat_creation_is_atomic PASSED [ 13%]
student-tests/api/test_consistency.py::test_registration_is_visible_to_chats_immediately PASSED [ 14%]
student-tests/api/test_consistency.py::test_parallel_registrations_are_all_usable_as_members PASSED [ 14%]
student-tests/api/test_consistency.py::test_rejected_registration_leaves_no_trace PASSED [ 14%]
student-tests/api/test_consistency.py::test_failed_chat_creation_rolls_back_both_tables PASSED [ 15%]
student-tests/api/test_consistency.py::test_rejected_message_does_not_enter_history PASSED [ 15%]
student-tests/api/test_consistency.py::test_confirmed_write_is_visible_to_next_read PASSED [ 15%]
student-tests/api/test_consistency.py::test_parallel_writes_across_zones_keep_counts_consistent PASSED [ 16%]
student-tests/api/test_consistency.py::test_chat_membership_survives_parallel_reads_and_writes PASSED [ 16%]
student-tests/api/test_drain.py::test_draining_replica_is_not_ready_but_alive PASSED [ 17%]
student-tests/api/test_drain.py::test_sigterm_leaves_rotation_then_closes_and_cancels_stuck_requests
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<repo>/student-tests/api/test_drain.py:101: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
================ 46 passed, 12 deselected in 275.91s (0:04:35) =================
make: *** [student-test] Error 2
exit_code: 2 elapsed_seconds: 276.378
Binary file not shown.
+23
View File
@@ -0,0 +1,23 @@
date: 2026-11-05T19:06:00.788460+00:00 commit: 0a1f48bd73e5780c732356880c23fdb476bcff98
environment: COMPOSE_PROJECT_NAME=mtusi2026lab3-grade3-final-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2 NO_PROXY=localhost,127.0.0.1,::1
$ git diff --check
evidence/migrations.txt:3: trailing whitespace.
+ users | sessions | chats | members | messages | keys | versions
evidence/migrations.txt:10: trailing whitespace.
+ users | sessions | chats | members | messages | keys | versions
evidence/schema.txt:120: trailing whitespace.
+ Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
evidence/schema.txt:122: trailing whitespace.
+ version_num | character varying(32) | | not null | | extended | | |
evidence/schema.txt:128: trailing whitespace.
+ version_num
evidence/stack.txt:5: trailing whitespace.
+api mtusi2026lab3-grade3-final-20261105-api-1 Up 16 seconds (healthy)
evidence/stack.txt:6: trailing whitespace.
+api mtusi2026lab3-grade3-final-20261105-api-2 Up 16 seconds (healthy)
evidence/stack.txt:8: trailing whitespace.
+postgres mtusi2026lab3-grade3-final-20261105-postgres-1 Up 18 seconds (healthy)
evidence/stack.txt:9: trailing whitespace.
+valkey mtusi2026lab3-grade3-final-20261105-valkey-1 Up 18 seconds (healthy)
exit_code: 2 elapsed_seconds: 0.017
@@ -0,0 +1,8 @@
date: 2026-11-05T19:16:05.293964+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ sh -ec 'make test; make limits; make lb-check; docker compose ps -a --format "{{.ID}} {{.Service}} {{.Status}}"; docker inspect -f "{{.Name}} {{.Config.Hostname}} image={{.Image}}" $(docker compose ps -q api)'
python3 tests/smoke.py --base-url "http://127.0.0.1:18083"
FAIL: GET /health/live: connection/TLS failure (RemoteDisconnected)
make: *** [test] Error 1
exit: 2 elapsed_seconds: 0.276
+66
View File
@@ -0,0 +1,66 @@
date: 2026-11-05T19:16:58.984609+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ sh -ec 'make restore; make test; make limits; make lb-check; docker compose ps -a --format "{{.ID}} {{.Service}} {{.Status}}"; docker inspect -f "{{.Name}} {{.Config.Hostname}} image={{.Image}}" $(docker compose ps -q api)'
scripts/restore.sh
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
python3 tests/smoke.py --base-url "http://127.0.0.1:18083"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
python3 scripts/limits.py --out evidence/limits.txt
date: 2026-11-05T19:17:00Z commit: 252e3e3
$ docker compose --profile bench config --format json (declared)
service cpus/mem ports secrets volumes networks ro
-------- ---------- ------------------------------- ------------------------------------ ---------- ---------------------- -----
api 1/512MiB - cache_url,cursor_secret,database_url - backend(internal) true
k6 2/512MiB - - - edge false
lb 1/128MiB 127.0.0.1:18083,127.0.0.1:23083 - - backend(internal),edge true
migrate 0.5/256MiB - database_url - backend(internal) false
postgres 2/1024MiB - postgres_password pgdata backend(internal) false
valkey 0.5/128MiB - valkey.conf valkeydata backend(internal) false
$ docker inspect (running containers: hostname = X-Instance-Id, applied limits)
service hostname cpus memory published
-------- ------------ ---- ------- ---------------------------------------------------
api 5bbf259ff136 1 512MiB
api 7cfd91ddf780 1 512MiB
lb 4f83577b3411 1 128MiB 127.0.0.1:18083->8080/tcp,127.0.0.1:23083->8404/tcp
postgres f225c6cd77bb 2 1024MiB
valkey 5e3ed0a9a35a 0.5 128MiB
PASS: limits, ports, secrets, volumes and networks match the policy
python3 scripts/probe.py check --rounds 20 --out evidence/lb-check.json
{
"instances_one_token": {
"7cfd91ddf780": 20,
"5bbf259ff136": 20
},
"same_key": {
"rounds": 20,
"parallel": 8,
"statuses": {
"201": 160
},
"instances": {
"5bbf259ff136": 80,
"7cfd91ddf780": 80
},
"identical_bodies_rounds": 20,
"single_copy_rounds": 20,
"conflict_rounds": 20
},
"pass": true
}
7cfd91ddf780 api Up 6 seconds (healthy)
5bbf259ff136 api Up About a minute (healthy)
4f83577b3411 lb Up About a minute (healthy)
ad30cd539e85 migrate Exited (0) About a minute ago
f225c6cd77bb postgres Up About a minute (healthy)
5e3ed0a9a35a valkey Up About a minute (healthy)
/mtusi2026lab3-grade4-20261105-api-1 7cfd91ddf780 image=sha256:fdc0128530c7f092746491b339125eea9fe079b86dcc5c8c3aa89e224fca1706
/mtusi2026lab3-grade4-20261105-api-2 5bbf259ff136 image=sha256:fdc0128530c7f092746491b339125eea9fe079b86dcc5c8c3aa89e224fca1706
exit: 0 elapsed_seconds: 2.654
+35
View File
@@ -0,0 +1,35 @@
date: 2026-11-05T19:29:36.759200+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ sh -ec 'make check; make validate; make lint; uv lock --check; openspec validate --all --strict; git diff --check; test -z "$(git diff ef0b9a3 --name-only -- contracts tests README.md COURSE.md .pipeline)"; test -z "$(git ls-files .env secrets volumes)"; echo "PASS: normative files and pipeline unchanged; no tracked secrets or volumes"'
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
.venv/bin/python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
.venv/bin/ruff check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
All checks passed!
.venv/bin/ruff format --check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
108 files already formatted
.venv/bin/ty check src student-tests alembic
All checks passed!
Resolved 64 packages in 18ms
- Validating...
✓ change/2026-11-05-adopt-sqlalchemy-alembic
✓ spec/lab1-event-publication
✓ spec/lab1-messenger-chats
✓ spec/lab1-messenger-history
✓ spec/lab1-messenger-identity
✓ spec/lab1-service-operability
✓ spec/lab2-auth-sessions
✓ spec/lab2-dependency-failures
✓ spec/lab2-history-index
✓ spec/lab2-persistent-storage
✓ spec/lab2-session-cache
✓ spec/lab3-failover-operations
✓ spec/lab3-idempotent-messages
✓ spec/lab3-load-balancing
✓ spec/lab3-scaling-cost
✓ change/verify-lab3-grade4-recovery
Totals: 16 passed, 0 failed (16 items)
PASS: normative files and pipeline unchanged; no tracked secrets or volumes
exit: 0 elapsed_seconds: 1.683
@@ -0,0 +1,65 @@
date: 2026-11-05T19:16:10.092594+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ make detection
rm -rf evidence/detection
for run in 1 2 3; do sh scripts/detection.sh evidence/detection/run$run || exit 1; done
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.761,
"lb_up_before": 0,
"lb_samples_missing": 110,
"lb_up_counted_as_detected": -1,
"detection_seconds": null,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 0,
"x_instance_id_present": false,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 2.3,
"lb_up_after_restore": null,
"checks": {
"action_ok": true,
"lb_observed": false,
"detected_in_time": false,
"lb_answer_ok": false,
"excluded_before_action_end": false,
"restored": true
},
"pass": false
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
make: *** [detection] Terminated: 15
exit: 2 elapsed_seconds: 48.801
@@ -0,0 +1,35 @@
{"date": "2026-11-05T19:16:10.092594+00:00", "commit": "252e3e3ffeea5004cfd9dc342e686af1417a77a2",
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.761,
"lb_up_before": 0,
"lb_samples_missing": 110,
"lb_up_counted_as_detected": -1,
"detection_seconds": null,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 0,
"x_instance_id_present": false,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 2.3,
"lb_up_after_restore": null,
"checks": {
"action_ok": true,
"lb_observed": false,
"detected_in_time": false,
"lb_answer_ok": false,
"excluded_before_action_end": false,
"restored": true
},
"pass": false
}
+478
View File
@@ -0,0 +1,478 @@
date: 2026-11-05T19:17:01.673107+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ make detection
rm -rf evidence/detection
for run in 1 2 3; do sh scripts/detection.sh evidence/detection/run$run || exit 1; done
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.535,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 1.069,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 1.969,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"excluded_before_action_end": true,
"restored": true
},
"pass": true
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"kill",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.113,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 0.934,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 2.57,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
{
"action": [
"docker",
"pause",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.057,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 3.215,
"declared_max_seconds": 3.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "docker unpause 7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170 && scripts/lb-wait.sh",
"restore_seconds": 2.425,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a
f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a
{
"action": [
"docker",
"stop",
"f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a"
],
"action_exit": 0,
"action_seconds": 0.167,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 0,
"detection_seconds": 1.196,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 503,
"x_instance_id_present": false,
"error_code": "unavailable"
},
"restore": "docker start f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a && scripts/lb-wait.sh",
"restore_seconds": 2.475,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.662,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 1.205,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 1.953,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"excluded_before_action_end": true,
"restored": true
},
"pass": true
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"kill",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.162,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 0.901,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 3.086,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
{
"action": [
"docker",
"pause",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.063,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 2.817,
"declared_max_seconds": 3.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "docker unpause 7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170 && scripts/lb-wait.sh",
"restore_seconds": 2.378,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a
f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a
{
"action": [
"docker",
"stop",
"f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a"
],
"action_exit": 0,
"action_seconds": 0.17,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 0,
"detection_seconds": 1.263,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 503,
"x_instance_id_present": false,
"error_code": "unavailable"
},
"restore": "docker start f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a && scripts/lb-wait.sh",
"restore_seconds": 2.455,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"stop",
"-t",
"7",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 2.665,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 1.266,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 1.984,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"excluded_before_action_end": true,
"restored": true
},
"pass": true
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{
"action": [
"docker",
"kill",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.163,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 0.886,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "scripts/restore.sh",
"restore_seconds": 3.095,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170
{
"action": [
"docker",
"pause",
"7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170"
],
"action_exit": 0,
"action_seconds": 0.063,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 1,
"detection_seconds": 2.778,
"declared_max_seconds": 3.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 200,
"x_instance_id_present": true,
"error_code": null
},
"restore": "docker unpause 7cfd91ddf780f4c432d3f69358c626eed4986c5841c85eab201e9330976e1170 && scripts/lb-wait.sh",
"restore_seconds": 2.416,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a
f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a
{
"action": [
"docker",
"stop",
"f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a"
],
"action_exit": 0,
"action_seconds": 0.163,
"lb_up_before": 2,
"lb_samples_missing": 0,
"lb_up_counted_as_detected": 0,
"detection_seconds": 1.239,
"declared_max_seconds": 1.5,
"measurement_slack_seconds": 0.25,
"lb_answer_after_detection": {
"path": "/health/live",
"status": 503,
"x_instance_id_present": false,
"error_code": "unavailable"
},
"restore": "docker start f225c6cd77bb40f6e598bd65a1b50fa8244700978ee4086700860e0fb076857a && scripts/lb-wait.sh",
"restore_seconds": 2.481,
"lb_up_after_restore": 2,
"checks": {
"action_ok": true,
"lb_observed": true,
"detected_in_time": true,
"lb_answer_ok": true,
"restored": true
},
"pass": true
}
exit: 0 elapsed_seconds: 60.401
+21
View File
@@ -0,0 +1,21 @@
date: 2026-11-05T19:18:40.804026+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
Наблюдения при разработке (сводка вывода инструментов, не сырой лог).
На 8a7e027 с WIP scripts/probe.py и student-tests/unit/test_probe.py:
$ .venv/bin/ruff check scripts/probe.py
exit 1: E501, две строки 101/102 символа; ruff format исправил переносы.
$ .venv/bin/ruff check student-tests/unit/test_probe.py
exit 1: ARG005 у аргументов lambda a/kw; переименованы в _a/_kw.
$ make student-test PYTEST_ARGS='-q student-tests/unit/test_probe.py'
14 passed in 0.01s.
После исправлений, до коммита 252e3e3:
$ make check
PASS.
$ make lint
PASS: ruff check, 108 files already formatted, ty.
$ make student-test
285 passed, 12 deselected in 31.08s.
Context7 /alembic/alembic/1.16 не нашёл документацию. Resolve вернул
/sqlalchemy/alembic/rel_1_16_5; async cookbook прочитан успешно.
Context7 /sqlalchemy/sqlalchemy/2.0 вернул ветку rel_2_0_55. Семантика pool_pre_ping
дополнительно сверена с .venv/lib/python3.14/site-packages/sqlalchemy/pool/base.py
у установленной версии 2.0.45; AsyncEngine.dispose и async_sessionmaker уже используются.
+25
View File
@@ -0,0 +1,25 @@
date: 2026-11-05T19:16:05.604041+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ make student-test 'PYTEST_ARGS=-v -s student-tests/api/test_drain.py student-tests/unit/test_timeouts.py'
.venv/bin/pytest -v -s student-tests/api/test_drain.py student-tests/unit/test_timeouts.py
============================= test session starts ==============================
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0 -- <repo>/.venv/bin/python
cachedir: .pytest_cache
rootdir: <repo>
configfile: pyproject.toml
plugins: asyncio-1.4.0, anyio-4.15.1
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collecting ... collected 3 items
student-tests/api/test_drain.py::test_draining_replica_is_not_ready_but_alive PASSED
student-tests/api/test_drain.py::test_sigterm_leaves_rotation_then_closes_and_cancels_stuck_requests окно: ready/live (503, 200), порт закрыт через 1.05 с, выход 2.44 с
запрос, принятый до SIGTERM и дописанный после закрытия порта: HTTP/1.1 201 Created
запрос, тело которого так и не пришло: HTTP/1.1 503 Service Unavailable
content-type application/json, тело {'error': {'code': 'unavailable', 'message': 'Сервис временно недоступен', 'request_id': '696dc801542f4169965fa2cd535d8d1a'}}
PASSED
student-tests/unit/test_timeouts.py::test_timeouts_shrink_inwards_and_shutdown_fits_the_stop_budget обнаружение 1.5 с (зависание 3.5 с), окно 2.0 с, дообработка 3.0 с, остановка 6.0 с, хук 7.0 с, stop_grace_period 8.0 с; LB server 10.0 с > запрос 8.0 с > БД 3.0 с; readiness 0.8 с < check 1.0 с
PASSED
============================== 3 passed in 3.97s ===============================
exit: 0 elapsed_seconds: 4.452
@@ -0,0 +1,48 @@
date: 2026-11-05T19:32:13.299806+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ python3 -c 'import csv,io,json,re,subprocess
from pathlib import Path
root=Path('"'"'evidence'"'"')
det=list((root/'"'"'detection'"'"').glob('"'"'*/*.json'"'"'))
assert len(det)==12
for p in det:
d=json.loads(p.read_text())
assert d['"'"'pass'"'"'] and all(d['"'"'checks'"'"'].values())
assert d['"'"'detection_seconds'"'"']<=d['"'"'declared_max_seconds'"'"']
fail=json.loads((root/'"'"'failover-each/summary.json'"'"').read_text())
assert len(fail)==2 and len({d['"'"'label'"'"'] for d in fail})==2
for p in list((root/'"'"'failover-each'"'"').glob('"'"'*/result.json'"'"'))+[root/'"'"'rolling/result.json'"'"',root/'"'"'rolling-from-7fc911c/result.json'"'"']:
d=json.loads(p.read_text())
assert d['"'"'pass'"'"'] and all(d['"'"'checks'"'"'].values())
assert d['"'"'k6'"'"']['"'"'failed_ratio'"'"']==d['"'"'k6'"'"']['"'"'dropped_iterations'"'"']==d['"'"'probe'"'"']['"'"'failed_attempts'"'"']==0
assert d['"'"'history'"'"']['"'"'confirmed'"'"']==d['"'"'history'"'"']['"'"'stored'"'"']==d['"'"'probe'"'"']['"'"'attempts'"'"']
assert all(v==0 for v in d['"'"'lb_counters'"'"'].values())
trace=list(csv.DictReader(io.StringIO((p.parent/'"'"'lb_up.csv'"'"').read_text().split('"'"'\n'"'"',1)[1])))
assert min(int(r['"'"'up'"'"']) for r in trace)==d['"'"'lb_up_min'"'"']
probes=list(csv.DictReader(io.StringIO((p.parent/'"'"'probe.csv'"'"').read_text().split('"'"'\n'"'"',1)[1])))
first=next(r for r in probes if float(r['"'"'t_rel_s'"'"'])>=0 and r['"'"'status'"'"']=='"'"'201'"'"')
assert abs(float(first['"'"'t_rel_s'"'"'])+float(first['"'"'latency_ms'"'"'])/1000-d['"'"'probe'"'"']['"'"'first_success_s'"'"'])<0.002
if '"'"'rolling'"'"' in str(p):
action=(p.parent/'"'"'action.txt'"'"').read_text()
assert action.count('"'"'migrate once before the first replacement'"'"')==1
assert len(re.findall('"'"'replace .+ image='"'"',action))==2 and d['"'"'lb_up_min'"'"']>=2
print(p,'"'"'PASS'"'"')
paths=subprocess.check_output(['"'"'git'"'"','"'"'diff'"'"','"'"'--name-only'"'"'],text=True).splitlines()+subprocess.check_output(['"'"'git'"'"','"'"'ls-files'"'"','"'"'--others'"'"','"'"'--exclude-standard'"'"'],text=True).splitlines()
pattern=re.compile(r'"'"'Bearer [A-Za-z0-9_-]{25,}|postgresql(?:\+asyncpg)?://[A-Za-z0-9_-]+:[A-Za-z0-9._~%+-]+@|redis://:[A-Za-z0-9._~%+-]+@|"token":\s*"[A-Za-z0-9_-]{25,}"'"'"')
for name in paths:
p=Path(name)
if p.is_file() and p.suffix in {'"'"'.txt'"'"','"'"'.json'"'"','"'"'.csv'"'"','"'"'.md'"'"'}:
assert not pattern.search(p.read_text()),'"'"'possible credential in '"'"'+name
print('"'"'PASS: 12 detection measurements, 4 load scenarios, raw CSV agreement, one migrate per rolling action, credential-pattern scan'"'"')
'
Traceback (most recent call last):
File "<string>", line 33, in <module>
assert not pattern.search(p.read_text()),'possible credential in '+name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: possible credential in evidence/grade4-student-tests.txt
evidence/failover-each/7cfd91ddf780/result.json PASS
evidence/failover-each/5bbf259ff136/result.json PASS
evidence/rolling/result.json PASS
evidence/rolling-from-7fc911c/result.json PASS
exit: 1 elapsed_seconds: 0.082
@@ -0,0 +1,53 @@
date: 2026-11-05T19:31:22.371897+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ python3 -c 'import csv,io,json,re,subprocess
from pathlib import Path
root=Path('"'"'evidence'"'"')
files=list((root/'"'"'detection'"'"').glob('"'"'*/*.json'"'"'))
assert len(files)==12
for path in files:
d=json.loads(path.read_text())
assert d['"'"'pass'"'"'] and all(d['"'"'checks'"'"'].values()),path
assert d['"'"'detection_seconds'"'"'] <= d['"'"'declared_max_seconds'"'"'],path
fail=json.loads((root/'"'"'failover-each/summary.json'"'"').read_text())
assert len(fail)==2 and len({d['"'"'label'"'"'] for d in fail})==2
paths=list((root/'"'"'failover-each'"'"').glob('"'"'*/result.json'"'"'))+[root/'"'"'rolling/result.json'"'"',root/'"'"'rolling-from-7fc911c/result.json'"'"']
for path in paths:
d=json.loads(path.read_text())
assert d['"'"'pass'"'"'] and all(d['"'"'checks'"'"'].values()),path
assert d['"'"'k6'"'"']['"'"'failed_ratio'"'"']==0 and d['"'"'k6'"'"']['"'"'dropped_iterations'"'"']==0,path
assert d['"'"'history'"'"']['"'"'confirmed'"'"']==d['"'"'history'"'"']['"'"'stored'"'"']==d['"'"'probe'"'"']['"'"'attempts'"'"'],path
assert d['"'"'probe'"'"']['"'"'failed_attempts'"'"']==0 and all(v==0 for v in d['"'"'lb_counters'"'"'].values()),path
trace=list(csv.DictReader(io.StringIO((path.parent/'"'"'lb_up.csv'"'"').read_text().split('"'"'\n'"'"',1)[1])))
assert min(int(r['"'"'up'"'"']) for r in trace)==d['"'"'lb_up_min'"'"'],path
probes=list(csv.DictReader(io.StringIO((path.parent/'"'"'probe.csv'"'"').read_text().split('"'"'\n'"'"',1)[1])))
first=next(r for r in probes if float(r['"'"'t_rel_s'"'"'])>=0 and r['"'"'status'"'"']=='"'"'201'"'"')
completed=float(first['"'"'t_rel_s'"'"'])+float(first['"'"'latency_ms'"'"'])/1000
assert abs(completed-d['"'"'probe'"'"']['"'"'first_success_s'"'"'])<0.002,path
if '"'"'rolling'"'"' in str(path):
action=(path.parent/'"'"'action.txt'"'"').read_text()
assert action.count('"'"'migrate once before the first replacement'"'"')==1
assert len(re.findall('"'"'replace .+ image='"'"',action))==2
assert d['"'"'lb_up_min'"'"']>=2
print(path,'"'"'PASS'"'"',d['"'"'k6'"'"']['"'"'requests'"'"'],'"'"'requests;'"'"',d['"'"'history'"'"']['"'"'stored'"'"'],'"'"'confirmed messages'"'"')
changed=subprocess.check_output(['"'"'git'"'"','"'"'diff'"'"','"'"'--name-only'"'"'],text=True).splitlines()
untracked=subprocess.check_output(['"'"'git'"'"','"'"'ls-files'"'"','"'"'--others'"'"','"'"'--exclude-standard'"'"'],text=True).splitlines()
pattern=re.compile(r'"'"'Bearer [A-Za-z0-9_-]{25,}|postgresql://[^ /\n]+:[^@ /\n]+@|redis://:[^@ /\n]+@|"token":\s*"[A-Za-z0-9_-]{25,}"'"'"')
for name in changed+untracked:
p=Path(name)
if p.is_file() and p.suffix in {'"'"'.txt'"'"','"'"'.json'"'"','"'"'.csv'"'"','"'"'.md'"'"'}:
assert not pattern.search(p.read_text()),'"'"'possible credential in '"'"'+name
print('"'"'PASS: 12 detection measurements, 4 load scenarios, raw CSV agreement, one migrate per rolling action, credential-pattern scan'"'"')
'
Traceback (most recent call last):
File "<string>", line 38, in <module>
assert not pattern.search(p.read_text()),'possible credential in '+name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: possible credential in evidence/grade4-evidence-audit.txt
evidence/failover-each/7cfd91ddf780/result.json PASS 6001 requests; 645 confirmed messages
evidence/failover-each/5bbf259ff136/result.json PASS 6001 requests; 642 confirmed messages
evidence/rolling/result.json PASS 9001 requests; 913 confirmed messages
evidence/rolling-from-7fc911c/result.json PASS 9001 requests; 913 confirmed messages
exit: 1 elapsed_seconds: 0.087
+43
View File
@@ -0,0 +1,43 @@
date: 2026-11-05T19:32:57.655116+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ python3 -c 'import csv,io,json,re,subprocess
from pathlib import Path
root=Path('"'"'evidence'"'"')
det=list((root/'"'"'detection'"'"').glob('"'"'*/*.json'"'"'))
assert len(det)==12
for p in det:
d=json.loads(p.read_text())
assert d['"'"'pass'"'"'] and all(d['"'"'checks'"'"'].values()) and d['"'"'detection_seconds'"'"']<=d['"'"'declared_max_seconds'"'"']
fail=json.loads((root/'"'"'failover-each/summary.json'"'"').read_text())
assert len(fail)==2 and len({d['"'"'label'"'"'] for d in fail})==2
for p in list((root/'"'"'failover-each'"'"').glob('"'"'*/result.json'"'"'))+[root/'"'"'rolling/result.json'"'"',root/'"'"'rolling-from-7fc911c/result.json'"'"']:
d=json.loads(p.read_text())
assert d['"'"'pass'"'"'] and all(d['"'"'checks'"'"'].values())
assert d['"'"'k6'"'"']['"'"'failed_ratio'"'"']==d['"'"'k6'"'"']['"'"'dropped_iterations'"'"']==d['"'"'probe'"'"']['"'"'failed_attempts'"'"']==0
assert d['"'"'history'"'"']['"'"'confirmed'"'"']==d['"'"'history'"'"']['"'"'stored'"'"']==d['"'"'probe'"'"']['"'"'attempts'"'"']
assert all(v==0 for v in d['"'"'lb_counters'"'"'].values())
trace=list(csv.DictReader(io.StringIO((p.parent/'"'"'lb_up.csv'"'"').read_text().split('"'"'\n'"'"',1)[1])))
assert min(int(r['"'"'up'"'"']) for r in trace)==d['"'"'lb_up_min'"'"']
probes=list(csv.DictReader(io.StringIO((p.parent/'"'"'probe.csv'"'"').read_text().split('"'"'\n'"'"',1)[1])))
first=next(r for r in probes if float(r['"'"'t_rel_s'"'"'])>=0 and r['"'"'status'"'"']=='"'"'201'"'"')
assert abs(float(first['"'"'t_rel_s'"'"'])+float(first['"'"'latency_ms'"'"'])/1000-d['"'"'probe'"'"']['"'"'first_success_s'"'"'])<0.002
if '"'"'rolling'"'"' in str(p):
action=(p.parent/'"'"'action.txt'"'"').read_text()
assert action.count('"'"'migrate once before the first replacement'"'"')==1
assert len(re.findall('"'"'replace .+ image='"'"',action))==2 and d['"'"'lb_up_min'"'"']>=2
print(p,'"'"'PASS'"'"')
paths=subprocess.check_output(['"'"'git'"'"','"'"'diff'"'"','"'"'--name-only'"'"'],text=True).splitlines()+subprocess.check_output(['"'"'git'"'"','"'"'ls-files'"'"','"'"'--others'"'"','"'"'--exclude-standard'"'"'],text=True).splitlines()
pattern=re.compile(r'"'"'Bearer [A-Za-z0-9_-]{25,}|postgresql(?:\+asyncpg)?://[A-Za-z0-9_-]+:[A-Za-z0-9._~%+-]+@|redis://:[A-Za-z0-9._~%+-]+@|"token":\s*"[A-Za-z0-9_-]{25,}"'"'"')
for name in paths:
p=Path(name)
if p.is_file() and p.suffix in {'"'"'.txt'"'"','"'"'.json'"'"','"'"'.csv'"'"','"'"'.md'"'"'}:
assert not pattern.search(p.read_text()),'"'"'possible credential in '"'"'+name
print('"'"'PASS: 12 detection measurements, 4 load scenarios, raw CSV agreement, one migrate per rolling action, credential-pattern scan'"'"')
'
evidence/failover-each/7cfd91ddf780/result.json PASS
evidence/failover-each/5bbf259ff136/result.json PASS
evidence/rolling/result.json PASS
evidence/rolling-from-7fc911c/result.json PASS
PASS: 12 detection measurements, 4 load scenarios, raw CSV agreement, one migrate per rolling action, credential-pattern scan
exit: 0 elapsed_seconds: 0.065
+26
View File
@@ -0,0 +1,26 @@
date: 2026-11-05T19:18:13.470607+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ make failover-each RATE=100
RATE=100 sh scripts/failover-each.sh evidence/failover-each
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{"label": "7cfd91ddf780", "action": ["sh", "-c", "scripts/stop-one.sh && docker compose ps -a --format '{{.ID}} {{.Service}} {{.Status}}' api && { scripts/stand-usage.sh & sleep 10; wait; } && scripts/restore.sh"], "action_exit": 0, "action_seconds": 15.204, "action_finished_before_load_end": true, "lb_up_before": 2, "lb_up_min": 1, "lb_samples_missing": 0, "detection_seconds": 0.884, "rejoin_seconds": 14.885, "probe": {"attempts": 645, "failed_attempts": 0, "first_failure_s": null, "first_success_s": 0.023, "recovery_s": 0.0, "instances_before": {"5bbf259ff136": 118, "7cfd91ddf780": 115}, "instances_during_outage": {"5bbf259ff136": 126}, "instances_after": {"5bbf259ff136": 142, "7cfd91ddf780": 132}}, "history": {"confirmed": 645, "stored": 645, "exact_match": true, "unique": true}, "lb_counters": {"wretr": 0, "wredis": 0, "econ": 0, "eresp": 0, "hrsp_5xx": 0}, "k6": {"requests": 6001, "rps": 100.02, "ok_rps": 100.02, "failed_ratio": 0, "dropped_iterations": 0, "p50_ms": 2.97, "p95_ms": 3.86, "p99_ms": 4.47, "exit": 0, "rate": 100}, "checks": {"action_ok": true, "load_errors_ok": true, "load_delivered": true, "lb_observed": true, "write_recovery_ok": true, "history_preserved": true, "detected": true, "target_excluded": true, "rejoined": true}, "pass": true}
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
{"label": "5bbf259ff136", "action": ["sh", "-c", "scripts/stop-one.sh && docker compose ps -a --format '{{.ID}} {{.Service}} {{.Status}}' api && { scripts/stand-usage.sh & sleep 10; wait; } && scripts/restore.sh"], "action_exit": 0, "action_seconds": 15.2, "action_finished_before_load_end": true, "lb_up_before": 2, "lb_up_min": 1, "lb_samples_missing": 0, "detection_seconds": 1.498, "rejoin_seconds": 14.99, "probe": {"attempts": 642, "failed_attempts": 0, "first_failure_s": null, "first_success_s": 0.111, "recovery_s": 0.0, "instances_before": {"7cfd91ddf780": 114, "5bbf259ff136": 119}, "instances_during_outage": {"7cfd91ddf780": 121}, "instances_after": {"7cfd91ddf780": 149, "5bbf259ff136": 124}}, "history": {"confirmed": 642, "stored": 642, "exact_match": true, "unique": true}, "lb_counters": {"wretr": 0, "wredis": 0, "econ": 0, "eresp": 0, "hrsp_5xx": 0}, "k6": {"requests": 6001, "rps": 100.02, "ok_rps": 100.02, "failed_ratio": 0, "dropped_iterations": 0, "p50_ms": 2.98, "p95_ms": 3.88, "p99_ms": 4.53, "exit": 0, "rate": 100}, "checks": {"action_ok": true, "load_errors_ok": true, "load_delivered": true, "lb_observed": true, "write_recovery_ok": true, "history_preserved": true, "detected": true, "target_excluded": true, "rejoined": true}, "pass": true}
Container mtusi2026lab3-grade4-20261105-api-1 Running
Container mtusi2026lab3-grade4-20261105-api-2 Running
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
exit: 0 elapsed_seconds: 146.608
+33
View File
@@ -0,0 +1,33 @@
date: 2026-11-05T19:32:13.471531+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ sh -ec 'make check; make validate; make lint; openspec validate --all --strict; git diff --check; test -z "$(git diff ef0b9a3 --name-only -- contracts tests README.md COURSE.md .pipeline)"; test -z "$(git diff 252e3e3 --name-only -- src scripts student-tests compose.yaml Dockerfile pyproject.toml uv.lock alembic)"; test -z "$(docker ps -aq --filter label=com.docker.compose.project=mtusi2026lab3-grade4-20261105)"; echo "PASS: runtime code unchanged since evidence SHA; normative files and pipeline unchanged; stage containers stopped"'
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
.venv/bin/python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
.venv/bin/ruff check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
All checks passed!
.venv/bin/ruff format --check src student-tests alembic scripts/probe.py scripts/limits.py scripts/scaling.py tools
108 files already formatted
.venv/bin/ty check src student-tests alembic
All checks passed!
- Validating...
✓ change/2026-11-05-adopt-sqlalchemy-alembic
✓ spec/lab1-event-publication
✓ spec/lab1-messenger-chats
✓ spec/lab1-messenger-history
✓ spec/lab1-messenger-identity
✓ spec/lab1-service-operability
✓ spec/lab2-auth-sessions
✓ spec/lab2-dependency-failures
✓ spec/lab2-history-index
✓ spec/lab2-persistent-storage
✓ spec/lab2-session-cache
✓ spec/lab3-failover-operations
✓ spec/lab3-idempotent-messages
✓ spec/lab3-load-balancing
✓ spec/lab3-scaling-cost
Totals: 15 passed, 0 failed (15 items)
PASS: runtime code unchanged since evidence SHA; normative files and pipeline unchanged; stage containers stopped
exit: 0 elapsed_seconds: 1.467
@@ -0,0 +1,6 @@
date: 2026-11-05T19:23:22.909799+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ env COMPOSE_FILE=compose.yaml:/tmp/lab3-grade4-violations.yaml docker compose config --quiet
services.deploy.replicas: can't set container_name and api as container name must be unique: invalid compose project
exit: 1 elapsed_seconds: 0.072
@@ -0,0 +1,20 @@
date: 2026-11-05T19:19:18.359240+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ env COMPOSE_FILE=compose.yaml:/tmp/lab3-grade4-violations.yaml python3 scripts/limits.py --out evidence/limits-violations.txt
Traceback (most recent call last):
File "<repo>/scripts/limits.py", line 133, in <module>
sys.exit(main())
~~~~^^
File "<repo>/scripts/limits.py", line 103, in main
config = json.loads(raw)
File "/opt/homebrew/Cellar/python@3.15/3.15.2/Frameworks/Python.framework/Versions/3.15/lib/python3.15/json/__init__.py", line 371, in loads
return _default_decoder.decode(s)
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/opt/homebrew/Cellar/python@3.15/3.15.2/Frameworks/Python.framework/Versions/3.15/lib/python3.15/json/decoder.py", line 358, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.15/3.15.2/Frameworks/Python.framework/Versions/3.15/lib/python3.15/json/decoder.py", line 376, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
exit: 1 elapsed_seconds: 0.111
+45
View File
@@ -0,0 +1,45 @@
date: 2026-11-05T19:19:26.962774+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ env API_REPLICAS=1 COMPOSE_FILE=compose.yaml:/tmp/lab3-grade4-violations.yaml python3 scripts/limits.py --out evidence/limits-violations.txt
date: 2026-11-05T19:19:27Z commit: 252e3e3
$ docker compose --profile bench config --format json (declared)
service cpus/mem ports secrets volumes networks ro
-------- ---------- ------------------------------- ------------------------------------------------------ ---------- ---------------------- -----
api -/512MiB 127.0.0.1:23998 cache_url,cursor_secret,database_url,postgres_password - backend(internal) false
k6 2/512MiB - - - edge false
lb 1/128MiB 127.0.0.1:18083,127.0.0.1:23083 - - backend(internal),edge true
migrate 0.5/256MiB - database_url - backend(internal) false
postgres 2/1024MiB - postgres_password pgdata backend(internal) false
valkey 0.5/128MiB - valkey.conf valkeydata backend(internal) false
$ docker inspect (running containers: hostname = X-Instance-Id, applied limits)
service hostname cpus memory published
-------- ------------ ---- ------- ---------------------------------------------------
api 5bbf259ff136 1 512MiB
api 7cfd91ddf780 1 512MiB
lb 4f83577b3411 1 128MiB 127.0.0.1:18083->8080/tcp,127.0.0.1:23083->8404/tcp
postgres f225c6cd77bb 2 1024MiB
valkey 5e3ed0a9a35a 0.5 128MiB
FAIL: api: no CPU or memory limit
FAIL: api: container_name prevents scaling
FAIL: api: secrets ['cache_url', 'cursor_secret', 'database_url', 'postgres_password'], policy ['cache_url', 'cursor_secret', 'database_url']
FAIL: api: publishes ['127.0.0.1:23998'] in bypass of the balancer
FAIL: api: root filesystem is writable
FAIL: 5 violation(s)
exit: 1 elapsed_seconds: 0.227
Temporary override (configuration was inspected only; never applied):
services:
api:
container_name: forbidden-scale-name
read_only: false
ports:
- "127.0.0.1:23998:8080"
secrets:
- postgres_password
deploy:
resources:
limits:
cpus: "0"
+26
View File
@@ -0,0 +1,26 @@
date: 2026-11-05T19:25:09.683166+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ sh -ec '
migration_counts="SELECT (SELECT version_num FROM alembic_version), (SELECT count(*) FROM users), (SELECT count(*) FROM sessions), (SELECT count(*) FROM chats), (SELECT count(*) FROM chat_members), (SELECT count(*) FROM messages), (SELECT count(*) FROM idempotency_keys)"
migration_before=$(docker compose exec -T postgres psql -X -At -U messenger -d messenger -c "$migration_counts")
echo "before: $migration_before"
make migrate
migration_after=$(docker compose exec -T postgres psql -X -At -U messenger -d messenger -c "$migration_counts")
echo "after: $migration_after"
test "$migration_before" = "$migration_after"
echo "PASS: Alembic head and all table counts unchanged"
docker compose ps -a --format "{{.ID}} {{.Service}} {{.Status}}"
'
before: 0002_idempotency_keys|93|92|46|92|30317|30317
docker compose run --rm migrate
Container mtusi2026lab3-grade4-20261105-postgres-1 Running
after: 0002_idempotency_keys|93|92|46|92|30317|30317
PASS: Alembic head and all table counts unchanged
96493b9901ab api Up About a minute (healthy)
dc1e7ee36921 api Up About a minute (healthy)
4f83577b3411 lb Up 9 minutes (healthy)
ad30cd539e85 migrate Exited (0) 9 minutes ago
f225c6cd77bb postgres Up 7 minutes (healthy)
5e3ed0a9a35a valkey Up 9 minutes (healthy)
exit: 0 elapsed_seconds: 2.273
+158
View File
@@ -0,0 +1,158 @@
date: 2026-11-05T19:27:51.938805+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ python3 -c 'import json,subprocess
def run(cmd):
print('"'"'$'"'"', '"'"' '"'"'.join(cmd), flush=True)
subprocess.run(cmd, check=True)
def snapshot(label):
ids=subprocess.check_output(['"'"'docker'"'"','"'"'compose'"'"','"'"'ps'"'"','"'"'-aq'"'"'],text=True).split()
raw=json.loads(subprocess.check_output(['"'"'docker'"'"','"'"'inspect'"'"',*ids],text=True))
states={c['"'"'Id'"'"']: {'"'"'service'"'"':c['"'"'Config'"'"']['"'"'Labels'"'"']['"'"'com.docker.compose.service'"'"'],'"'"'name'"'"':c['"'"'Name'"'"'],'"'"'started'"'"':c['"'"'State'"'"']['"'"'StartedAt'"'"'],'"'"'exit'"'"':c['"'"'State'"'"']['"'"'ExitCode'"'"']} for c in raw}
print(label,json.dumps(states,sort_keys=True),flush=True)
return states
run(['"'"'make'"'"','"'"'up'"'"'])
before=snapshot('"'"'before'"'"')
run(['"'"'make'"'"','"'"'test-persistence'"'"','"'"'ACTION_SCRIPT=scripts/restart.sh'"'"'])
after=snapshot('"'"'after'"'"')
assert before.keys()==after.keys()
assert len(after)==6
assert all(after[k]['"'"'started'"'"']!=before[k]['"'"'started'"'"'] for k in before)
assert {d['"'"'service'"'"'] for d in after.values()}=={'"'"'lb'"'"','"'"'api'"'"','"'"'migrate'"'"','"'"'postgres'"'"','"'"'valkey'"'"'}
print('"'"'PASS: all six container IDs preserved, every StartedAt changed'"'"',flush=True)
'
$ make up
sh scripts/secrets.sh
docker compose up -d --build --wait
#1 [internal] load local bake definitions
#1 reading from stdin 448B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 1.65kB done
#2 DONE 0.0s
#3 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
#3 DONE 0.0s
#4 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
#4 DONE 1.5s
#5 [internal] load .dockerignore
#5 transferring context: 437B done
#5 DONE 0.0s
#6 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142
#6 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 done
#6 DONE 0.0s
#7 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d
#7 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d 0.0s done
#7 DONE 0.0s
#8 [internal] load build context
#8 transferring context: 13.68kB 0.0s done
#8 DONE 0.0s
#9 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
#9 CACHED
#10 [builder 6/7] COPY src ./src
#10 CACHED
#11 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv
#11 CACHED
#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable
#12 CACHED
#13 [builder 7/7] RUN uv sync --locked --no-dev --no-editable
#13 CACHED
#14 [runtime 4/6] WORKDIR /app
#14 CACHED
#15 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv
#15 CACHED
#16 [builder 3/7] WORKDIR /build
#16 CACHED
#17 [builder 4/7] COPY pyproject.toml uv.lock README.md ./
#17 CACHED
#18 [runtime 5/6] COPY --chown=root:root alembic.ini ./
#18 CACHED
#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic
#19 CACHED
#20 exporting to image
#20 exporting layers done
#20 exporting manifest sha256:5038ad65552ef8a56c20f7f9f042205fa4f08bed2182f7d170da334d08a3bd61 done
#20 exporting config sha256:de74256583c9ad3781e5456b23c7688aa2ee86733f0d16bcd296b9112aee8335 done
#20 exporting attestation manifest sha256:b24ca6722cbe2c1512cb3d26b9933c8cf14d031282d19df5dac611093b428b28 done
#20 exporting manifest list sha256:2a9e9266ba97c082e2a9f89b71fede898269f8459fd53ff355ef0201140b59bb done
#20 naming to docker.io/library/mtusi-messenger:mtusi2026lab3-grade4-20261105 done
#20 unpacking to docker.io/library/mtusi-messenger:mtusi2026lab3-grade4-20261105 done
#20 DONE 0.1s
#21 resolving provenance for metadata file
#21 DONE 0.0s
api Built
Network mtusi2026lab3-grade4-20261105_edge Creating
Network mtusi2026lab3-grade4-20261105_edge Created
Network mtusi2026lab3-grade4-20261105_backend Creating
Network mtusi2026lab3-grade4-20261105_backend Created
Container mtusi2026lab3-grade4-20261105-postgres-1 Creating
Container mtusi2026lab3-grade4-20261105-valkey-1 Creating
Container mtusi2026lab3-grade4-20261105-lb-1 Creating
Container mtusi2026lab3-grade4-20261105-valkey-1 Created
Container mtusi2026lab3-grade4-20261105-postgres-1 Created
Container mtusi2026lab3-grade4-20261105-migrate-1 Creating
Container mtusi2026lab3-grade4-20261105-lb-1 Created
Container mtusi2026lab3-grade4-20261105-migrate-1 Created
Container mtusi2026lab3-grade4-20261105-api-2 Creating
Container mtusi2026lab3-grade4-20261105-api-1 Creating
Container mtusi2026lab3-grade4-20261105-api-1 Created
Container mtusi2026lab3-grade4-20261105-api-2 Created
Container mtusi2026lab3-grade4-20261105-postgres-1 Starting
Container mtusi2026lab3-grade4-20261105-lb-1 Starting
Container mtusi2026lab3-grade4-20261105-valkey-1 Starting
Container mtusi2026lab3-grade4-20261105-valkey-1 Started
Container mtusi2026lab3-grade4-20261105-postgres-1 Started
Container mtusi2026lab3-grade4-20261105-postgres-1 Waiting
Container mtusi2026lab3-grade4-20261105-lb-1 Started
Container mtusi2026lab3-grade4-20261105-postgres-1 Healthy
Container mtusi2026lab3-grade4-20261105-migrate-1 Starting
Container mtusi2026lab3-grade4-20261105-migrate-1 Started
Container mtusi2026lab3-grade4-20261105-migrate-1 Waiting
Container mtusi2026lab3-grade4-20261105-migrate-1 Exited
Container mtusi2026lab3-grade4-20261105-api-2 Starting
Container mtusi2026lab3-grade4-20261105-api-2 Started
Container mtusi2026lab3-grade4-20261105-api-1 Starting
Container mtusi2026lab3-grade4-20261105-api-1 Started
Container mtusi2026lab3-grade4-20261105-api-2 Waiting
Container mtusi2026lab3-grade4-20261105-api-1 Waiting
Container mtusi2026lab3-grade4-20261105-migrate-1 Waiting
Container mtusi2026lab3-grade4-20261105-postgres-1 Waiting
Container mtusi2026lab3-grade4-20261105-valkey-1 Waiting
Container mtusi2026lab3-grade4-20261105-lb-1 Waiting
Container mtusi2026lab3-grade4-20261105-valkey-1 Healthy
Container mtusi2026lab3-grade4-20261105-migrate-1 Exited
Container mtusi2026lab3-grade4-20261105-postgres-1 Healthy
Container mtusi2026lab3-grade4-20261105-api-2 Healthy
Container mtusi2026lab3-grade4-20261105-api-1 Healthy
Container mtusi2026lab3-grade4-20261105-lb-1 Healthy
scripts/lb-wait.sh
before {"223259dd6b9c465577f477f5977c48b2bb35b969b15481cc0e53a1b954e1c778": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-migrate-1", "service": "migrate", "started": "2026-11-05T19:27:55.259212054Z"}, "5e25a5e7336b8082474ed3f31c6f649d0b8743fac2104f122aeb4f866ab0bd24": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-valkey-1", "service": "valkey", "started": "2026-11-05T19:27:54.684798054Z"}, "a4eb111f811cdeae46efca08b73507c9cefd0d66675a3785f252b55949b3355b": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-api-2", "service": "api", "started": "2026-11-05T19:27:56.342284055Z"}, "a5f99d70b71582e67e83392b1d73a57fa44df9002e08c98fd13b77d3da5a04e9": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-api-1", "service": "api", "started": "2026-11-05T19:27:56.408012888Z"}, "ca4a75a9bb7163749eeaaa4a5eb64ad29b5cbea663078fe7110179dec807cfc4": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-postgres-1", "service": "postgres", "started": "2026-11-05T19:27:54.684199054Z"}, "f850f4461da336beeb05511a783d9bbdae912c8725a7fc893edeb7649becf22f": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-lb-1", "service": "lb", "started": "2026-11-05T19:27:54.683165262Z"}}
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18083"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
after {"223259dd6b9c465577f477f5977c48b2bb35b969b15481cc0e53a1b954e1c778": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-migrate-1", "service": "migrate", "started": "2026-11-05T19:28:04.468584961Z"}, "5e25a5e7336b8082474ed3f31c6f649d0b8743fac2104f122aeb4f866ab0bd24": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-valkey-1", "service": "valkey", "started": "2026-11-05T19:28:03.738892377Z"}, "a4eb111f811cdeae46efca08b73507c9cefd0d66675a3785f252b55949b3355b": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-api-2", "service": "api", "started": "2026-11-05T19:28:05.56245167Z"}, "a5f99d70b71582e67e83392b1d73a57fa44df9002e08c98fd13b77d3da5a04e9": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-api-1", "service": "api", "started": "2026-11-05T19:28:05.623476253Z"}, "ca4a75a9bb7163749eeaaa4a5eb64ad29b5cbea663078fe7110179dec807cfc4": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-postgres-1", "service": "postgres", "started": "2026-11-05T19:28:03.642625252Z"}, "f850f4461da336beeb05511a783d9bbdae912c8725a7fc893edeb7649becf22f": {"exit": 0, "name": "/mtusi2026lab3-grade4-20261105-lb-1", "service": "lb", "started": "2026-11-05T19:28:03.950735002Z"}}
PASS: all six container IDs preserved, every StartedAt changed
exit: 0 elapsed_seconds: 17.490
@@ -0,0 +1,28 @@
date: 2026-11-05T19:26:52.960353+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ python3 -c 'import datetime,json,subprocess
from pathlib import Path
line=Path('"'"'evidence/grade4-public.txt'"'"').read_text().splitlines()[0]
since=int(datetime.datetime.fromisoformat(line.split('"'"'date: '"'"')[1].split('"'"' commit:'"'"')[0]).timestamp())
until=int(datetime.datetime.now(datetime.timezone.utc).timestamp())
cmd=['"'"'docker'"'"','"'"'events'"'"','"'"'--since'"'"',str(since),'"'"'--until'"'"',str(until),'"'"'--filter'"'"','"'"'type=container'"'"','"'"'--filter'"'"','"'"'label=com.docker.compose.project=mtusi2026lab3-grade4-20261105'"'"','"'"'--format'"'"','"'"'{{json .}}'"'"']
print('"'"'$'"'"', '"'"' '"'"'.join(cmd))
events=[json.loads(s) for s in subprocess.check_output(cmd,text=True).splitlines()]
seen={}
for e in events:
if e['"'"'Action'"'"'] in ('"'"'start'"'"','"'"'stop'"'"','"'"'die'"'"','"'"'destroy'"'"'):
attrs=e['"'"'Actor'"'"']['"'"'Attributes'"'"']
service=attrs.get('"'"'com.docker.compose.service'"'"')
print(e['"'"'time'"'"'],e['"'"'Action'"'"'],service,e['"'"'Actor'"'"']['"'"'ID'"'"'][:12],attrs.get('"'"'name'"'"'))
seen.setdefault(service,set()).add(e['"'"'Action'"'"'])
assert all({'"'"'start'"'"','"'"'die'"'"'} <= seen.get(s,set()) for s in ('"'"'api'"'"','"'"'lb'"'"','"'"'postgres'"'"','"'"'valkey'"'"','"'"'migrate'"'"')),seen
print('"'"'PASS: persistence restarted lb, api, postgres, valkey and migrate; failover target is in grade4-public.txt'"'"')
'
Traceback (most recent call last):
File "<string>", line 16, in <module>
assert all({'start','die'} <= seen.get(s,set()) for s in ('api','lb','postgres','valkey','migrate')),seen
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {}
$ docker events --since 1793906711 --until 1793906812 --filter type=container --filter label=com.docker.compose.project=mtusi2026lab3-grade4-20261105 --format {{json .}}
exit: 1 elapsed_seconds: 0.077
+30
View File
@@ -0,0 +1,30 @@
date: 2026-11-05T19:25:11.998157+00:00 commit: 252e3e3ffeea5004cfd9dc342e686af1417a77a2
NO_PROXY=localhost,127.0.0.1,::1 COMPOSE_PROJECT_NAME=mtusi2026lab3-grade4-20261105 LB_HTTP_PORT=18083 LB_STATS_PORT=23083 API_REPLICAS=2
$ sh -ec 'make test; make test-persistence ACTION_SCRIPT=scripts/restart.sh; make test-failover ACTION_SCRIPT=scripts/stop-one.sh; docker compose ps -a --format "{{.ID}} {{.Service}} {{.Status}}"; make restore; make test'
python3 tests/smoke.py --base-url "http://127.0.0.1:18083"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18083"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 2.704}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
96493b9901ab api Up 19 seconds (healthy)
dc1e7ee36921 api Exited (0) 12 seconds ago
4f83577b3411 lb Up 20 seconds (healthy)
ad30cd539e85 migrate Exited (0) 19 seconds ago
f225c6cd77bb postgres Up 21 seconds (healthy)
5e3ed0a9a35a valkey Up 21 seconds (healthy)
scripts/restore.sh
Container mtusi2026lab3-grade4-20261105-api-5 Running
Container mtusi2026lab3-grade4-20261105-api-6 Starting
Container mtusi2026lab3-grade4-20261105-api-6 Started
Container mtusi2026lab3-grade4-20261105-api-6 Waiting
Container mtusi2026lab3-grade4-20261105-api-5 Waiting
Container mtusi2026lab3-grade4-20261105-api-6 Healthy
Container mtusi2026lab3-grade4-20261105-api-5 Healthy
python3 tests/smoke.py --base-url "http://127.0.0.1:18083"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
exit: 0 elapsed_seconds: 28.513

Some files were not shown because too many files have changed in this diff Show More