Skip to content

fix(nl): follow-ups from #1052 (nl-nora, nl-gemma) - #1111

Open
trednets wants to merge 10 commits into
tractorjuice:mainfrom
trednets:feat/nl-1052-followups
Open

trednets wants to merge 10 commits into
tractorjuice:mainfrom
trednets:feat/nl-1052-followups

Conversation

@trednets

@trednets trednets commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Follow-ups from #1052, after #952. Part of #941.

Script and tests

  • --dir is compared by name, or by identity where the file system reports inode numbers, so a differently cased path to the project on macOS is accepted. The refusal says to run the script from the project root.
  • Usage errors name the problem: --dir "", --from-xml "", a directory or /dev/null given as a file, and a second --from-xml are refused.
  • Guards that no test caught now have one: the foreign-file guard in from_local(), --force over a foreign file, the daemon flag on the download worker, one_line() on the listed titles, and the refusal of a --dir on another drive.

Commands, template and checklists

  • Both commands: a row for a usage error, keyed on argparse's usage: and error: lines, a stop case for no Python and no extract, and Success Criteria that ask for the note and the error.
  • NORA template: the kwaliteitsdoel tally and the GEMMA roll-up count Not applicable; a kernwaarde row in the roll-up has no GAP tally.
  • GEMMA checklist: an item for the absent bedrijfsfunctiemodel extract, synced to every overlay, arckit-arc42 included.
  • nl-nora guide: the review checklist covers the Vijflaagsmodel view and Section 3b. nl-overlay guide: a file that is not an extract stops the command where a required extract belongs.
  • CHANGELOG: two entries under Unreleased, Fixed.

Main is merged in (6.22.0). The one conflict was the NORA and GEMMA row in ENFORCEMENT.md, next to main's new rows.

Not in this PR

  • Indented source text as a code block in an extract. The first version took the indentation off every source line; the review showed it reworded wiki text and flattened nested lists, so it is out of this PR and stays open on NL overlay: follow-ups from the #952 review (nl-nora, nl-gemma) #1052.
  • Shared Step 0. Moving it into one reference file restructures both commands, so it is better as a PR of its own, if you want it.
  • Closing an abandoned worker's socket. The worker is a daemon thread and ends with the run, which a test now holds. Closing its socket at the deadline would mean replacing urlopen()'s connection handling, for a socket that lives at most until the run ends.
  • Test project, maintainer listing and eval case: answered on NL overlay: follow-ups from the #952 review (nl-nora, nl-gemma) #1052. The eval case follows as a PR of its own.

🤖 Generated with Claude Code

trednets and others added 4 commits November 3, 2026 14:34
…ive guards

From tractorjuice#1052, the script and its tests:

- No indented code block can form in an extract. No line wraps in one,
  so a run of blanks put the text out of sight. clean() takes the
  indentation off source lines (after removing invisible characters,
  which used to happen last), and the final pass leaves one space after
  each list or quote marker. The render test now parses each extract
  with markdown-it and fails on any code block.
- --dir is compared by identity, not by name, so a differently cased
  path to the project on macOS is accepted; the ValueError branch for
  another drive is gone with it. The refusal says to run the script
  from the project root.
- Usage errors: --dir "" is refused, a directory or /dev/null given to
  --from-dump or --from-xml is "not a regular file", and a second
  --from-xml is refused instead of replacing the first.
- Tests now catch the removal of five guards no test caught: the
  foreign-file guard in from_local(), --force over a foreign file (in
  refresh() and from_local()), the daemon flag on the download worker
  (a child process with a server that keeps trickling must exit), and
  one_line() on the listed titles.

Refs tractorjuice#941, tractorjuice#1052

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tractorjuice#1052

- Both commands: a row for a usage error (exit code 2, no status line),
  a stop case for Python not being available with no extract, and
  Success Criteria that ask for the line's note and error, as the
  quality checklist does.
- NORA template: the kwaliteitsdoel tally and the GEMMA roll-up count
  Not applicable, which the Not applicable status depends on, and the
  GEMMA roll-up's Status can be Not applicable.
- Quality checklist (GEMMA): the absence of the bedrijfsfunctiemodel
  extract is recorded. Synced to every overlay.
- nl-nora guide: the review checklist covers the Vijflaagsmodel view and
  Section 3b. nl-overlay guide: a file that is not an extract stops the
  command where a required extract belongs.

Refs tractorjuice#941, tractorjuice#1052

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main moved to 6.22.0 and added the arckit-arc42 overlay. One conflict:

- plugins/arckit-claude/docs/ENFORCEMENT.md: main's rows for supplier
  documents, independent scoring and design reviews, with this
  branch's NORA and GEMMA row (no indented code block in an extract).

sync-shared-assets.py and sync-claude-plugin-layout.py were re-run, so
arckit-arc42's quality checklist gets the GEMMA bedrijfsfunctiemodel
item. generate-site-pages.py re-dates the nl-nora and nl-overlay guides
in the sitemap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trednets trednets changed the title Feat/nl 1052 followups fix(nl): follow-ups from #1052 (nl-nora, nl-gemma) Nov 13, 2026
@tractorjuice

Copy link
Copy Markdown
Owner

