Repository navigation
feature(op): E2E tests, full-signature callables, struct serialization (Phase 6) - #202
Merged
Merged
Conversation
added 3 commits
March 7, 2026 17:58
…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
…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
…/devlore-cli into feature/mem-resource-phase-6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
callNonVariadicinreceiver_reflect.godetectsstarlark.Callablevalues targeting func-typed Go params and adapts viabuildCallableFunc. Thread passed through from thebuiltinFuncclosure.Actorfunction,+devlore:callable swallow=stackannotation, and arity truncation. The Starlark callable must match the full Go func signature. Updatedstarcode/provider.goand all test callables from 3-param to 4-param.FormatLiteralnow handles*starlarkstruct.Structas dict literals with sorted keys, enabling Resources captured in closures to serialize with full fidelity.docs/plans/mem-resource/phase-0.mdthroughphase-7.md. Updated master plan to remove stale swallow/truncation references.Test plan
TestWalkTree— immediate mode: walk temp dir with named def, collect+sort paths, verify 4 entriesTestWalkTreePlanned— planned mode:plan.file.walk_treewith callable reducer, verify 1 graph nodeTestWalkTreeGitignore—.gitignorefiltering: *.log excluded, .gitignore itself included, 3 entriesTestWalkTreeClosure— def capturing closure variable (ext = ".py"), filters to 2 .py filesTestFormatLiteral_Struct/NestedStruct/EmptyStruct— struct→dict literal serializationTestWalkTreeAction_Integration/DryRun— 4-param callables through reflected actionsmake testpasses (full suite, 70+ packages)