Skip to content

comline accept; comline add asks before accepting @unverified protocols - #89

Merged
Kinflou merged 1 commit into
mainfrom
feat/accept-unverified
Oct 20, 2026
Merged

Kinflou merged 1 commit into
mainfrom
feat/accept-unverified

Conversation

@Kinflou

@Kinflou Kinflou commented Oct 20, 2026

Copy link
Copy Markdown
Member

Follow-up to ComlineProject/core#132 (ComlineProject/runtime#18). The behaviour was agreed with the user: ask on a terminal, require a flag otherwise.

comline accept NAME[::PROTOCOL]

  • Shows what each @unverified protocol in the dependency gives up and why, skipping protocols already accepted for exactly their current set.
  • Asks Accept Ledger? [y/N] on a terminal. The default is no.
  • Without a terminal it refuses with exit code 2, naming --yes.
  • On yes, it writes accept_unverified into the dependency's entry and replaces one already there. Every other byte of config.idp stays as written. A one-line entry stays on one line.
  • Before writing, it reads the edit back with core's parser and resolves the dependency with it.

comline add used to stop at core's "accept it" error. Now:

  • it shows the same list and asks in the same way (or takes --accept-unverified);
  • it writes the acceptance into the new entry;
  • answering no writes nothing.

Tests:

  • tests/cli/accept.rs covers add refusing then accepting, an update that gives up more being accepted with accept --yes, "nothing to accept", and unknown names.
  • Unit tests cover the text edit.
  • I also drove the prompt by hand through a pseudo-terminal: n writes nothing, y writes the entry.

110 tests pass. A docs PR with the CLI reference follows.

…protocols

Both show what each protocol gives up and why, then ask on a terminal
(default no). Without one they refuse, naming the flag: --yes for accept,
--accept-unverified for add. accept writes accept_unverified into the
dependency's entry (replacing one already there), reads it back with
core's parser and resolves it before writing; add writes it into the new
entry. Accepting is never inherited or silent.
@Kinflou
Kinflou merged commit 62716fa into main Oct 20, 2026
2 checks passed
@Kinflou
Kinflou deleted the feat/accept-unverified branch October 20, 2026 08:49
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