Thanks for this, and for picking up every follow-up from #1052. I ran a code review over the diff. It found nine things; three I'd want looked at before this merges, and the rest are smaller. I have read the diff for the three main ones, but none of them has been reproduced by running the script, so push back on any that are wrong.

6.22.1 went out today without this PR so the review didn't hold the release. It can go in the next one.

Before merging

  1. clean() can now reword the source (nl-references.py, the new re.sub(r"^[ \t]+", "", v, flags=re.M)). Indentation comes off every source line before the wiki-bullet rewrites run. An indented literal line that starts with # or ** then reads as a numbered item or a sub-bullet. For example "code:\n # not a list\n ** not bullet" would come out as a numbered item and a bullet, where before the # was escaped. clean() is documented as never rewording the text.

  2. Nested lists written with indentation are flattened. The same line turns "- hoofdpunt\n - subpunt\n - detail" into three top-level bullets. GEMMA's ArchiMate doc and Toelichting fields use that form, so the extract would misstate the source's structure. Only the code-block case needs neutralising (four or more columns with no list parent); one to three columns, or indentation under a list item, was harmless.

  3. inside() decides the write guard by os.path.samefile() alone. On a volume that reports no inode numbers (some FUSE, network and exFAT mounts, mostly on Windows), samefile can be true for unrelated directories, so a --dir outside the project could be accepted where the old commonpath check refused it. The commands pre-approve this script with any arguments, so the guard matters. Requiring the name check or the identity check, with a non-zero inode, would close it.

Smaller

  1. Extracts already on disk keep the old problem. refresh() returns current when the live version equals the stamp, so an extract fetched before this PR is not rewritten, and GEMMA's version rarely changes. Nothing tells the user to run --force. A line in the CHANGELOG entry or the commands would do, or a format marker in the stamp.

  2. --from-xml "" is silently treated as not given. With MODEL unset, --from-xml "$MODEL" falls through to a live fetch and an origin: api extract with no error. --dir "" and --from-dump "" both error now.

  3. The new "no status line, exit code 2" row in nl-nora.md and nl-gemma.md also matches Python's own exit 2 when the script file is missing. The model would then report a usage error and never reach the "script is missing" guidance. Keying the row on argparse's usage: / error: text avoids it.

  4. The GEMMA roll-up table in nl-nora-template.md is now headed as a GAP tally and offers "Not applicable", but it also holds Kernwaarde rows, which have no GAP tally and are only At risk or On track. Same in the .arckit/templates/ copy.

  5. assert_renders_as_text() hard-imports markdown_it. Without the test extras every caller fails with ModuleNotFoundError. test_site_pages.py uses pytest.importorskip for the same dependency.

  6. HEADING_START's comment is stale. It still describes indentation before #, which clean() now removes first, so the ([ \t]*) group no longer matches anything from the source.

Happy to look again whenever you've had a chance. If you'd rather I made the changes for 1 to 3 on your branch, say so.

🤖 Review run with Claude Code

trednets and others added 2 commits November 20, 2026 14:45
- Take the indentation change out of nl-references.py: it reworded an
  indented wiki `#` or `**` and flattened nested lists. clean(),
  escape_containers() and neutralise() are back as on main, and the
  planted cases and markdown-it check that came with the change are gone.
  Keeping indented source text from rendering as a code block moves to a
  follow-up issue.
- `--dir` is accepted by name, or by identity only where the file system
  reports inode numbers.
- An empty `--from-xml` is a usage error, like `--dir` and `--from-dump`.
- The usage-error row in nl-nora and nl-gemma is keyed on argparse's
  `usage:` and `error:` lines: Python also exits with 2 when the script is
  missing, and that case belongs to the missing-script guidance.
- GEMMA roll-up placeholders: no GAP tally for a kernwaarde, and Not
  applicable for a kwaliteitsdoel only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review fix for --dir brings back the branch for paths on two drives,
which commonpath() refuses on Windows; this test covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trednets

Copy link
Copy Markdown
Contributor Author

Thanks for the review. All nine are handled in f3c73cc and 1de32bb:

  • 1 and 2, and with them 4, 8 and 9: I took the indentation change out. Keeping nesting without letting a code block form needs more than a reordering, so clean(), escape_containers() and neutralise() are back as on main. The Indented code item stays open on NL overlay: follow-ups from the #952 review (nl-nora, nl-gemma) #1052, with your points added there. Neither source has an indented line today.
  • 3: --dir is accepted by name, or by identity only where the file system reports inode numbers. Tests fake a volume without them, and a path on another drive.
  • 5: an empty --from-xml is a usage error now.
  • 6: the row is keyed on argparse's usage: and error: lines.
  • 7: the roll-up row shows — in the tally for a kernwaarde, and Not applicable for a kwaliteitsdoel only.

Ready for another look.

trednets and others added 4 commits November 20, 2026 16:01
GitHub did not update tractorjuice#1111 after the push of f3c73cc and 1de32bb.
This commit changes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The GEMMA checklist item reaches arckit-uk-food, the overlay main added:
  CI's shared-asset drift check failed on its copy.
- The two NORA and GEMMA entries go back under Unreleased: the merge put
  them in 6.22.1, which shipped without them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in 6.25.0 and 6.26.0. CHANGELOG: our two NL entries stay
under Unreleased / Fixed, ahead of main's three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants