build: the wfextract generator no longer reproduces the committed Yaegi table #1102

Closed
opened 2026-10-27 13:39:01 +00:00 by sam · 0 comments
Owner

Regenerating internal/domain/workflow/wfextract produces output that fails the
package's own guard test, so the committed table is no longer reproducible.

REPRODUCED BY HAND (clean tree at 8d3925a8):
sha256sum internal/domain/workflow/wfextract/github_...-internal-domain-workflow.go
-> 83dcdc66e8185f2d...
go generate ./internal/domain/workflow/wfextract/
(directive: yaegi extract -name wfextract github.com/samcharles93/archie-core/internal/domain/workflow)
sha256sum (same file) -> eee5bd2a8aa332cd... CHANGED
go test ./internal/domain/workflow/wfextract/ -count=1
-> panic: runtime error: invalid memory address or nil pointer dereference
...Forger.CloseIssue(...) at github...-internal-domain-workflow.go:121
TestWrapperNilGuardsPreserved reachability_test.go:86
FAIL
git checkout -- internal/domain/workflow/wfextract/ # restores; sha matches

DIAGNOSIS
The committed table carries an if W.WCloseIssue == nil { return nil } nil guard
before each forwarded call. The freshly generated output omits them. So either the
generated output was hand-corrected after it was produced, or the pinned yaegi
version changed its output, and the guards now live only in the committed
artifact. reachability_test.go's TestWrapperNilGuardsPreserved exists to assert
exactly those guards -- and the generator no longer satisfies it.

IMPACT

  • The table cannot be regenerated: any change to the workflow package's exported
    surface, or any deliberate regeneration, yields a file that fails the suite.
  • It directly blocks .local/issue-tracker workflow-engine-3 (Definitions and
    DefinitionsWithOrigins are otherwise unused and unnamed by any open bead):
    deleting them requires regenerating this table, which currently breaks the
    build. That is why the finding was left unactioned on 2026-09-19.
  • Every other yaegi-extracted package (internal/plugin/pluginextract regenerated
    cleanly and can be used as the working reference) is exposed to the same class
    of trap.

NEXT -- decide which side is authoritative
Prefer teaching the generator (or adding a post-process step) to emit the nil
guards, because the guards are the reason a nil wrapper field cannot panic a
caller. The alternative -- dropping the guards and relaxing
TestWrapperNilGuardsPreserved -- trades a build failure for a runtime panic.

Close reason

Closed on GitHub; syncing bead state


Imported from beads archie-core-6kch · GitHub #938 · type bug · priority P2 · created 2026-09-18 · closed 2026-09-26

Regenerating internal/domain/workflow/wfextract produces output that fails the package's own guard test, so the committed table is no longer reproducible. REPRODUCED BY HAND (clean tree at 8d3925a8): sha256sum internal/domain/workflow/wfextract/github_...-internal-domain-workflow.go -> 83dcdc66e8185f2d... go generate ./internal/domain/workflow/wfextract/ (directive: yaegi extract -name wfextract github.com/samcharles93/archie-core/internal/domain/workflow) sha256sum (same file) -> eee5bd2a8aa332cd... CHANGED go test ./internal/domain/workflow/wfextract/ -count=1 -> panic: runtime error: invalid memory address or nil pointer dereference ..._Forger.CloseIssue(...) at github_...-internal-domain-workflow.go:121 TestWrapperNilGuardsPreserved reachability_test.go:86 FAIL git checkout -- internal/domain/workflow/wfextract/ # restores; sha matches DIAGNOSIS The committed table carries an `if W.WCloseIssue == nil { return nil }` nil guard before each forwarded call. The freshly generated output omits them. So either the generated output was hand-corrected after it was produced, or the pinned yaegi version changed its output, and the guards now live only in the committed artifact. reachability_test.go's TestWrapperNilGuardsPreserved exists to assert exactly those guards -- and the generator no longer satisfies it. IMPACT - The table cannot be regenerated: any change to the workflow package's exported surface, or any deliberate regeneration, yields a file that fails the suite. - It directly blocks .local/issue-tracker workflow-engine-3 (Definitions and DefinitionsWithOrigins are otherwise unused and unnamed by any open bead): deleting them requires regenerating this table, which currently breaks the build. That is why the finding was left unactioned on 2026-09-19. - Every other yaegi-extracted package (internal/plugin/pluginextract regenerated cleanly and can be used as the working reference) is exposed to the same class of trap. NEXT -- decide which side is authoritative Prefer teaching the generator (or adding a post-process step) to emit the nil guards, because the guards are the reason a nil wrapper field cannot panic a caller. The alternative -- dropping the guards and relaxing TestWrapperNilGuardsPreserved -- trades a build failure for a runtime panic. ### Close reason Closed on GitHub; syncing bead state --- _Imported from beads `archie-core-6kch` · GitHub #938 · type bug · priority P2 · created 2026-09-18 · closed 2026-09-26_
sam added the mediumbug labels 2026-10-27 13:39:01 +00:00
sam self-assigned this 2026-10-27 13:39:01 +00:00
sam closed this issue 2026-10-27 13:39:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1102