Skip to content

fix: apply the 0.12.0 review findings: forge's secret rules, an anchored statement target, harnesses that match forge - #28

Merged
fas89 merged 4 commits into
mainfrom
fix/sdk-0.12.0-review
Nov 22, 2026
Merged

fas89 merged 4 commits into
mainfrom
fix/sdk-0.12.0-review

Conversation

@fas89

@fas89 fas89 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

#27 merged before its review fixes were pushed. This brings them in before the 0.12.0 tag.

  • Option keys: secret_option_key is ported from forge-cli PR #1063, which ships in forge-cli 0.38.0. The redactor's key parts and names are vendored. 38 keys are pinned to forge's own outcomes.
  • Option values: the redactor's value shapes are vendored. Provider keys, Bearer, JWT, PEM, URL user info, credential assignments and webhook URLs are refused on name, kind, connection, default_connection, format and every option string. The docs no longer claim parity. forge-cli is the authority and may refuse more.
  • Maintenance statements: the target is anchored right after DELETE FROM, UPDATE or MERGE INTO. Without sqlglot the harness warns, and the docs say what can pass.
  • Harnesses now build, skip and report the way forge-cli does:
    • plain objects and function factories work;
    • a missing check means no problems;
    • a maintenance check must return a list;
    • sample routes must pass check;
    • messages never echo a route name.
  • The fluid_build.commands history: lazy loading, the allow/block policy and the one-argument func are 0.11.0 and later.
  • sample_alert mirrors forge's alerts. The command harness follows forge's arity and restores cwd and env.

Checked: ruff, black, pytest (415+ pass on 3.10, 3.11, 3.12 and 3.14), each example's tests, python -m build and twine check. It was also checked end to end against forge-cli 0.38.0 (validate, generate schedule, plan, the example command).

…anchor the statement target

The option-key rule is forge-cli's secret_option_key, by whole words (it no longer passes
private_key, signingKey, auth, key, pwd and the like, and no longer refuses max_tokens or
secretary). A string a route gives (name, kind, connection, format, options) is refused when it
has a vendored redactor shape: provider key prefixes, Bearer, JWT, PEM, URL user info, key=value
with a credential-named key, and the incident and chat webhook URLs. forge-cli stays the
authority and may refuse more.

Without sqlglot the statement target is now read right after DELETE FROM, UPDATE or MERGE INTO
(after a leading WITH clause), with word boundaries, backticks and spaces around dots, instead
of a substring match. sample_alert follows forge-cli's make_alert wording. Tables of forge-cli's
own outcomes pin all of it.
…e-cli does

Plain classes and objects skip the subclass tests; check is optional (a missing one is no
problems) and a maintenance check must return a list; a function that returns a kind or action is
called, and a function set on the class is not bound as a method. Adds a test that at least one
sample route passes the kind's check, positional labels instead of route names, to/from/format
passed through the shape test, a warning when sqlglot is absent, forge-cli's arity rule for func,
no invented command-name pattern, and a restore of the cwd and environment even when a plugin
raises.
@fas89
fas89 merged commit a0f5c73 into main Nov 22, 2026
9 checks passed
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