Skip to content

Migrate lore implementation, add SSPL licensing - #1

Merged
David-Noble-at-work merged 1 commit into
developfrom
feature/initial-structure
Jan 14, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
feature/initial-structure

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

  • Migrated implementation code from lore repo
  • Added schema package with embedded JSON schemas and default configs
  • Added man pages for lore commands
  • Updated to SSPL-1.0 licensing

Changes

  • internal/host/ — Platform-specific host bindings (darwin, linux, windows)
  • internal/starlark/ — Starlark bindings for docker, git, npm
  • internal/bindgen/ — CLI binding generator from Cobra commands
  • internal/pwsh/, internal/shell/ — Shell execution utilities
  • cmd/pipeline/, cmd/bindgen/ — Development tools
  • schema/ — JSON schemas and default configs (embedded)
  • man/ — Man pages for lore commands
  • starlark/ — Starlark builtins library

Test plan

  • go build ./... compiles successfully
  • go test ./... passes
  • Schema embedding works correctly

- Copy implementation code from lore repo (internal/host, internal/starlark,
  internal/bindgen, internal/pwsh, internal/shell, cmd/pipeline, cmd/bindgen)
- Add schema package with embedded JSON schemas and default configs
- Add man pages for lore commands
- Add Starlark builtins library
- Update license headers to SSPL-1.0
- Update import paths from github.com/NobleFactor/lore to devlore-cli
- Add starlark and golang.org/x/tools dependencies
@David-Noble-at-work
David-Noble-at-work merged commit 56b3c08 into develop Jan 14, 2026
1 check passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/initial-structure branch January 14, 2026 23:16
David-Noble-at-work pushed a commit that referenced this pull request Mar 8, 2026
…n (Phase 6)

Phase 6 — E2E tests + two correctness fixes + phase documents:

Immediate bridge callable support:
- callNonVariadic detects starlark.Callable values targeting func-typed
  Go params and adapts them via buildCallableFunc (full-signature
  Go↔Starlark marshaling). Thread passed through from builtinFunc closure.
- Blank import of mem package in test runner for callable extractor
  registration (needed by planned mode ExtractCallable).

