Skip to content

feature(op): Extract StarlarkRuntime, ContextBase (Phases 2-3) - #211

Merged
David-Noble-at-work merged 3 commits into
developfrom
feature/shared-provider-receivers
Mar 12, 2026
Merged

David-Noble-at-work merged 3 commits into
developfrom
feature/shared-provider-receivers

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

  • Phase 2: Extract ContextBase from Context — splits Context into ContextBase (shared by all environments: context.Context, Root, DryRun, Platform, Writer, Data) and Context (graph execution, embeds ContextBase + RecoverySite, Catalog, Graph, NodeID, Thread). Updates all struct literals across 23 files.
  • Phase 3: Extract op.StarlarkRuntime as exported base runtime in pkg/op/. Renames internal BindingSet → Runtime, embedding *op.StarlarkRuntime. Adds +devlore:bind directive to UI provider. Updates all call sites.

Part of the shared-provider-receivers plan. Phase 1 (regexp param rename) was merged in #210. Phases 4-5 follow in subsequent PRs.

Test plan

  • make build passes
  • make test passes (all packages)
  • make vet passes
  • Verify no remaining NewBindingSet or BindingSet references in production code
  • Verify op.StarlarkRuntime API surface is correct for noblefactor-ops consumption (Phase 5)

David Noble added 3 commits March 11, 2026 13:29
Aligns the Starlark parameter name with noblefactor-ops convention
and Python's re module naming. All 8 regexp methods and their e2e
test scripts updated. No behavioral change — only the keyword
argument name is affected.
Splits Context into ContextBase (shared by all environments) and Context
(graph execution). ContextBase holds context.Context, Root, DryRun,
Platform, Writer, Data. Context embeds ContextBase and adds RecoverySite,
Catalog, Graph, NodeID, Thread.

Phase 2 of shared-provider-receivers plan.
Creates op.StarlarkRuntime in pkg/op/ as the exported base runtime for
immediate-mode Starlark scripting. External consumers (noblefactor-ops)
use this to obtain framework-managed receivers without hand-coding
receiver construction.

Renames internal BindingSet → Runtime, embedding *op.StarlarkRuntime and
retaining devlore-specific plan namespace and @devlore// module loader.

Adds +devlore:bind directive to UI provider so NewImmediate wires
Writer, ProgramName, Color from BindingConfig.

Phase 3 of shared-provider-receivers plan.
@David-Noble-at-work
David-Noble-at-work merged commit fe977ef into develop Mar 12, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/shared-provider-receivers branch March 12, 2026 19:02
David-Noble-at-work added a commit that referenced this pull request Jul 28, 2026
… the stated mechanism (#302)

The #300 live proof cut both ways: the --admin merge worked (site PR
#211, merged by the app with checks pending and zero reviews), then the
very next run's merge died on a GitHub 502 and stranded site PR #212
open with green checks. All three sync merges (docs, install script,
registry knowledge) now run in a bounded retry loop — 5 attempts,
10/20/30/40s backoff — that consults the PR state before retrying,
since a 5xx can arrive after the merge landed server-side.

The registry merge also gains --admin: devlore-registry develop sits
under the same org ruleset, and the plain merge already failed live —
registry PR #69 was app-created, its Knowledge Extract run failed on
the merge step, and the PR was merged by hand two minutes later.

Comments corrected: --admin disarms gh's client-side merge-state veto;
the server-side entitlement is the automation app's "always" bypass on
the org ruleset, not repository admin rights. Correction noted in
docs/plans/ci-admin-merge-sync-prs.md.

Workflow-only change; the live proof is the next sync chain run. Plan:
docs/plans/ci-sync-merge-retry.md.

Co-authored-by: David Noble <[email protected]>
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