bug(doeff-secret): env fallback handler yields removed Delegate — RuntimeError on every fallback path

Open Beginner friendly
#470 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
backend

Research direction

Start in packages/doeff-secret/src/doeff_secret/handlers.py and compare its fallback handling with doeff_core_effects/handlers.py. Use rg -n 'Delegate' packages/doeff-secret/ to find all affected references, then run or extend the doeff-secret tests for a missing GetSecret key with an inner handler. Done means the fallback propagates without RuntimeError, the search returns zero hits, and the relevant suites pass.

Written by the indexing model from the issue text.

Description

Problem

packages/doeff-secret/src/doeff_secret/handlers.py:8 does from doeff import Delegate, but Delegate is a _Removed stub (doeff/init.py:159) that raises RuntimeError('Delegate was removed: use yield effect to re-perform in handler body') when called.

Both fallback paths in the env-var handler hit it:

  • handle_get_secret: non-GetSecret effect → yield Delegate() (handlers.py:~68)
  • secret not found in environ → yield Delegate() (handlers.py:~76)
  • outer handler: any non-GetSecret effect → yield Delegate() (handlers.py:~86)

So the handler crashes the moment any effect passes through it or a secret is missing. Discovered during the 2026-06-12 algebra coverage measurement (docs/crystallization/coverage-report.md 発見①). Migration leftover from the Delegate→Pass unification (constraint-graph.md B9; VM errors on Delegate at step.rs:258-264).

rg shows no external users of env_var_handlers — broken but unexercised.

Fix

Replace each yield Delegate(); return None with the Pass idiom used everywhere else (see doeff_core_effects/handlers.py reader/state/writer for the canonical shape):

yield Pass(effect, k)

and drop the Delegate import. Check the rest of doeff-secret for the same pattern (rg -n 'Delegate' packages/doeff-secret).

Verification

  1. rg -n 'Delegate' packages/doeff-secret/ → zero hits
  2. Add/extend a test that drives the fallback path: GetSecret for a missing key with an inner handler below — must propagate (not RuntimeError)
  3. Full doeff-secret test suite green; repo test suite green
Dominant language
Python
Stars
2
Forks
0
Avg merge
5h 6m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from proboscis/doeff

All issues in proboscis/doeff

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.