Full-signature callable matching (Issue #1):
- Removed Actor convenience function and +devlore:callable swallow=stack
  annotation. The callable must match the full Go Reducer signature
  (initial, resource, relativePath, stack).
- Removed arity truncation from buildCallableFunc — all Go args passed
  to Starlark.
- Updated starcode/provider.go Actor usage to full Reducer signature.
- All test callables updated from 3-param to 4-param.

Full-fidelity struct serialization (Issue #2):
- FormatLiteral now handles *starlarkstruct.Struct values by serializing
  as dict literals with sorted keys. Enables Resources captured in
  closures to be serialized with full fidelity.
- 3 new tests: Struct, NestedStruct, EmptyStruct.

E2E test scripts:
- test_walk_tree.star: immediate mode — walk temp dir, collect+sort paths
- test_walk_tree_planned.star: planned mode — plan.file.walk_tree
- test_walk_tree_gitignore.star: .gitignore filtering
- test_walk_tree_closure.star: def capturing closure variable (ext=".py")

Phase documents:
- Created docs/plans/mem-resource/phase-0.md through phase-7.md
- Updated master plan: removed stale arity truncation/swallow references,
  updated current state, Phase 6 marked done
David-Noble-at-work pushed a commit that referenced this pull request Mar 8, 2026
…n (Phase 6)

Phase 6 — E2E tests + two correctness fixes + phase documents:

Immediate bridge callable support:
- callNonVariadic detects starlark.Callable values targeting func-typed
  Go params and adapts them via buildCallableFunc (full-signature
  Go↔Starlark marshaling). Thread passed through from builtinFunc closure.
- Blank import of mem package in test runner for callable extractor
  registration (needed by planned mode ExtractCallable).

Full-signature callable matching (Issue #1):
- Removed Actor convenience function and +devlore:callable swallow=stack
  annotation. The callable must match the full Go Reducer signature
  (initial, resource, relativePath, stack).
- Removed arity truncation from buildCallableFunc — all Go args passed
  to Starlark.
- Updated starcode/provider.go Actor usage to full Reducer signature.
- All test callables updated from 3-param to 4-param.

Full-fidelity struct serialization (Issue #2):
- FormatLiteral now handles *starlarkstruct.Struct values by serializing
  as dict literals with sorted keys. Enables Resources captured in
  closures to be serialized with full fidelity.
- 3 new tests: Struct, NestedStruct, EmptyStruct.

E2E test scripts:
- test_walk_tree.star: immediate mode — walk temp dir, collect+sort paths
- test_walk_tree_planned.star: planned mode — plan.file.walk_tree
- test_walk_tree_gitignore.star: .gitignore filtering
- test_walk_tree_closure.star: def capturing closure variable (ext=".py")

Phase documents:
- Created docs/plans/mem-resource/phase-0.md through phase-7.md
- Updated master plan: removed stale arity truncation/swallow references,
  updated current state, Phase 6 marked done
David-Noble-at-work added a commit that referenced this pull request Mar 8, 2026
…n (Phase 6) (#202)

* feature(op): E2E tests, full-signature callables, struct serialization (Phase 6)

Phase 6 — E2E tests + two correctness fixes + phase documents:

Immediate bridge callable support:
- callNonVariadic detects starlark.Callable values targeting func-typed
  Go params and adapts them via buildCallableFunc (full-signature
  Go↔Starlark marshaling). Thread passed through from builtinFunc closure.
- Blank import of mem package in test runner for callable extractor
  registration (needed by planned mode ExtractCallable).

Full-signature callable matching (Issue #1):
- Removed Actor convenience function and +devlore:callable swallow=stack
  annotation. The callable must match the full Go Reducer signature
  (initial, resource, relativePath, stack).
- Removed arity truncation from buildCallableFunc — all Go args passed
  to Starlark.
- Updated starcode/provider.go Actor usage to full Reducer signature.
- All test callables updated from 3-param to 4-param.

Full-fidelity struct serialization (Issue #2):
- FormatLiteral now handles *starlarkstruct.Struct values by serializing
  as dict literals with sorted keys. Enables Resources captured in
  closures to be serialized with full fidelity.
- 3 new tests: Struct, NestedStruct, EmptyStruct.

E2E test scripts:
- test_walk_tree.star: immediate mode — walk temp dir, collect+sort paths
- test_walk_tree_planned.star: planned mode — plan.file.walk_tree
- test_walk_tree_gitignore.star: .gitignore filtering
- test_walk_tree_closure.star: def capturing closure variable (ext=".py")

Phase documents:
- Created docs/plans/mem-resource/phase-0.md through phase-7.md
- Updated master plan: removed stale arity truncation/swallow references,
  updated current state, Phase 6 marked done

* feature(op): E2E tests, full-signature callables, struct serialization (Phase 6)

Phase 6 — E2E tests + two correctness fixes + phase documents:

Immediate bridge callable support:
- callNonVariadic detects starlark.Callable values targeting func-typed
  Go params and adapts them via buildCallableFunc (full-signature
  Go↔Starlark marshaling). Thread passed through from builtinFunc closure.
- Blank import of mem package in test runner for callable extractor
  registration (needed by planned mode ExtractCallable).

Full-signature callable matching (Issue #1):
- Removed Actor convenience function and +devlore:callable swallow=stack
  annotation. The callable must match the full Go Reducer signature
  (initial, resource, relativePath, stack).
- Removed arity truncation from buildCallableFunc — all Go args passed
  to Starlark.
- Updated starcode/provider.go Actor usage to full Reducer signature.
- All test callables updated from 3-param to 4-param.

Full-fidelity struct serialization (Issue #2):
- FormatLiteral now handles *starlarkstruct.Struct values by serializing
  as dict literals with sorted keys. Enables Resources captured in
  closures to be serialized with full fidelity.
- 3 new tests: Struct, NestedStruct, EmptyStruct.

E2E test scripts:
- test_walk_tree.star: immediate mode — walk temp dir, collect+sort paths
- test_walk_tree_planned.star: planned mode — plan.file.walk_tree
- test_walk_tree_gitignore.star: .gitignore filtering
- test_walk_tree_closure.star: def capturing closure variable (ext=".py")

Phase documents:
- Created docs/plans/mem-resource/phase-0.md through phase-7.md
- Updated master plan: removed stale arity truncation/swallow references,
  updated current state, Phase 6 marked done

---------

Co-authored-by: David Noble <[email protected]>
David-Noble-at-work pushed a commit that referenced this pull request May 27, 2026
Three change groups, all "use the accessors Graph already has":

Body:

  - 7 sites converted from `graph.Root.X` (field access against a method)
    to `graph.Root().X` (method call). Sites: AddChild, SetRetryPolicy,
    SetErrorAction, SetSlot, MaterializeEdges, SortAll. The Root()
    accessor has always existed; the field-access form was stale from a
    prior refactor.

  - Removed the stale `graph.Rebind(p.RuntimeEnvironment())` call. The
    Rebind method had already been deleted from Graph; binding direction
    reversed in the broader Graph-immutability workstream (env references
    graph, not the inverse).

  - Removed the broken catalog handoff:
        graph.ResourceCatalog = p.RuntimeEnvironment().Catalog
        p.RuntimeEnvironment().Catalog = nil
    `graph.ResourceCatalog` is a method (getter), not a settable field.
    The planning catalog no longer transfers onto the assembled graph
    under this minimal fix — the assembled graph keeps the empty catalog
    from NewGraph(). Catalog continuity from planning into execution is
    restored by the sealed-constructor refactor that takes the catalog
    at construction time.

  - Parameter order on Assemble rearranged to
    (invocations, frameBindings, errorAction, retryPolicy) — surfaces
    the more-common positional arguments first.

Doc comment:

  - Pipeline list reduced from 10 to 8 steps. Removed:
      * step 2 (Bind via Rebind) — method deleted; binding direction
        reversed.
      * step 10 (Catalog handoff) — subsumed by the sealed-constructor
        refactor.
    A closing paragraph notes both concerns as deferred to that work.

  - Returns no longer claims "bound to this Provider's env" for the
    returned graph (Graph is env-agnostic after the immutability
    refactor; the executor binds env to graph per-Run).

Verification:
  go vet ./pkg/op/provider/plan reports only the pre-existing
  pkg/op/provider/flow/helpers.go errors (graph.ExecuteWithStack /
  RuntimeEnvironment.Results undefined). plan/provider.go itself is
  clean.

Next slice (presented separately):
  1. Sealed NewGraph(origin, catalog, rootChildren, retryPolicy,
     errorAction, frameBindings, sopsClient) constructor — computes
     canonical content internally, hashes via GitStyleChecksum, signs
     via sopsClient.Sign. Restores the planning-catalog continuity
     this commit dropped.
  2. Delete Graph.AddNode / Graph.AddSubgraph (incremental construction
     mutators).
  3. (Open) Seal Subgraph's mutators — sister sealed constructor and
     remove its public Add*/Set*/Materialize/Sort surface.
  4. Delete the zero-arg public NewGraph() form once #1 lands.
  5. Migrate cmd/lore + cmd/writ off the incremental construction API.
David-Noble-at-work pushed a commit that referenced this pull request Jun 7, 2026
Both were at status: draft despite shipped work; neither is complete (the #6 veneer remains):
- platform-unification.md (step 21.4): the op-free pkg/platform Composite reshape (#1-4) is committed;
  remaining are #5 (delete the redundant op managers) and #6 (the pkg.Provider veneer + consumer
  migration), both still scoped in its Work breakdown -> in-progress.
- pkg-install-reconciler.md (#9 + #6): #9 Update is complete (Part A manual + Part B auto-gate,
  committed cd92631); the stale "Remaining: #9 Part B" status line is corrected; #6 veneer remains
  -> in-progress.
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