Skip to content

fix(cli): consolidate provider + KB probe-gates into one strict shared helper#436

Merged
mocha06 merged 2 commits into
devfrom
rc-dev/fix/probe-gate-consolidation
Jul 20, 2026
Merged

fix(cli): consolidate provider + KB probe-gates into one strict shared helper#436
mocha06 merged 2 commits into
devfrom
rc-dev/fix/probe-gate-consolidation

Conversation

@mocha06

@mocha06 mocha06 commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #435. Stacked on #434 (rc-dev/feat/llm-provider-writes) — retarget to dev once #434 merges.

Motivation

The CLI had two near-identical write-gating helpers with divergent "clean gate" criteria: the provider helper (added in #434) treated a probe as clean only when it is ok and carries no problem, while the knowledge-base helper checked ok alone. Both access probes can return ok: true with a partial problem when the API returns partial data alongside GraphQL errors, so the knowledge-base gate read that partial denial as full access and let a write proceed.

Outcome

A single strict probe_gate(probe) in pipefy_cli.commands._common backs both surfaces. Provider write-gating is unchanged; knowledge-base write-gating is now strict, so a partial-denial probe (ok: true with a problem) blocks the write instead of passing. The two duplicate helpers are removed.

…d helper

Replaces the duplicate _provider_probe_gate (ai_provider) and _probe_gate
(knowledge_base) with a single probe_gate(probe) in commands/_common. The shared
helper treats a write-access gate as clean only when the probe is ok and carries
no problem.

This also closes a latent gap on the knowledge-base write path: its gate
previously checked ok alone, so a probe returning ok=true alongside a partial
problem (partial data returned with GraphQL errors) read as full access and let
a write proceed. KB write-gating now rejects that partial denial, matching the
provider gate.

Closes #435.
adriannoes
adriannoes previously approved these changes Jul 20, 2026

@adriannoes adriannoes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM for #435: shared strict probe_gate closes the KB partial-denial write gap. Non-blocking: mirror the clean-gate wording from llm-providers.md onto knowledge-bases.md when convenient; merge after #434.

Base automatically changed from rc-dev/feat/llm-provider-writes to dev July 20, 2026 15:31
@mocha06
mocha06 dismissed adriannoes’s stale review July 20, 2026 15:31

The base branch was changed.

The consolidated probe_gate helper treats a KB write gate as clean only
when the probe is ok and carries no problem, so a partial denial (ok:true
with a non-null problem) never reads as full access. Mirror the clean-gate
wording already in llm-providers.md onto knowledge-bases.md so the doc
matches the strict behavior.
@mocha06

mocha06 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @adriannoes. Non-blocking doc mirror done in a44f3f1: knowledge-bases.md now carries the same clean-gate contract bullet as llm-providers.md, so it describes the strict gate this PR introduces (clean only when the probe is ok and carries no problem; a partial denial never reads as full access). Still queued to merge after #434.

@adriannoes
adriannoes self-requested a review July 20, 2026 15:43

@adriannoes adriannoes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@mocha06
mocha06 merged commit 8b285de into dev Jul 20, 2026
2 checks passed
@adriannoes
adriannoes deleted the rc-dev/fix/probe-gate-consolidation branch July 20, 2026 16:16
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