Repository navigation
docs(ns8-module): fix start, clone, secrets, events - #33
Conversation
Several patterns in the skill did not match core or current modules. try-restart in configure-module never starts a stopped unit, clone copies state and volumes by rsync, and modules keep secrets under state/secrets/. Add a section on routes, ports and firewall.
Drop patterns taken from a single module (per-component secrets, UNITS array, clone replace branch). Never restore lets_encrypt on restore or clone, compare env booleans case-insensitively, and default http2https to true.
|
I checked every pattern against the 32 NethServer modules, not just a few, and kept only what is generic. I removed what came from one or two modules: per-component files under state/secrets/, the UNITS array, and the clone replace branch. The secret rule is back to the generic one: a 0600 file under state/, never set_env. The file name is free. I also added two rules. Restore, clone and move must pass lets_encrypt False, because DNS may not point to the new node yet and set_route checks the certificate by default, so the whole restore fails. And http2https defaults to true, with a UI toggle only when the app must serve plain HTTP. The restore snippet now reads booleans with .lower() == "true" and uses .get() with a default for fields older backups may lack. |
The replica is read-only and agents listen to events on their local replica, which the leader feeds.
DavidePrincipi
left a comment
There was a problem hiding this comment.
Try to keep skill as lean as possible. Advices and code snippets should go to the dev's manual.
|
Thanks. I trimmed the prose everywhere in this PR. I kept the rules in the skill, though. The agent never reads the dev's manual unless the skill tells it to, and the user who drives it won't read it either. So a rule that lives only in the manual changes nothing in what the agent does. Snippets stay too, since the agent copies them instead of guessing the API. Let me know if some parts still read as advice. |
Co-authored-by: Davide Principi <davide.principi@nethesis.it>
Co-authored-by: Davide Principi <davide.principi@nethesis.it>
DavidePrincipi
left a comment
There was a problem hiding this comment.
Thanks, the PR is accurate: I checked each claim against ns8-core and the module repos. The inline suggestions are small cuts and fixes, mostly to keep the skill lean.
|
Thanks for the fixes. Wrong statements like try-restart, the fresh-DB clone and Renovate translations are worth correcting. My concern is the direction. The skill grows by 57 lines, and most of the new content repeats the dev's manual. I'd keep the skill concise and task-oriented, pointing to the manual rather than replacing it. Copies go stale: this PR had to fix older copied statements. I agree the agent won't read the manual unless the skill tells it to. A pointer is enough for that, it does not need a copy. Proposal: replace each of these with a one-line rule plus a link.
Keep a rule in the skill only for a pitfall agents really hit, like try-restart in configure-module or Let's Encrypt on restore and clone. Publishing an event from Python is missing from the manual. Let's add it there with a PR to ns8-core, then link it from the skill. This can go in a follow-up PR, so this one can merge with the fixes. |
|
Thanks, I agree on the direction. Before switching to links I checked those pages against the code. Some statements are wrong: random ports, the I opened NethServer/ns8-core#1428 to fix them and to document event publishing from Python. Once it is merged, I'll cut the skill down to one-line rules plus links in a follow-up PR. Can we merge this one with the fixes? |
I checked the ns8-module skill against ns8-core and the 32 NethServer modules. I kept only generic patterns.
Main fixes:
I kept the prose short: one line per rule, with the reason in a few words. Cleanup of older text can go in a separate PR.