Skip to content

fix(base): concrete-module imports for the init-time resolved module - #178

Merged
marlon-costa-dc merged 1 commit into
0.12.0-devfrom
fix/base-concrete-imports
Sep 21, 2026
Merged

marlon-costa-dc merged 1 commit into
0.12.0-devfrom
fix/base-concrete-imports

Conversation

@marlon-costa-dc

@marlon-costa-dc marlon-costa-dc commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

flext_cli/base.py resolves while the package root is still initializing (it is the lazy target of the s facade export). Its root-package import bound a partial module, so m.Cli raised AttributeError and the s export orphaned fleet-wide — every gen/conform importing flext-cli failed with cannot import name 's' from 'flext_cli'.

Fix: import the facade objects from their concrete owner modules (flext_cli.models/protocols/typings/utilities), which initialize without the root cycle.

Evidence

  • from flext_cli import c, m, p, r, s, settings, t, u — all resolve (was: ImportError on s).
  • Unblocks the flext-infra gen fixed point on CI (the fleet venv chain imports flext-cli).

Tracking

  • Adopted lane (>3h rule); beads flext-whndf.

Summary by cubic

Fixes an import-time failure when importing flext_cli during package root initialization. base.py previously imported facade objects from the root package, which bound a partial module and caused m.Cli to raise AttributeError, orphaning the s export and breaking from flext_cli import s. Now imports from the concrete owner modules (models, protocols, typings, utilities), which initialize without the root cycle, so all facade imports resolve normally.

Written for commit 1d8f061. Summary will update on new commits.

Review in cubic

base.py resolves during the package root's lazy 's' export, while the
root namespace is still initializing: 'from flext_cli import m' bound a
partial module and m.Cli raised AttributeError, orphaning the s export
fleet-wide (every gen/conform importing flext-cli failed). Import the
facade objects from their concrete owner modules instead.
@sonarqubecloud

Copy link
Copy Markdown

@marlon-costa-dc
marlon-costa-dc merged commit 1d8f061 into 0.12.0-dev Sep 21, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant