Skip to content

Zes verbeteringen: opdrachtdossier, eerlijke pauze, voorbeelden en gegevensroute - #5

Merged
parvenuprompting merged 12 commits into
mainfrom
codex/grow-kit-six-improvements
Oct 10, 2026
Merged

parvenuprompting merged 12 commits into
mainfrom
codex/grow-kit-six-improvements

Conversation

@parvenuprompting

Copy link
Copy Markdown
Owner

Wat deze branch doet

Zes verbeteringen aan Grow Kit, elk als eigen commit, plus twee reparaties die
nodig waren om ze te kunnen bewijzen.

Commit Inhoud
bfe0ea0 Slice 1 — mens-wachtstatus blokkeert vervolgstappen; PANIC vóór elke stap; shell-bewijs eist exitcode
715b78c Slice 2 — transactionele opslag (flock + atomair schrijven), bestaande logs blijven intact
ce7e81b Slice 3 — technisch bewijs, inhoudelijk oordeel en menselijke goedkeuring apart
fc7038f Slice 4 — één opdrachtpagina ("Vandaag" + "Opdrachten") en compacte navigatie (00/01/02 + Gereedschappen)
bf85b6f Pauze is geen fout — uitkomst() scheidt geslaagd / wacht_op_mens / gepauzeerd / gefaald
31f03fc Slice 5 — drie lokale voorbeeldopdrachten + één bevestiging = eindresultaat
3003836 Slice 6 — gegevensroute per opdracht, cloudtoestemming afgedwongen, documentatie gecorrigeerd
44269e0 CI — Xcode-keuze zonder kale glob

Waarom er twee reparaties tussen zitten

  1. De app bouwde niet. HomeView.swift gaf cannot pass function of type '@Sendable () async -> ()' — dezelfde fout die main sinds 16 september rood
    maakt. Dat bestand was dood bestand geworden (het Vandaag-scherm verving het) en
    is opgegaan in OpdrachtenView; daarmee is de buildbreker weg.
  2. Een pauze werd als fout gemeld. Slice 1 liet een mens-moment de motor stoppen
    — goed — maar de adapter las die stop als motor-faal met exit 2. Zes bestaande
    tests werden daardoor rood. Nu levert een pauze exit 0 met status wacht_op_mens,
    en houdt alleen echt falen exit 2.

Bewijs

  • 814 tests groen (was 790 met 6 rood), inclusief 24 nieuwe tests: uitvoeringscontroles,
    opslagtransacties, de drie voorbeelden, de gegevensroute en de cloudpoort.
  • macOS-build groen lokaal via app/build.sh (fonts ingebed, codesign OK).
    Let op: de job macos-build draait alleen op main (github.ref == 'refs/heads/main'),
    dus op deze PR wordt de Swift-build niet door CI gecontroleerd — vandaar de lokale meting.
  • Geen secrets of privépaden in de diff; de drie voorbeelden bevatten geen
    ssh/curl/http en dat is als test vastgelegd.

Zichtbaar voor de gebruiker

  • 00 Vandaag: begroeting met de gebeurtenis-variant, vier cijfers (familie, saldo,
    wacht op jou, geschiedenis) en de knowledge graph.
  • 01 Opdrachten: één dossier per opdracht — plan, grenzen, uitvoering, bewijs,
    jouw oordeel — met drie kant-en-klare voorbeelden die volledig lokaal draaien.
  • Elke opdracht toont zijn gegevensroute (lokaal / eigen VPS / cloud) en welke
    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.

- 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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T22:26:09.987585Z 44269e0 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +152 to +155
if goedgekeurd and machine_deel_voltooid(data['profiel'], log):
status = 'goedgekeurd'
voeg_gebeurtenissen_toe(log, [{'type': 'acceptatie', 'status': status,
'bewijs': toelichting, 'tijdstip': time.time()}])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread kern/growkit_route.py
Comment on lines +35 to +40
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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread kern/growkit_resultaat.py
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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.
@parvenuprompting
parvenuprompting merged commit b8633c2 into main Oct 10, 2026
3 checks passed
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