Repository navigation
Description
Plan: docs/plans/workflow-rename.md (status draft, last audited 2026-05-26)
ProviderRole's dispatch constants and the +devlore:surface= values that produce them are two different
vocabularies for one idea, and the rename removes the word one of them is built on.
The mismatch today
# generate.star
if surface == "graph": roles = "op.RoleAction"
elif surface == "module": roles = "op.RoleModule"
else: roles = "op.RoleModule|op.RoleAction"| Directive | Role | |
|---|---|---|
+devlore:surface=graph |
RoleAction |
different words for the same surface |
+devlore:surface=module |
RoleModule |
agrees |
An author writes graph and the generated code says Action. Nothing connects them but this function.
The rename removes both words
workflow-rename.md maps Graph → Definition, with workflow as the package. So after it lands there
is no type called Graph, and +devlore:surface=graph names something that no longer exists. module is no
better off — it is Starlark's word for a namespace, not a term in the new taxonomy:
workflow
├─ Definition root container (was Graph)
│ ├─ Node abstract vertex (was ExecutableUnit)
│ │ ├─ Step leaf (was Node)
│ │ └─ Block composite (was Subgraph)
What these roles actually mean now
Worth restating, because the names predate the meaning. #677 changed RoleModule from immediate mode to
eligible for a module surface, and made membership a per-method, per-runtime decision driven by claims. So
both constants now answer one question — which surface may this provider reach — and the answer is no
longer about invocation mode at all.
RoleRoot is a different axis (placement, not dispatch) and is in scope for review but not obviously wrong.
First order of business: pick the terms
Not to be decided in this issue's description. Candidates to weigh, and the criterion is that the directive
value and the constant should be the same word:
| Directive | Constant | Note |
|---|---|---|
surface=definition |
RoleDefinition |
matches the type a provider's methods build |
surface=workflow |
RoleWorkflow |
matches the package; may over-claim, since a Definition is one artifact in it |
surface=script |
RoleScript |
names the other side by what an author is writing, not by Starlark's module |
surface=module |
RoleModule |
keep; already agrees, and module is what starlark calls it |
The pairing matters more than either word alone. graph/Action is the defect; any pair that agrees is an
improvement, and the best pair also survives the taxonomy change.
Scope
ProviderRoledispatch constants inpkg/op/receiver_type.go+devlore:surface=values, and the mapping ingenerate.star- Every provider declaring a surface — today only
flow(graph) andplan(module) ReceiverRegistry'smodules/actions/plannersslices, which inherit the same vocabulary- Documentation:
3.6-method-classification.mdanddocs/guides/provider-development.mdboth carry the
mapping table as of 2026-08-27
Sequencing
Belongs with the rename rather than before it: doing it first means renaming twice, and doing it after
means the new taxonomy ships alongside a constant named for the type it replaced.
Note the parent plan's prerequisite — "cannot start until refactor/extract-starlark-from-op.phase-8 merges"
— is satisfied; that branch is gone and phase 8 has landed. The plan has not been revisited since, and its
Current State predates claims, claimcheck, sealed resources, and the conversion rules.
Acceptance
- A directive value and its constant are the same word
- No surviving name refers to
graph, which the taxonomy retires - The mapping table is correct in both documents that carry it
-
RoleRootreviewed and either kept or renamed deliberately
Plan and design documents
| Kind | Document |
|---|---|
| Plan | docs/plans/role-vocabulary.md |
Activity
David-Noble-at-work commentedon Aug 27, 2026
Blocked on #716 — the re-audit produces the name-mapping appendix this rename needs, and it has to walk the same identifiers.
Both are now reflected in
docs/plans/workflow-rename.mditself, which previously referenced neither. The plan gained a Related Rename: the provider roles section carrying the mismatch and the reasoning for doing this in the same window rather than before or after.Root applies to every surface, and the rename plan says what is stale…
docs(plans): re-audit the rename plan and write the name-mapping appe…
David-Noble-at-work commentedon Aug 27, 2026
Term proposals, from discussion 2026-08-27
Two axes, two directives — do not merge them
ProviderRolehas two zones: dispatch (bits 0–7) and placement (bits 8–15), withDispatch()andPlacement()projecting them. Foldingrootintosurface=was considered and rejected — a value listreading
starlark_module|action_provider|rootsays "a surface, a surface, and a not-surface", and a readerthen cannot tell from the syntax that dropping
rootchanges where names appear while dropping the otherchanges whether the provider can be planned at all.
+devlore:surface=ProviderRole.Surface()RoleStarlarkModule,RoleWorkflow+devlore:placement=ProviderRole.Placement()RolePromoted,RoleQualifiedPlacement:
promoted|qualified, defaultqualified+devlore:root=trueinvites the question "root of what?" — a bareroothas no referent, and theboolean is weak besides. Naming the opposite value is what makes the axis legible.
promoted— the name appears at the namespace root, unqualified.qualified— the name appears under its provider's name:ui.note,plan.flow.choose.Neither term needs a referent:
promotedsays what happened to the name,qualifiedsays what qualifies it.This is already the codebase's vocabulary. The implementation of root placement is written in it:
And it is not invented here — Go's own spec uses "promoted" for exactly this shape, a field or method of
an embedded struct appearing at the outer level without qualification: "Promoted fields act like ordinary
fields of a struct." The other half, qualified identifier (
pkg.Name), is likewise the spec's term.nestedwas proposed first and withdrawn: its only precedent was our own doc comment, which is circular.RoleRootbecomesRolePromoted. That also resolves an existing contradiction —promoteRootMethodscurrently carries two words for one idea in a single identifier.
Considered and not chosen:
unqualified|qualified. More literal, and free of the embedding associationthat a Go reader might carry into "promoted", where this is namespace placement rather than struct embedding —
analogous, not identical.
promoted|qualifiedwas preferred for naming the action on one side and thestate on the other, which is what is actually true. Worth a second look if the embedding association proves
misleading in review.
Dispatch()has the same defect asRoleActionRaised while weighing whether the directive should be
dispatch=rather thansurface=. It should not —but the accessor is the thing that is wrong.
Dispatch()names how methods are invoked. That stopped being what the zone means. #677 changed it, and3.6-method-classification.mdsays so:So the accessor names invocation while the zone now means eligibility — the same staleness as
RoleAction,one level up.
Dispatch()→Surface()belongs in this issue's scope.Surface values
starlark_moduleandworkfloware the working proposal, matchingRoleStarlarkModuleandRoleWorkflow.action_providerwas proposed and set aside: it names the thing, not the surface, and every provider is aprovider. The value should answer "which surface does this reach", and after the rename that surface builds
workflow.Definitions.Least settled: whether
starlark_moduleis too implementation-flavored — it names starlark's mechanism ratherthan the author's intent, where the old word was
immediate. Worth weighing before this is fixed.A new constant
RoleQualifiedwould be new. Placement has one bit today and absence means qualified, soPlacement()returns zero. Making it explicit costs a bit and lets
Placement()return something nameable instead of azero meaning "the default" — the same weakness as
root=truebeing a boolean.David-Noble-at-work commentedon Aug 27, 2026
Surface values SETTLED:
script|workflow+devlore:surface=ProviderRole.Surface()RoleScript,RoleWorkflow+devlore:placement=ProviderRole.Placement()RolePromoted,RoleQualifiedBoth values name an artifact an author writes, both are single words, and each is the same word as its
constant — the criterion this issue was opened on.
script|workflowalso answers the question the directive is actually asking, where may this method beused, rather than describing a mechanism.
Rejected:
starlark|workflowProposed for parity with
workflow, and set aside because both surfaces are starlark.plan.file.copy(...)is starlark too; workflows are built from starlark. A value pair readingstarlark|workflowimplies the workflow surface is something other than starlark, which is backwards — andit would land in the same trap as
graph/Action, a value whose word does not name what it selects.Rejected:
starlark_module|workflowThe parity objection stands: one compound, one simple.
moduleis also starlark's word for a namespace ratherthan a term in the new taxonomy.
Rejected:
action_providerNames the thing, not the surface. Every provider is a provider.
Runner-up:
immediate|workflowKept on the record because it avoids a real subtlety in the chosen pair.
A script is what builds a workflow, so a workflow-surface method is still called from a script —
file.copyreached asplan.file.copy(...)sits in a.starfile either way.script|workflowdistinguishesthem by what the call yields rather than where the text lives, which a new author could stumble on.
immediatehas no locational reading at all, so it sidesteps that. Its costs: it mixes axes — one word namestiming, the other an artifact — and it is the vocabulary #677 retired, though #677 retired it for meaning
invocation mode rather than eligibility, which is not quite what this would be doing.
Revisit only if the "where the text lives" confusion shows up in practice.
Consequences for the tree
flow—+devlore:surface=workflow(wasgraph),+devlore:placement=promoted(wasroot=true)plan—+devlore:surface=script(wasmodule)ui—+devlore:placement=promoted; surface stays absent, since it reaches bothReceiverRegistry'smodules/actions/plannersslices inherit the old vocabulary and followRootProviders()becomesPromotedProviders(), andpromoteRootMethodsloses its internal contradictionDavid-Noble-at-work commentedon Aug 27, 2026
Constants take their ACCESSOR's name, not the type's
ProviderRole.Surface()SurfaceScript,SurfaceWorkflowProviderRole.Placement()PlacementPromoted,PlacementQualifiedSupersedes the
RoleScript/RolePromotednaming proposed earlier in this issue.The argument is a bug this repository already shipped
The
Roleprefix flattens two orthogonal zones into one undifferentiated list, andRoleRoottherefore readsas a third peer of the other two. It is not — it is a placement modifier that applies to every dispatch zone
the provider holds.
That is exactly how #708 went wrong.
uiwas given+devlore:root=trueafter reasoning only about the modulesurface, and it silently promoted six names —
error,fail,note,print,succeed,warn— intoplan.*as well. Nothing collided, so nothing failed, and the consequence was found only by readingbuildPromotedBuiltinsdays later.A call site reading
op.SurfaceScript|op.SurfaceWorkflow|op.PlacementPromotedwould have made that visibleat the moment it was generated. Two surfaces, one placement — and it is obvious that the placement is not a
third surface.
It also makes invalid combinations look wrong.
op.SurfaceScript|op.SurfacePromotedis visibly nonsense;op.RoleModule|op.RoleRootis not.The cost, stated
Go convention prefixes a type's constants with the type name, and all four remain
ProviderRolevalues.PlacementPromoteddoes not announce its type, so a reader may briefly wonder whether it andSurfaceScriptare even the same type — they must be, to compose with
|.Judged a small price for making the zones legible, and the accessor names tie each family back to
ProviderRole.Knock-on to decide in the same window
If the constants stop saying
Role, the type nameProviderRolebecomes the odd one out. It packs a surfaceand a placement. Leaving it, or
ProviderRoles, both work — but it should be decided here rather thandiscovered mid-rename.
Full scheme as it now stands
+devlore:surface=Surface()— renamed fromDispatch()SurfaceScript,SurfaceWorkflow+devlore:placement=Placement()PlacementPromoted,PlacementQualifiedEvery directive value is the same word as its constant, and every constant names the accessor that projects
it — which is the whole of what this issue set out to fix.
David-Noble-at-work commentedon Aug 28, 2026
SETTLED:
ProviderFlagspacks aSurfaceand aPlacement, each a distinct typeSupersedes
ProviderRoleand the single-type constant families proposed earlier in this issue.Why distinct types, not one packed type for everything
reflect's own packed value does exactly this — verified in$GOROOT/src/reflect/value.go:A value zone, flag bits, a second zone, and an accessor that masks — our exact shape. And
kind()returnsKind, a distinct type, not anotherflag.Applied here, the compiler stops a whole class of confusion: a
Surfacecannot be compared against aPlacement, and neither can be passed where the other is wanted. With both zones typed as the packed type,role.Placement() == SurfaceScriptcompiles and is nonsense.Why
ProviderFlagsPrecedent, verified in the Go stdlib: 14 exported types carry the suffix —
ProgFlag,SectionFlag,FuncFlag,OpFlags,PragmaFlag,ValueFlags,DynFlag,TFlag,CountFlag.From memory, not verified: C# has
System.Reflection.BindingFlagsalongsideMethodAttributes/TypeAttributes; Java usesjava.lang.reflect.Modifier, withAccessFlagadded in 22, and the class-filespec calls the field
access_flags.The distinguishing principle across those: bits with a domain meaning take the meaning's name (
FileMode,Modifier,MethodAttributes); an open-ended set of options takesFlags(BindingFlags,SectionFlag).ProviderFlagsis deliberately generic, and that is the point.ProviderRolewas specific and wentstale: #677 changed the zone from invocation mode to surface eligibility and the name outlived the
meaning, which is how
RoleAction,Dispatch(), andProviderRoleall came to name something that was nolonger true. A deliberately empty name cannot go stale that way, and the accessors carry the meaning.
The cost, stated: it invites "flags about what?", the same question
rootinvited. The accessors answer it.Read differently, because the zones are different kinds of thing
Directive grammar follows
PlacementQualified = 0x00is the zero value of an enumeration rather than an absent flag, so a providerdeclaring nothing gets both surfaces and qualified names — exactly the default.
Nothing can express a nonsense placement. Not because a check rejects it, but because the zone holds one
value of a type with two.
Consequences for the tree
flow—+devlore:surface=workflow,+devlore:placement=promotedplan—+devlore:surface=scriptui—+devlore:placement=promoted; surface absent, since it reaches bothRootProviders()→PromotedProviders(), resolvingpromoteRootMethods' internal contradictionReceiverRegistry'smodules/actions/plannersslices follow the new vocabularyiotaPlan:
docs/plans/role-vocabulary.md.David-Noble-at-work commentedon Aug 28, 2026
SETTLED:
Surfacesplural,Placementsingular — the grammar carries the distinctionflags.Surfaces()returningSurfaceScript|SurfaceWorkflowreads correctly.flags.Surface()returning twothings reads as a contradiction — and that contradiction is the mistake this design already made twice: first
by folding
rootintosurface=, then by writingplacement=promoted|qualifiedwith|meaning "one of".The asymmetry is the point. Someone reading only the accessor signatures learns which zone is a set and
which is a value, without reaching for the doc comment. The individual constants stay singular
(
SurfaceScript), because each names one surface; the type and accessor are plural because they hold a set.Cost, stated: Go's stdlib leans singular for bit fields (
FileMode,SectionFlag,ProgFlag). Taken anyway,because this type sits directly beside a singular one that means something different — the local contrast
matters more than the general convention.
Rejected:
SurfaceAttributesC#'s pattern is
<Thing>Attributeswhere Thing is what is described —MethodAttributesare attributesof a method. Applied faithfully, the thing described here is the provider, which is
ProviderFlags.SurfaceAttributeswould read as attributes of a surface, and the type is not describing a surface; it isa set of surfaces. It also says "flags" twice inside a type already named for flags.
A counter-precedent, recorded honestly
The distinct-type choice follows Go's
reflect, whereflag.kind()returnsKind. C# disagrees.System.Reflection.MethodAttributesis exactly this shape — aMemberAccessMask = 0x0007zone holding anaccess level, alongside independent flag bits like
StaticandVirtual— and C# does not split them intodistinct types. One
[Flags]enum, masks applied by the caller.Two respectable languages, two answers. Go's was chosen because distinct types make
flags.Placement() == SurfaceScripta compile error rather than nonsense that compiles.docs(plans): ProviderFlags -- a Surfaces bit field and a Placement va…
fix(starlarkbridge): a dispatch error names the symbol the author typ…
chore(op): the last artifacts carrying retired placement vocabulary (#…