docs: PLUGINS.md pins its `file:line` citations to a revision and every one is stale by 40 to 52 lines; its chapter-one input pattern silently swallows a secret reference
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9
- Forks
- 0
- Avg merge
- 3h 3m
- Merged PRs (30d)
- 509
Description
Observed behavior
docs/PLUGINS.md:16-17 says its references are taken against 5ab0309, "which changes nothing on this path." At eb8172f:
| Claimed | Actually at that line | Real location |
|---|---|---|
sdk.Main at sdk/sdk.go:314-327 |
SecretInputs []string |
sdk/sdk.go:366 |
TaskFunc at sdk/sdk.go:303 |
NeedsScope bool |
sdk/sdk.go:355 |
Task.Input/Output at sdk/sdk.go:225-226 |
SecretResponse |
sdk/sdk.go:244 |
the naming rule at discover.go:19 |
a comment | discover.go:22,53 |
Reproduce with sed -n '314,316p' pkg/flowstate/v1/plugin/sdk/sdk.go. The page's whole evidentiary style is the citation, and it is the first thing a skeptical author checks. The generated references under docs/reference/ are drift-tested; the hand-written pages that cite lines are not.
Two more on the same page, found by following it literally (the walk itself works: nine commands, exit 0, about five minutes, no checkout needed):
- Chapter one's input pattern drops secrets. The snippet reads
inputs["name"].GetLiteral().GetStringValue(), which returns""for aValue_SecretRef, aValue_Expr, or an error value. Chapter two'ssetField(sdk/values.go:69-78) refuses all three with a sentence naming the fix. TheIMPORTANTcallout after chapter one warns about descriptors and validation only. A chapter-one plugin handed a secret reportsname is required. - The
loaded pluginINFO line appears in no transcript.flow tasks,flow validateandflow run localprintlevel=INFO msg="loaded plugin"on stderr (cmd/flow/plugins.go:759);flow pluginsdoes not; no transcript inPLUGINS.md,EMBEDDING.md, orexamples/plugins/greet/README.mdshows it. A reader diffing against the doc sees a line the doc never shows, on three of four verbs.
Desired outcome
- Citations in hand-written docs are either symbol-based (
sdk.Main, whichgoplsand a reader can find) or line-based and drift-tested: a test resolves everypath:lineindocs/*.mdand asserts the line contains the symbol the sentence names, in the style of the generated-reference drift tests. - Chapter one reads inputs through
sdk.DecodeInputsor says in its callout that the raw-literal read is for literals only and what a secret does to it. - Transcripts show stderr, or the INFO line moves to debug on the read-only verbs, and
flow pluginsandflow tasksagree.
Acceptance criteria
- The drift test fails on today's
PLUGINS.mdand passes after the citations are corrected. examples/plugins/greetcompiled against the corrected chapter-one snippet still passes its test.
Constraints and dependencies
- Adjacent: #425 (documentation as one system), #1508 (plugin READMEs), #1541 (operator transcripts).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/PLUGINS.md and reproduce the cited line mismatch using the provided sed command. Read the generated-reference drift tests, sdk.DecodeInputs, sdk/values.go, cmd/flow/plugins.go, and the named plugin transcripts. Done means corrected or drift-tested citations, safe chapter-one input guidance, and transcripts or logging that match the stated acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, markdown
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100