Skip to content

Wip/session suspend 20260824 archive mro 0tvv 1 backup disabled flext cli - #108

Open
marlon-costa-dc wants to merge 50 commits into
0.12.0-devfrom
wip/session-suspend-20260824-archive-mro-0tvv-1-backup-disabled-flext-cli
Open

Wip/session suspend 20260824 archive mro 0tvv 1 backup disabled flext cli#108
marlon-costa-dc wants to merge 50 commits into
0.12.0-devfrom
wip/session-suspend-20260824-archive-mro-0tvv-1-backup-disabled-flext-cli

Conversation

@marlon-costa-dc

@marlon-costa-dc marlon-costa-dc commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Archive non-critical scaffolding and generated docs, and switch to an aggressive allowlist .gitignore. Updates docs/README to 0.20.0 and aligns examples and imports with the current public API to resolve import-time errors.

  • .gitignore now blocks all files by default and whitelists only core directories (src, tests, docs, examples, .github, etc.) and a small set of root configs.
  • Removes generated docs and site plumbing (api-reference, guides, mkdocs.yml, index.md), quality/agent tooling and local env files (.qlty, .scope, .claude, .mcp.json, .envrc, .mise.toml, .agents/*), and legacy build/test helpers (custom.mk, conftest.py).
  • Public API examples adopt cli.json_read_file (was cli.read_json_file), and standardize on t.ConfigDict for Pydantic model config; fixes runtime import cycles and crashes in constants/models.
  • README.md and docs index now report version 0.20.0; pyproject.toml simplified to match the trimmed surface.

Required migration

  • Replace cli.read_json_file(...) with cli.json_read_file(...).
  • If CI invoked docs builds or quality/agent pipelines (MkDocs, Qlty, Scope, AI Hub), remove or update those jobs to reflect the deleted configs and content.
  • Import constants/types via the public facades (from flext_cli import c, t, p, m) rather than private _constants modules.

Written for commit 78d958c. Summary will update on new commits.

Review in cubic

Marlon Costa added 30 commits July 13, 2026 12:21
files_parse_content dispatched JSON/YAML only; ai-hub (golden parser, MCP
validators, config generators) re-implemented TOML dispatch in ~10 places for
lack of a single canonical reader. Add a TOML branch delegating to the existing
toml_-prefixed FlextCliUtilitiesToml.toml_read_json, keyed on the new
FileFormat.TOML / c.Cli.FILE_FORMAT_TOML constant. One canonical format-dispatch
reader now covers json+yaml+toml; downstream consumers route through it.

ruff/format/pyrefly/mypy 0 on both files; toml/json/yaml all parse via u.Cli.
- Updated test assertions to use `tm.that` for consistency across test cases.
- Enhanced docstrings for better understanding of test purposes.
- Adjusted type hints and imports for clarity and correctness.
- Improved handling of expected outcomes in tests, particularly for error cases.
- Refactored tests to ensure they accurately reflect the intended behavior of the code.
- Ensured that all tests maintain a clear structure and follow best practices for readability.
TARGET: flext-cli public TOML utility facade and behavioral tests.

IMPACT: non-breaking internal utility addition consumed by flext-infra structural codegen.

RISK: low; fixed-cardinality mutation is prevalidated atomically and covered across nested lookups and invalid requests.
…ts imports

model_config annotations use t.ConfigDict (the typings alias) instead of the
non-existent p.ConfigDict, which crashed flext_cli.m at import (FlextProtocols
has no ConfigDict). 19 sites across _models/pipeline.py + _models/_base/*.
Remove the now-unused p imports (their only use was p.ConfigDict).

constants.py imports the 11 FlextCliConstants* classes directly from their
_constants submodules (mirrors models.py), because the generated _constants
barrel is empty; this unblocks the whole import chain.

Impact: fixes an import-time crash cascading to every flext_cli consumer.
Risk: low (ruff+pyrefly 0 on all 8 files; flext_cli.m loads again).
flext-cli owns the TOML domain. Add the declarative TOML operation models
(TomlSetOp/TomlListOp/TomlRemoveOp/TomlOperation/TomlPhaseConfig + Builder DSL)
and their enums (c.Cli.TomlOperationKind/TomlMergeMode), composed into m.Cli /
c.Cli via MRO. These supersede the duplicated flext-infra models; downstream
projects will consume m.Cli.Toml* directly (net-negative LOC). Tracked mro-gzj0.
Structural contracts mirroring the m.Cli.Toml* operation models
(TomlSetOp/TomlListOp/TomlRemoveOp/TomlOperation/TomlPhaseConfig), composed
into p.Cli via the pure-MRO protocols facade. Consumers type against
p.Cli.Toml* (DIP) instead of the concrete m classes; this supersedes the
absent p.Infra.Deps.Toml.* protocols in flext-infra. Tracked mro-gzj0.
Marlon Costa added 20 commits July 16, 2026 20:36
…mro-wkii.17.26.12)

typer 0.26.8 moved OptionInfo from the typer package root to typer.models;
'from typer import OptionInfo' raised ImportError blocking flext-cli u facade
-> cascaded to every flext-cli consumer fleet-wide.
…n transaction probe resolves

TARGET: flext-cli _models/_base OptionSpec (t.StrSequence/t.Cli.Value fields).
IMPACT: non-breaking (moves 't' TYPE_CHECKING->runtime; model resolves at class-build).
RISK: low - OptionSpec __pydantic_complete__=True; ruff clean.

The codegen transaction-worktree import-probe checks out committed HEAD; with 't'
under TYPE_CHECKING the generated OptionSpec was 'not fully defined' at CLI
command-build time, breaking 'flext-infra codegen init'. Runtime import fixes it.

mro-28cb
…peline/rules/template/toml/base)

TARGET: flext-cli _models pipeline/rules/template/toml/_base_part_05.
IMPACT: non-breaking (Path/Callable/t field-types moved TYPE_CHECKING->runtime so Pydantic resolves at class-build; no model_rebuild).
RISK: low - full facade import OK; ruff clean; models resolve (only cross-cutting AutoSettings pending in settings.py).

Same loading-order class as flext-core mro-rs10: models with future-annotations +
field types under TYPE_CHECKING left __pydantic_complete__=False. Move runtime-needed
field-type imports to module runtime.
… reality

Resolve conflicts to 0.20.0-dev; untrack runtime/agent junk that 0.12.0-dev
tracked via its broken .gitignore; drop 0.12.0-dev-only extras; absorb
non-conflicting 0.12.0-dev changes.
…sion

- Fix real src bugs (undefined names, dup p-imports, MappingProxyType import,
  dup __all__, over-indent, dup class field) and restore flext_cli _utilities/env
  (0.20.0-dev referenced a deleted module)
- Fix undefined-name in tests by importing the used facade (p/m/t/settings)
- Bound tests/** per-file-ignores in flext-infra tooling SSOT; make the
  modernizer authoritative over stale pyproject per-file-ignores
- Move pyrefly missing-attribute/-module-attribute to disabled-errors to match
  mypy attr-defined and pyright reportAttributeAccessIssue (lazy-facade limit)
- Regenerate managed pyproject/base.mk/.gitignore/Makefiles
…gression

- tooling SSOT: move pyrefly missing-attribute/-module-attribute to
  disabled-errors (lazy PEP 562 facades cannot be modeled statically; matches
  mypy attr-defined + pyright reportAttributeAccessIssue)
- worktree transaction: honor request.allow_lint_regression (theirs' model field
  was passed by cli_transaction but ours' utility ignored it after the merge)
- regenerate managed pyproject.toml across the workspace
@sonarqubecloud

Copy link
Copy Markdown

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