Skip to content

One plan builds the compose project and its image; the deploy record is a dataclass - #54

Merged
Bobowski merged 1 commit into
mainfrom
source-and-record
Nov 2, 2026
Merged

Bobowski merged 1 commit into
mainfrom
source-and-record

Conversation

@Bobowski

@Bobowski Bobowski commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Intent

Write each rule of a deploy once: the image of a plan, the Dockerfile path, the compose files, and the status of an exit code. Source: the user, in the Yard audit. It replaces #49, which GitHub closed when the base branch of #49 was deleted. #48 is merged.

Found

  • apps._ready_repo, apps._ready_source, and compose.saved_project each built the image and the Dockerfile path with their own copy of the rules: split('@')[0]@<digest> two times, compose:<rev[7:19]> two times, and the yard: Dockerfile rule two times. compose.project took eight arguments, and the callers worked out the checkout themselves.
  • apps._apply and status.deploy_record each turned an exit code into a status and an error text: 0 ok, 3 reverted, any other code failed.
  • status.deploy_record returned a plain dict. The API and apps._join read it by string keys.
  • test_check_repo_debounces failed at random on main. Since The deploy container is the only deploy record and the deploy lock #47, each check runs podman ps. That call can take longer than the 50 ms window of the test.

Changed

  • compose.project(config, app, plan) takes the plan (Deployed). It picks the checkout (the clone for a repo app, the app folder otherwise), the image (compose.plan_image), the Dockerfile, and the files. Project carries image. saved_project only checks that the files are still there, then calls project.
  • status.deploy_status(code) and status.deploy_error(code, previous) hold the exit-code rule. _apply and deploy_record use them.
  • status.Record is the deploy record. Row.deploy and Page.deploy hold a Record. The JSON shapes do not change: asdict writes the same keys, and the deploy route still adds port on ok.
  • The debounce test uses a 0.5 s window.

I did not add a separate Source type. When compose.project owns the rules, the string checks that remain are each in one place.

Not done

Nothing

Proof

$ just check
...
500 passed in 60.45s

tests/server/test_compose.py checks the image and the Dockerfile of each kind through the new project. test_check_repo_debounces passed 5 runs in a row.

Questions

None

🤖 Generated with Claude Code

…is a dataclass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bobowski
Bobowski merged commit 25181de into main Nov 2, 2026
1 check passed
@Bobowski
Bobowski deleted the source-and-record branch November 2, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant