Repository navigation
Zes verbeteringen: opdrachtdossier, eerlijke pauze, voorbeelden en gegevensroute - #5
Conversation
- kern/growkit_opdrachten.py + adapter commando 'opdrachten': blijvend dossier per opdracht met bevestigd plan (plan_hash), uitvoerslot, wachtende mens-stappen, oordeel en PANIC/herstel; 4 gerichte tests. - OpdrachtenView: lijst links, dossier rechts (plan, grenzen, bewijs, oordeel, geschiedenis). In de stand Vandaag staat het dagoverzicht erboven: begroeting met ZT-3-variant, vier cijfers (familie, saldo, wacht op jou, geschiedenis) en de knowledge graph. HomeView is hierin opgegaan en daarna verwijderd. - Zijbalk: 00 Vandaag, 01 Opdrachten, 02 Bibliotheek + Gereedschappen; nummering strikt oplopend (geen dubbele nummers meer). - HomeView verwijderd: dat bestand was de enige echte buildbreker (await MainActor.run met een await erin). macOS-build en de volledige testsuite draaien weer. - IMPLEMENTATION_PROGRESS.md bijgewerkt voor slice 4.
- kern/growkit_motor: uitkomst() names the outcome of a run (geslaagd | wacht_op_mens | gepauzeerd | gefaald) and machine_deel_voltooid() tells whether only a human step is still open. voer_uit keeps its bool but the docstring now says what False means: stopped before a human moment, on PANIC or after a failed step. - adapter (plant, hervat), loop.py (plant, hervat) and seed.py: a pause returns ok with status wacht_op_mens and exit 0; PANIC gets its own message; a real failure keeps exit 2 (failcontract). When the human step is last, the tree is still completed and registered — the machine part is done. - tests: 4 new guard tests (pause vs failure vs PANIC vs mid-plan stop). Full suite: 794 tests green (was 790 with 6 red).
- profielen/{projectcontrole,documentenoverzicht,terugkerend-rapport}: three
example plans with templates. Each ends in a human step; every command stays on
this machine (no ssh/curl/http), so the demo needs no VPS and no key.
- kern/growkit_voorbeelden.py: one source for the example list (each profile
carries its own voorbeeld block) plus a testable 'no external calls' rule.
- adapter: new action 'opdrachten actie=voorbeelden'.
- kern/growkit_opdrachten.beoordeel: approving the final human step when no
machine work is left makes the opdracht 'goedgekeurd' with an acceptance entry,
instead of sending the user through a second restart round.
- app: the three examples show under OPDRACHTEN with plan size and how often you
decide; one click opens the plan, then you confirm.
- tests: 8 new (contract, real execution of all three, reject -> herziening_nodig,
adapter action). Full suite 802 green; macOS build green.
- kern/growkit_route.py: derive per plan whether anything leaves the machine (lokaal | eigen_vps | cloud) from the commands; a profile may declare it, and a declaration lighter than the commands wins the heaviest route plus a warning. - kern/growkit_opdrachten: dossiers store the route and a cloud consent flag; uitvoeren refuses a cloud opdracht without explicit consent; toestemming() records the decision (grant or withdraw) in the history, with a reason. - adapter: action 'opdrachten actie=toestemming'. - all profiles declare 'lokaal'; the three examples are marked demo -> € 0. - app: dossiers show the route, its explanation and the exact lines that would leave the machine; cloud keeps the run button shut until you give a reason. - README: tests badge 701 -> 802, privacy badge '100% local' -> 'lokaal eerst' with a link to the new 'Wat verlaat je machine?' section, screen table to the new numbering, a one-minute first-opdracht flow, and honest counts. - tests: 12 new (route derivation, mismatch warning, cloud gate, consent history, adapter action). Full suite 814 green; macOS build green.
The step passed the glob /Applications/Xcode_16*.app straight to xcode-select, so the shell expanded it and handed over one unusable argument; the runner logged 'xcode-select: error: invalid argument' and only survived because of the ||. Now the newest Xcode_16*-bundle that actually has Contents/Developer is chosen, with an explicit fallback. Job label updated to 814 tests.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44269e0d3c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if goedgekeurd and machine_deel_voltooid(data['profiel'], log): | ||
| status = 'goedgekeurd' | ||
| voeg_gebeurtenissen_toe(log, [{'type': 'acceptatie', 'status': status, | ||
| 'bewijs': toelichting, 'tijdstip': time.time()}]) |
There was a problem hiding this comment.
Keep later human steps pending before approving
When a plan has two consecutive human steps after its machine work, execution stops at the first one, but approving it makes machine_deel_voltooid(...) true because that helper ignores all human steps. The dossier is therefore marked goedgekeurd while the second required human step is still nog_niet_uitgevoerd; verify that no later plan step remains before recording final approval.
Useful? React with 👍 / 👎.
| teksten = [tekst for _, tekst in _teksten(profiel)] | ||
| if any(signaal in tekst for tekst in teksten for signaal in _CLOUD): | ||
| return "cloud" | ||
| if any(signaal in tekst for tekst in teksten for signaal in _EIGEN_VPS): | ||
| return "eigen_vps" | ||
| return "lokaal" |
There was a problem hiding this comment.
Require consent for unrecognized outbound commands
The cloud gate relies on this small substring allowlist, so valid outbound commands such as nc host 443 < data, a Python socket client, or other network-capable tools are classified as lokaal. If a profile is missing or understates its declaration, uitvoeren() consequently skips cloud consent and the UI claims nothing leaves the machine even though the command transmits data; arbitrary shell commands need a conservative policy rather than treating every unrecognized command as local.
Useful? React with 👍 / 👎.
| return {'criteria': profiel.get('acceptatiecriteria', []), 'stappen': stappen, | ||
| 'technisch_gecontroleerd': bool(technische_stappen) and all(s['technisch'] == 'geslaagd' for s in technische_stappen), | ||
| 'inhoudelijk_beoordeeld': bool(stappen) and all(s['inhoudelijk'] == 'geslaagd' for s in stappen), | ||
| 'mens_goedgekeurd': bool(stappen) and all(s['mens'] == 'geratificeerd' for s in stappen), |
There was a problem hiding this comment.
Include final acceptance in the human-approval result
For every normal mixed plan, machine steps retain mens == "niet_goedgekeurd", so this all(...) remains false even after beoordeel() records a final acceptatie entry and changes the dossier to goedgekeurd. Because acceptance entries have no stap, they are ignored while constructing stappen, causing bewijsrapport and its adapter endpoint to report mens_goedgekeurd: false for an actually approved result.
Useful? React with 👍 / 👎.
- growkit_opdrachten.uitvoeren: the outcome now comes from uitkomst() — resultaat | wacht_op_mens | gepauzeerd | gefaald. Every stop that was not a ratification used to be called 'gepauzeerd'; a failed step is now visible. - OpdrachtenView: 'gefaald' shows the run button again, so retrying is possible. - growkit_route: signals extended (git push/clone/fetch, pip/npm install, nc, ftp, urllib, requests), matched case-insensitively with word boundaries (\bssh\b), so 'sync', 'ncat' and 'curling' stay local. The 'lokaal' explanation now says it is a check on the plan, not a guarantee. - growkit_motor: PANIC text during a running command made precise. - ci: job name 'Tests (unittest)'. - tests: +4 (failed step -> gefaald including retry, twelve network signals, case insensitivity, word boundaries). Full suite 818 green; macOS build green.
Two words added to the cloud signals; the word-boundary test no longer claims ncat is local (it is a network tool — my earlier assumption was wrong).
799 in CI (Linux); 818 on macOS — the 19 Digitale-Kloon tests need the macOS Keychain, so CI skips them per class and never counts them.
Wat deze branch doet
Zes verbeteringen aan Grow Kit, elk als eigen commit, plus twee reparaties die
nodig waren om ze te kunnen bewijzen.
bfe0ea0715b78cce7e81bfc7038fbf85b6fuitkomst()scheidt geslaagd / wacht_op_mens / gepauzeerd / gefaald31f03fc300383644269e0Waarom er twee reparaties tussen zitten
HomeView.swiftgafcannot pass function of type '@Sendable () async -> ()'— dezelfde fout die main sinds 16 september roodmaakt. Dat bestand was dood bestand geworden (het Vandaag-scherm verving het) en
is opgegaan in
OpdrachtenView; daarmee is de buildbreker weg.— goed — maar de adapter las die stop als
motor-faalmet exit 2. Zes bestaandetests werden daardoor rood. Nu levert een pauze exit 0 met status
wacht_op_mens,en houdt alleen echt falen exit 2.
Bewijs
opslagtransacties, de drie voorbeelden, de gegevensroute en de cloudpoort.
app/build.sh(fonts ingebed, codesign OK).Let op: de job
macos-builddraait alleen opmain(github.ref == 'refs/heads/main'),dus op deze PR wordt de Swift-build niet door CI gecontroleerd — vandaar de lokale meting.
ssh/curl/httpen dat is als test vastgelegd.Zichtbaar voor de gebruiker
wacht op jou, geschiedenis) en de knowledge graph.
jouw oordeel — met drie kant-en-klare voorbeelden die volledig lokaal draaien.
regels de machine zouden verlaten; cloud start pas na expliciete toestemming met reden.
Documentatie
README gecorrigeerd: tests-badge 701 → 802, privacy-badge "100% local" → "lokaal
eerst" met een nieuwe sectie Wat verlaat je machine?, schermentabel naar de nieuwe
nummering, een één-minuut-route naar je eerste opdracht, en correcte tellingen.