You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d8a2186
Browse filesBrowse the repository at this point in the historyBrowse files
**Moving around.** Drag a box to arrange the map; it stays where you put it, for this repository on
78
95
this computer. Drag empty space to move. <kbd>Ctrl</kbd>/<kbd>⌘</kbd> with the mouse wheel, or **−**
79
96
and **+**, zooms. **Fit** shows everything; **Tidy** lines the boxes up in their lanes. **List** shows
80
97
every part and how it stands; **Library** opens the library.
81
98
82
99
**Connecting boxes.** Drag a box's dot onto another box, or click the dot and then the other box.
83
100
Select a line to see the file that shows the connection, its [contract](#contracts-on-connections),
84
-
**Go to** either end, or **Remove this connection**.
101
+
**Go to** either end, or **Remove this connection**. Each line is named by what it carries, such as
102
+
*HTTP*, *SQL* or *Sign-in*, where the name covers no box and no other name; when a busy corner leaves
103
+
no room for it, point at the line or select it to read its name.
85
104
86
105
**Read again** reads the repository afresh, for example after you changed files outside AlbertCode.
87
106
@@ -322,7 +341,7 @@ one starts:
322
341
| Kind | What it is |
323
342
|---|---|
324
343
|**The app**| The app itself, running: each part answers, and the front end reaches the API. Nothing else yet |
325
-
|**Service**| One service the app uses (a database, sign-in…), added through its adapter. A database must answer AlbertCode's check; an outside service answers through its stand-in |
344
+
|**Service**| One service the app uses (a database, sign-in…), added through its adapter. A database must answer AlbertCode's check; a Redis the runtime runs itself in Development is proven by its answer, with nothing to connect; an outside service answers through its stand-in |
326
345
|**First feature**| The smallest real flow the product has, on the app and its services |
327
346
|**Feature**| Each other feature, in order |
328
347
|**Outside service**| Each outside service (payments, email…) made real: until then the app uses a stand-in |
@@ -347,8 +366,9 @@ its health route and the environment variables it is configured by (names only).
347
366
-**The app**: each part's skeleton in the framework's own layout, starting and answering its health
348
367
route, with a test for it, and the front end reaching the API. *Nothing else yet.*
349
368
-**A service**: that one service added to the part that uses it, through an adapter configured by its
350
-
environment variables, with a stand-in for tests. A database also gets its migration set up, with no
351
-
tables until a feature needs one. *No feature uses it yet.*
369
+
environment variables, with a stand-in for tests. A database with tables (PostgreSQL, MySQL, SQLite
370
+
and the like) also gets its migration set up, with no tables until a feature needs one; a cache or a
371
+
queue such as Redis has none to set up. *No feature uses it yet.*
352
372
-**A feature**: the requirement, the journey, how to tell it works, its endpoints and the data it
353
373
keeps (with a migration), built on the parts already in place, and a browser test titled `[R1] …`
354
374
that walks the journey.
@@ -465,10 +485,18 @@ repairs it (*repair 1 of 3*), you accept the fix, and it passes: **Build queue
465
485
runner, or a browser to run the tests in. The verification stops here, before starting anything, and
466
486
lists each one with what installs it (`npm install` in `web/`, for example) and an **Install** button.
467
487
Installing fetches from the network and runs what it fetches, so it is always your click. This is not
468
-
a failure of the code: press **Install** on each, then **Verify again**.
469
-
3.**Start the app**: every part the slice needs, through the [runtime](#run-every-part).
488
+
a failure of the code: press **Install** on each, then **Verify again**. A browser the tests could
489
+
not start is found here too, even after the app has started: Playwright's own was never downloaded,
490
+
and the tests do not use the Chrome, Edge or Chromium AlbertCode found on the computer (it names it in
491
+
`PW_CHROMIUM_PATH`, which each slice's request asks the tests to use).
492
+
3.**Start the app**: every part the slice needs, through the [runtime](#run-every-part). A service
493
+
connected on the map that does not answer where it is (a database that is down, say) stops it here:
494
+
the slice asks you to start it or change its connection, and is never sent to Albert to repair.
470
495
4.**Each part answers its health route**.
471
-
5.**Check each connected service**.
496
+
5.**Check each connected service**, each named with what it answered (*Database: Signed in · 4
497
+
tables · read-only query answered*), and each one the runtime runs itself: in Development, with
498
+
`redis-server` installed and no Redis connected on the map, the runtime's own Redis answering is
499
+
the check (*Cache and job queue, run here: PING answered*), and there is nothing to connect.
472
500
6.**Walk every journey in a browser**: the browser tests titled `[R…]` for this slice and the ones
473
501
before it, at the app's one address. **The app** and a **Service** have no journey of their own, so
474
502
their verification ends at step 5 (and needs no browser test runner); each feature walks its own.
@@ -501,8 +529,10 @@ the code holds, a verification of the code as it is now, and what the runtime se
501
529
Only **Verified** is green, and only on evidence about the code as it is now. Change the code and earlier
502
530
evidence is out of date: green parts go back to **Connected** (if the runtime still finds them answering)
503
531
or **Built** until a slice through them is verified again; red clears the same way. An outside service
504
-
that Albert uses a stand-in for stays **Built** until its own slice connects the real one. Select a part
505
-
or a connection to read why it has its status. Parts no feature needs show their check, as before.
532
+
that Albert uses a stand-in for stays **Built** until its own slice connects the real one. A line to a
533
+
part a later slice builds (the API's line to CI, say) waits for that slice, and does not hold back the
534
+
parts and features verified before it. Select a part or a connection to read why it has its status.
535
+
Parts no feature needs show their check, as before.
506
536
507
537
**Example.** In the notes app, *The app runs* passes: Web app and API turn **Connected**, because they
508
538
answer but no journey has gone through them yet. *Add SQLite* passes: SQLite turns **Connected** too.
@@ -594,9 +624,31 @@ that reloads by itself.
594
624
-**Recovery.** A part that stops by itself is started again after 2, 5 and 10 seconds: at most three
595
625
times in ten minutes, then it is left stopped with the reason. A dev server that reloads after a bad
596
626
edit is not restarted: it answers again once the code is fixed.
627
+
-**Started again, never twice.** Pressing **Start all** while the app runs leaves alone each part
628
+
that works and still has the right addresses. A part that runs but does not work, or that started
629
+
before a service it uses was connected on the map (or before a part it reaches moved to another
630
+
port), is stopped and started again in its place, never beside itself. So is a part whose code has
631
+
changed since it started and that does not reload by itself: a Celery worker, a `start` script or a
632
+
command of your own (dev servers such as `next dev`, `vite`, `uvicorn --reload`, Flask in debug mode
633
+
and Django's `runserver` reload by themselves). A verification does the same before it checks
634
+
anything, so no part is judged by an address it was never given, or by code it is not running. Its
635
+
log says why:
636
+
637
+
```text
638
+
API Starting it again: what it reaches has changed since it started
639
+
API $ python3 -m uvicorn main:app --host 127.0.0.1 --port 8000 --reload (in api)
640
+
API INFO: Application startup complete.
641
+
```
597
642
-**Install packages.** A part whose packages are missing says so before it starts, with the exact
598
643
command: **Install packages** runs it (`npm install` or your package manager; for Python, a `.venv`
599
-
and `pip install`). A failed install says why, for example a network that needs a proxy.
644
+
and `pip install`). A failed install says why, for example a network that needs a proxy. For a
645
+
Python part, every package its `requirements.txt` (or `pyproject.toml`) lists is checked, not only
646
+
its framework, so a package added in a later step is found before the part starts:
647
+
648
+
```text
649
+
Workers Its packages are not installed
650
+
Declared in its project but not installed: redis. Install packages runs it for you.
651
+
```
600
652
-**Logs.** The **Log** section shows what every part prints, or one part's, with errors marked. Keys
601
653
are masked. **Its log** on a part jumps to it.
602
654
-**Fix with Albert** on a part that fails sends Albert how it was started, what it printed and what
Copy file name to clipboardExpand all lines: docs/troubleshooting.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,10 +66,13 @@ Everything an installer run did is written to its log:
66
66
|**Install packages** fails with a certificate or network error | Your network needs a proxy or its own certificates. Set `HTTPS_PROXY` (and `SSL_CERT_FILE`, `PIP_CERT` or `NODE_EXTRA_CA_CERTS` if your company gives you a certificate) in your terminal, run `albertcode stop`, then start `albertcode --ui` from that terminal. |
67
67
| A database in `docker-compose.yml` is not started | AlbertCode does not start containers. Run `docker compose up -d` yourself, then **Connect** the database on the map: its check decides when it is up. |
68
68
| Redis says it cannot be started | Install Redis (`redis-server`) and press **Start all** again, or connect a Redis you already run on the map. |
69
+
| A part does not use a service you just connected | It was started before the connection. Press **Start all**: each part started before it is started again with the service's address (a verification does this for you). |
69
70
| A part is **Running** but not **Healthy**| Nothing proves it works: give it a health route (`/health`) or, for a worker, a ready line it prints, in **How it runs**. |
70
71
| A part is **Unhealthy** right after a change | Its code fails to load: read its log in **Operate** → **Run**, or press **Fix with Albert** on it. The dev server picks up the fix by itself. |
71
72
| A part **Crashed** and stays stopped | It stopped three times within ten minutes. Read its log, fix the cause, then **Start**. |
72
73
| The app's address keeps showing *Starting…*| A part is still starting or waiting for a part it needs. **Operate** → **Run** says which, and why. |
74
+
|**Verify** stops at *Install what the app needs: A browser for the tests*, though Chrome, Edge or Chromium is installed | The browser tests were started without a browser of Playwright's own, and your `playwright.config.ts` does not use the one AlbertCode found. Under `use`, add `launchOptions: process.env.PW_CHROMIUM_PATH ? { executablePath: process.env.PW_CHROMIUM_PATH } : {}` (new slices ask Albert for it), or press **Install** to download Playwright's own Chromium. Nothing in the app is repaired for it. |
75
+
|**Verify** stops at *Start the app* or *Check each connected service*: a service *is not answering where it is connected*| A service you connected on the map (your database, say) is down, or not where its connection says. Start it, or change its connection on the map: once its check passes, **Verify** again. Nothing in the app is repaired for it. |
73
76
|**Verify** fails at *Walk every journey*: no browser test walks [R1] yet | The slice needs a browser test titled `[R1] …`. Build the slice (its request asks for one), or **Add a test** on the Requirements page. |
74
77
| The **Build** stage says *the code has changed since*| The last verification was of older code. Press **Verify** again. |
75
78
|**Roll back** says there is no checkpoint yet | A checkpoint is kept each time a slice passes its verification, and only in a Git repository. Run `git init` and commit, then verify a slice. |
0 commit comments