Skip to content

fix: eradicate local flext, adopt canonical src layout, owner-first cutover - #202

Merged
marlonsc merged 2 commits into
developfrom
bugfix/eradicate-local-flext
Aug 13, 2026
Merged

fix: eradicate local flext, adopt canonical src layout, owner-first cutover#202
marlonsc merged 2 commits into
developfrom
bugfix/eradicate-local-flext

Conversation

@marlon-costa-dc

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

Copy link
Copy Markdown
Collaborator

Summary

Eradicates every local-flext consumption vector, adopts the canonical FLEXT project layout (src/mcb_scripts, scripts, tests), and restores the owner's gates that were being silently disabled by local custom.mk overrides.

Changes

Eradicated (zero local flext references remain)

  • .claude/settings.json: removed extraKnownMarketplaces.flext/home/marlonsc/flext
  • mcb_scripts.egg-info: removed (flext-core @ file:///home/marlonsc/flext/*)
  • .agents/provider.toml, flext-law, flext-context-routing: local law copies removed
  • FLEXT_TO_MCB_MAPPING.md (root duplicate), FLEXT-INFRA-FIX-REQUEST.md: removed
  • 10 orphan submodule.vendor/* sections in .git/config
  • .gitmodules: sectionless file was blocking make work WHAT=start

Canonical Layout (src/, scripts, examples, tests only)

  • scripts/lib/*.pysrc/mcb_scripts/ (14 modules + qlty + docs)
  • scripts/lib/tests/tests/python/scripts_lib/
  • 57 imports rewritten via ast-grep
  • sys.path.insert bypass removed from 5 files
  • mcb_scripts.cli DELETED (72 lines reimplementing flext_cli.cli)

Owner-First Cutover

  • 8 consumers rewired to from flext_cli import cli
  • app()cli.execute_app(); model_rebuild() on 6 command models
  • toml (undeclared dependency) → tomllib (stdlib)

Gates Restored

  • _custom_check_all, _custom_fmt_*, _custom_fix_*, _custom_check_python, _custom_test_all were disabling the owner's gates. Removed; builtin now wins.
  • scripts/check/surface.py removed (38/44 cases asserted non-existent Make surface)

Documentation

  • Deleted design docs restored from git history (INTEGRATED_CONTEXT, SCHEMA, phase-9-roadmap, ADR 029/007)
  • All broken links repointed to real paths

Gates

make setup     → exit 0
make gen       → exit 0
make fmt       → exit 0
make fix       → exit 0
make check     → exit 0 (Success: 1, Failed: 0)
pytest         → 67 passed, 0 failed, 1 deselected

Upstream

  • flext-infra hook fix (CI=Y entry) pushed to origin/0.12.0-dev (commit 26c848a8)
  • gen WHAT=check ping-pong (executionEnvironments ordering) escalated as mcb-6umq

Summary by cubic

Eradicates all local FLEXT consumption and packages our Python tooling as mcb_scripts, restoring the owner's gates. Previously we imported from local paths and custom scripts/lib/cli.py while _custom_* targets disabled builtin gates; now we import from flext_cli/flext_core and the installed mcb_scripts package, and builtin gates run. Side effects: import paths changed, CI hooks simplified, .gitmodules removed, and toml replaced with tomllib.

  • Canonical Python layout and imports

    • Move scripts/lib/* into src/mcb_scripts/*; delete local CLI; remove all sys.path.insert bypasses.
    • Rewire 57 imports to mcb_scripts.*; eight consumers switch to from flext_cli import cli and call cli.execute_app(). Add model_rebuild() on six command models.
    • pyproject.toml: add wheel target for src/mcb_scripts, set mypy/pyright search paths to src, include scripts via config/workspace.yaml script_dispatch.
    • Replace undeclared toml with stdlib tomllib.
  • Gates, Makefile, and CI

    • Remove _custom_check_*, _custom_fmt_*, _custom_fix_*, _custom_test_*; builtin gates own Python fmt/check/test. Delete scripts/check/surface.py and its tests.
    • Makefile: treat repo as a package; expose dispatch seam; adjust public verbs and pytest timeouts.
    • CI: add actions/setup-python and CI=Y in matrix jobs; overhaul .pre-commit-config.yaml to run make verbs; remove shell hooks under scripts/hooks.
  • Tooling and infra cleanups

    • scripts/dispatch.py now drives mcb_scripts.cosmos_command; qlty runner resolves the binary via shutil.which.
    • Delete .gitmodules and stray submodule config; unblock make work WHAT=start.
    • Remove local .agents/* FLEXT copies and .claude marketplace entry; drop mcb_scripts.egg-info.
  • Documentation

    • Restore and add ADRs/guides; fix broken links and provider paths; rehome docs utilities under mcb_scripts.docs.
  • Gates status

    • make setup|gen|fmt|fix|check → 0; pytest → 67 passed, 0 failed, 1 deselected.
  • Migration

    • Run make setup to install mcb_scripts editable into your venv; update any out-of-tree imports to mcb_scripts.* if you have local scripts.

Written for commit 7c282be. Summary will update on new commits.

Review in cubic

The file held only comments after the third-party forks became pinned Cargo
dependencies: no [submodule] section, and no gitlink in the index either.

flext-infra reads it before any lifecycle step. Its own contract already
treats an ABSENT .gitmodules as no submodules and returns ok({}), but a
PRESENT file makes it shell out to git config -f .gitmodules --get-regexp,
which exits 1 when nothing matches. That non-zero exit surfaced as a hard
failure and stopped make work WHAT=start from provisioning any lane.

Removing the file restores the state the tooling already handles, and it is
what the generator renders for a project with zero gitlinks: base/gitmodules.j2
emits nothing when workspace_gitlinks is empty, so the comment block was a
hand-edit of a generated projection.
…utover

ERRADICATED: .claude/settings.json marketplace, mcb_scripts.egg-info,
.agents/provider.toml + flext-law, orphan submodules, .gitmodules.

CANONICAL LAYOUT: scripts/lib -> src/mcb_scripts (14 modules + qlty + docs),
57 imports rewritten, sys.path bypass removed, tests -> tests/python.

OWNER-FIRST: cli.py DELETED (reimplemented flext_cli.cli), 8 consumers
rewired, app()->cli.execute_app, model_rebuild on 6 models, toml->tomllib.

GATES RESTORED: _custom_* overrides removed, builtin wins, surface.py removed.

DOC REPAIR: deleted docs restored from git, broken links repointed.

setup=0 gen=0 fmt=0 fix=0 check=0 pytest=67p/0f
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 108 files, which is 8 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e20c36e5-8151-4ff7-b4f9-fc7d0c4b9f6b

📥 Commits

Reviewing files that changed from the base of the PR and between b997eb6 and 7c282be.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (108)
  • .agents/commands/flext-law.md
  • .agents/provider.toml
  • .agents/skills/flext-context-routing/SKILL.md
  • .agents/skills/flext-law/SKILL.md
  • .beads/config.yaml
  • .continue/rules/mcb.md
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/dependabot.yml
  • .github/workflows/ci-matrix.yml
  • .github/workflows/docs.yml
  • .gitignore
  • .gitmodules
  • .markdownlintignore
  • .pre-commit-config.yaml
  • .serena/memories/architecture.md
  • .serena/memories/build_test_guide.md
  • .serena/memories/coding_standards.md
  • .serena/memories/memory_maintenance.md
  • .serena/memories/project_overview.md
  • .superpowers/sdd/progress.md
  • AGENTS.md
  • FLEXT_TO_MCB_MAPPING.md
  • Makefile
  • config/managed-artifacts.yaml
  • config/workspace.yaml
  • crates/mcb-validate/tests/fixtures/rustlings/CHANGELOG.md
  • crates/mcb-validate/tests/fixtures/rustlings/CONTRIBUTING.md
  • crates/mcb-validate/tests/fixtures/rustlings/website/content/setup/index.md
  • custom.mk
  • docs/API_REFERENCE.md
  • docs/adr/006-code-audit-and-improvements.md
  • docs/adr/007-integrated-web-administration-interface.md
  • docs/adr/009-persistent-session-memory-v0.2.0.md
  • docs/adr/027-architecture-evolution-v013.md
  • docs/adr/029-hexagonal-architecture-dill.md
  • docs/adr/032-agent-quality-domain-extension.md
  • docs/adr/033-mcp-handler-consolidation.md
  • docs/adr/038-multi-tier-execution-model.md
  • docs/adr/048-observability-strategy.md
  • docs/adr/README.md
  • docs/adr/archive/superseded-032-agent-quality-domain.md
  • docs/architecture/ARCHITECTURE.md
  • docs/architecture/CLEAN_ARCHITECTURE.md
  • docs/configuration/ENVIRONMENT_VARIABLES.md
  • docs/design/workflow-management/SCHEMA.md
  • docs/developer/CONTRIBUTING.md
  • docs/developer/FLEXT_TO_MCB_MAPPING.md
  • docs/developer/SKILL_INDEX.md
  • docs/guides/features/INTEGRATED_CONTEXT.md
  • docs/implementation/phase-9-roadmap.md
  • docs/modules/domain.md
  • docs/modules/infrastructure.md
  • docs/modules/project.md
  • docs/modules/providers.md
  • docs/modules/validate.md
  • docs/testing/GOLDEN_TESTS_CONTRACT.md
  • docs/v040-KNOWLEDGE-GRAPH-SPEC.md
  • pyproject.toml
  • scripts/analyze_qlty.py
  • scripts/check/gitops.py
  • scripts/check/surface.py
  • scripts/codegen-conversions.py
  • scripts/codegen-post-process.py
  • scripts/dispatch.py
  • scripts/docs/py/check_links.py
  • scripts/docs/py/check_outdated.py
  • scripts/docs/py/check_source_refs.py
  • scripts/extract-migration-sql.py
  • scripts/hooks/pre-commit
  • scripts/hooks/pre-push
  • scripts/lib/cli.py
  • scripts/lib/tests/test_cli.py
  • scripts/lib/tests/test_make_surface.py
  • src/mcb_scripts/__init__.py
  • src/mcb_scripts/agent_pointers.py
  • src/mcb_scripts/constants.py
  • src/mcb_scripts/core.py
  • src/mcb_scripts/cosmos_command.py
  • src/mcb_scripts/docs/__init__.py
  • src/mcb_scripts/docs/utils.py
  • src/mcb_scripts/external_services_check.py
  • src/mcb_scripts/gitops.py
  • src/mcb_scripts/logger.py
  • src/mcb_scripts/qlty/__init__.py
  • src/mcb_scripts/qlty/main.py
  • src/mcb_scripts/qlty/model.py
  • src/mcb_scripts/qlty/parser.py
  • src/mcb_scripts/qlty/report.py
  • src/mcb_scripts/qlty/runner.py
  • src/mcb_scripts/qlty/strategies.py
  • src/mcb_scripts/result.py
  • src/mcb_scripts/service.py
  • src/mcb_scripts/settings.py
  • src/mcb_scripts/workspace.py
  • src/mcb_scripts/workspace_command.py
  • tests/fixtures/test_repo/src/string_utils.py
  • tests/python/scripts_lib/__init__.py
  • tests/python/scripts_lib/_fixtures/__init__.py
  • tests/python/scripts_lib/_utilities/__init__.py
  • tests/python/scripts_lib/_utilities/matchers.py
  • tests/python/scripts_lib/conftest.py
  • tests/python/scripts_lib/test_agent_pointers.py
  • tests/python/scripts_lib/test_core.py
  • tests/python/scripts_lib/test_dev_env_optimize.py
  • tests/python/scripts_lib/test_external_services_check.py
  • tests/python/scripts_lib/test_gitops.py
  • tests/python/scripts_lib/test_make_surface.py
  • tests/python/scripts_lib/test_mcb_sh.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@marlonsc
marlonsc merged commit 69832e7 into develop Aug 13, 2026
9 checks passed
@marlonsc
marlonsc deleted the bugfix/eradicate-local-flext branch August 13, 2026 16:53
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.

2 participants