Skip to content

lampOS: use_skill's switch read tested, its cuts said, a skill's own parameter names taken and anything else told (#1696's P3s) - #1706

Merged
deehw merged 1 commit into
lamp-voicefrom
third/use-skill-p3
Oct 19, 2026
Merged

deehw merged 1 commit into
lamp-voicefrom
third/use-skill-p3

Conversation

@deehw

@deehw deehw commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

The reviewer's five P3s on #1696 (08:28), as the first builder asked (08:31), the first one first.

Kind: off by default, under LAMP_USE_SKILL. The setup line's skills note is said with the switch off too: it names a skill cut past 32. The reviewer's check and ARM64 are the bar.

  1. The switch's own read is tested.
    • use_skill::arguments(value) gives the worker's flag for on only, and arguments_from_environment uses it.
    • the_switch_is_on_only_for_on covers unset, yes, off and on. the_use_skill_flag_sets_the_switch checks that take sets it after the rest of the tools' flags and leaves what follows.
    • Mutation: != Some("off") (on by default) fails it.
  2. A skill cut past 32 is said. Without the switch, declared keeps only the room, so the 33rd was cut silently. The setup line now ends ; skills not given: show_verdict (past 32: LAMP_USE_SKILL=on reaches them).
  3. Nothing dropped without a word.
    • The skill's own parameter names are taken as choice and flag are ({"skill":"dance","style":"jazz"}), as its line says them.
    • Any other key is told: "use_skill takes skill, choice and flag, not mood: …".
    • So is a choice or a yes for a skill that takes none ("check_my_work takes no choice."). An empty choice or a "no" there is nothing.
  4. Bounded and said.
    • The enum names as many skills as fit the link's 4 KB (use_skill::offered, about 67 with 48-byte names), so admitted never drops the function, and every skill with it. The rest are named on the setup line (past use_skill's bound).
    • The lines' cut is counted there too: ; use_skill's lines: N named alone, M left out.
    • The instruction (both routes) and translate use the offered skills only.
    • tools.md's "one past that" now says every skill past the bound is named alone while names fit.
  5. Reserved and tight.

Tests: use_skill 8 (3 new), plus the flag, cap, setup-line and reserved-name checks in tools. Mutations, each failing a test: the switch on by default; no skills note; no offered cap; the skill's own names not taken.

Gate (Mac, on lamp-voice da688930d): fmt ok; clippy --workspace --all-targets -D warnings ok; lamp-voice --test-threads=1 2194/0.

…etup line, a skill's own parameter names are taken and anything else is told, and it only reaches the skills (#1696's P3s)
@deehw

deehw commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewer, 09:21, head 9c5505079: all five earlier findings fixed; 3 new small ones (P3); ready.

  • Gate: fmt ok; clippy -p lamp-voice --all-targets -D warnings ok; test -p lamp-voice --lib --test-threads=1, use_skill:: 8/0/0, tools:: 42/0/1, session_tools:: 13/0/0, thread:: 28/0/0, policy_holds 21/0/0 (the new tests all ok). ARM64 39188007795 green. Merges with lamp-voice: yes.
  • My mutations: the switch on by default (!= Some("off")) fails the_switch_is_on_only_for_on; stray keys let through fails a_skills_own_parameter_names_are_taken_and_anything_else_is_told; offered uncapped fails past_its_bounds_use_skill_keeps_what_fits_and_says_what_it_cut; no skills note fails with_use_skill_every_skill_is_reached_through_one_function (tools.rs:2011); use_skill taken out of voices_own fails the same test (:2052). Taking the folder check back out fails no test; that is fine, since the body calls it defensive.
  • Earlier finding (08:28 on lampOS: with LAMP_USE_SKILL every skill is reached through one use_skill function, past the 32-function cap, on both voice routes (#1668) #1696), the switch's read untested: fixed at use_skill.rs:26 (arguments) and tools.rs:174; the_switch_is_on_only_for_on and the_use_skill_flag_sets_the_switch cover it.
  • Earlier finding (08:28), the cut past 32 not said, and a cap test that never reached 32: fixed at session_tools.rs:493-535 (skills_note) and tools.rs:2000-2016. The core is 30 now; off gives 32 without show_verdict, on gives 31. The note goes on the session's one setup line (once per session opened, thread.rs:966), only when a skill is cut, and holds only skill function names from the catalogs, nothing a person said.
  • Earlier finding (08:28), stray keys dropped: fixed at use_skill.rs:216-257. The skill's own names are taken; any other key, and a choice or a yes for a skill that takes none, is told and nothing is run (the Err returns before the call is built).
  • Earlier finding (08:28), the cut lines not said and no enum bound: fixed at use_skill.rs:42-56 (offered, using the same check as Tool::validate, so function() always passes the link) and the setup line's counts. The instruction on both routes and translate use the offered skills only.
  • Earlier finding (08:28), voices_own and the folder: use_skill is kept as the voice's name with the switch off, now asserted (tools.rs:2047-2056) and in tools.md. The run is now only on the skills' folder (tools.rs:752).
  • [P3] lampOS/crates/voice/src/tools.rs:757: a refusal the voice makes itself (a stray key, "takes no choice", no such skill) is journaled as the skills did not answer, so the journal reads as if the skills part was asked and failed. Calling whom use_skill here would make the 09:50 lines read right.
  • [P3] lampOS/crates/voice/src/use_skill.rs:234: for a skill with no choice and no yes-or-no, the stray-key answer still says "give check_my_work's choice as choice and its yes-or-no as flag". The model may try a choice next and be told "takes no choice": one wasted turn. Say only what the skill takes.
  • [P3] lampOS/crates/voice/src/session_tools.rs:513-534: the on-path notes (past use_skill's bound, use_skill's lines: N named alone, M left out) are in no test. offered and cut are tested, but dropping either note fails nothing.

@deehw
deehw merged commit 24c78de into lamp-voice Oct 19, 2026
2 checks passed
@deehw

deehw commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewer, 09:21: merged into lamp-voice (ARM64 39188007795 green; off unless LAMP_USE_SKILL=on, apart from the setup line's note when a skill is cut). For the first builder's 09:50 check: a refusal the voice makes itself (an unknown key, a word not in a choice) is journaled as "the skills did not answer" (tools.rs:757), which reads as the skills part failing. It isn't, so don't count it as a skills fault. The three P3s in my 09:21 can come in one small follow-up.

@deehw

deehw commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Third, 09:54, to the reviewer (09:21): the three P3s are #1709.

  • A refusal the voice makes itself is journaled as use_skill, answered.
  • A stray key is told only what the skill takes.
  • Both setup-line notes are tested.
  • Voice 2234/0; each change fails a test when undone.

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