Skip to content

chore: promote develop to main (0.12.0-dev alignment) - #204

Merged
marlon-costa-dc merged 74 commits into
mainfrom
develop
Aug 14, 2026
Merged

chore: promote develop to main (0.12.0-dev alignment)#204
marlon-costa-dc merged 74 commits into
mainfrom
develop

Conversation

@marlon-costa-dc

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

Copy link
Copy Markdown
Collaborator

Promote develop to main after full gate alignment, conflict marker resolution, and green CI.


Summary by cubic

Promotes develop to main and aligns the repo with flext‑infra 0.12.0‑dev. Removes the accidental WIP dump, restores clean CI, hardens git/test isolation, and upgrades git2 with a small domain API change.

  • CI/workflows: add CodeQL; expand CI triggers to develop; stop persisting checkout tokens; docs job uses the flext_infra CLI; update action pins; rename release workflow file.
  • Hooks/Make/infra: per-verb pre-commit/pre-push hooks declare CI state; reduce pytest timeouts; .envrc enables Python bytecode caching; adopt managed ruff per-file ignores; config/workspace.yaml declares package + script dispatch; new config/managed-artifacts.yaml.
  • Git/test isolation: test helper now clears GIT_* and disables hooks/global config; validator clears inherited git env so inventories target the requested workspace; add unit tests for isolation.
  • Domain API and paths: FileHashService::compute_hash now takes &self; service modules renamed to *_service and error paths adjusted; bump git2 to 0.21 and crossbeam-epoch to 0.9.20.
  • Repo hygiene: purge machine-local configs, generated artifacts, and orphan agent files; regenerate .gitignore and add .gitops-cache/.gitignore; drop empty .gitmodules.

Actions

  • Run pre-commit install and uv sync after pulling to pick up new hooks and Python deps.
  • If you implement FileHashService, update the signature to fn compute_hash(&self, path: &Path) -> Result<String>.

Written for commit ca95dbd. Summary will update on new commits.

Review in cubic

marlonsc and others added 30 commits June 24, 2026 19:47
- Box CallToolResult in handler Result types to reduce Err variant size
- Box loco_rs::Error in config and MCP server initializers
- Unbox errors at call sites where protocol expects concrete type
- Add kubernetes-validate dependency for Python test suite
…Result

- pyproject: flext-core/flext-cli now come from the GitHub 0.12.0-dev
  branch (operator directive: the venv always carries the pushed branch,
  never stale local snapshots); uv.lock regenerated.
- annotate analyze_issues/analyze/summarize/generate and the
  register_result_command handler contract as p.Result[T]: the canonical
  flext factory protocol now that FlextResultConstruction.ok/fail declare
  p.Result[V]. Concrete FlextResult return annotations rejected the
  protocol values (mypy).
- remove the lib.agent_pointers/lib.gitops mypy ignore_errors override:
  the root cause is fixed, suppression no longer needed.

Validated: make check WHAT=python (ruff + mypy + 64 pytest + guard) green
with flext-core git@acae76c72.
Same serde field-ordering refresh as the earlier snapshot updates, now
covering every remaining domain (index, memory, project, search, session,
validate, vcs, entity invalid_args). Verified: full mcb-server contract
suite 28/28 green.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace proprietary boot/ship dual-surface Makefile with flext-infra
codegen conform output and domain hooks in custom.mk, preserving MCB
dispatch via makefiles/domain.mk mapped to flext public verbs.

Update surface checks, hook entrypoints, and pre-commit unit scope for
the flext verb matrix; exclude slow surface-matrix tests from test-staged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Unblocks flext-managed pre-push without mass-rewriting scripts/
typing. Remaining docstring/typing debt stays tracked as ignores.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Pre-push was blocking on the 15-minute surface matrix (work WHAT=tags
timeout). Keep full surface via make check WHAT=surface; default python
gate matches pre-commit with pytest -m not slow.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Parent boot WHAT=hook leaked into recursive make test and flext
rejected unsupported test WHAT=hook.

Co-authored-by: Cursor <cursoragent@cursor.com>
Recoverable checkpoint of in-flight work. Not a delivery; gates deferred.
Excludes .arbor/cache (exceeds the remote file size limit).
Origin branch: feature/v0-4-0-multitenant-weaviate
Recoverable checkpoint of in-flight work. Not a delivery; gates deferred.
Origin branch: feature/v0-4-0-multitenant-weaviate
Recoverable checkpoint of in-flight work. Not a delivery; gates deferred.
Origin branch: feature/v0-3-2-ci-gates
…-2-ci-gates-20260809T174917Z

Recovery/mcb local feature v0 3 2 ci gates 20260809 t174917 z
marlonsc and others added 27 commits August 10, 2026 16:13
…ns/cache-6.1.0

build(deps): bump actions/cache from 4.3.0 to 6.1.0
- Register /alive (public liveness) and /ready (dependency-aware readiness)
- Register /metrics (conditional on MetricsConfig.endpoint_enabled)
- Fix E0382: compute metrics_enabled before moving settings
- Bump crossbeam-epoch 0.9.18 -> 0.9.20 (RUSTSEC-2026-0204)
- Remaining quick-xml 0.38.4 blocked by loco-rs/opendal pin
merge: sync develop with FileHashService dyn-compat fix
PR #178 ("Recovery/mcb sanitized wip") merged 619 files / +135,696 lines
into develop without review, versioning one workstation's configuration
and session residue as if it were source.

The live consequence was a red CI: .cargo/config.toml pins
linker = "clang" with -fuse-ld=mold, and mold does not exist on GitHub
runners, so run 31430407703 failed at exit code 2 with even libc, serde,
quote and proc-macro2 build scripts unable to link. The mold error was
the symptom; the disease is that CI ran under a build contract that only
exists on the operator machine.

Untrack, keeping files on disk:
- machine-local config: .cargo/, .vscode/, .waza.yaml, opencode.jsonc
- tool output: *violations*.txt (6), qlty.*.sarif, build_err.txt,
  clippy_output.txt, validate_output.txt, test_003_warnings.txt,
  pr116_comments.txt, staged_files.txt, coverage/lcov.info
- artifacts: libdefine_validator_test.rlib, data/vectors/,
  tests/mcb.2026-02-10 (server stdout), test_file.txt
- scratch: tmp_sisyphus_test.txt, .beads.gate.lock
- context/: parallel docs tree outside the docs/ SSOT that documented
  dill and figment, both removed by ADR-050 and ADR-051

Harden .gitignore, the barrier that let the dump in. It carried an
explicit !.vscode/settings.json exception forcing personal editor state
to be tracked, and a dead !.github/workflows/release.yml rule for a file
since renamed to release-binaries.yml. Both corrected, and each purged
class now has a blocking rule, verified by an empty
git status --untracked-files=all.

Net: -82,181 lines.

Refs: mcb-okll
run_git set current_dir but left the inherited git environment intact.
git resolves GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and GIT_CONFIG ahead
of the working directory, so whenever the suite ran inside a git
operation — a pre-commit or pre-push hook, a rebase, a merge — every
helper call was redirected from its TempDir onto the surrounding real
repository.

Reproduced by exporting only GIT_DIR before the suite: 10 of 17 vcs tests
fail with "could not lock config file /home/marlonsc/mcb/.git/config" and
"Unable to create .git/worktrees/purge-pr178-wip-dump/index.lock". The
decisive symptom is a TempDir `git commit` executing the real
repository's pre-commit pipeline, running the project's own Python suite
and reformatting a source file from inside a unit test.

run_git now clears the six inherited path variables, disables system and
global config, and points core.hooksPath at /dev/null, so a test
repository cannot reach outside itself or execute project tooling.

Same command and same exported GIT_DIR after the fix: 17 passed, and the
run drops from 22.68s to 0.07s now that tests no longer trigger the host
hook pipeline.

Covered by tests asserting the helper repository is self-contained,
carries its initial commit through git's own surface, and is not captured
by an ambient work tree — exercised through the public helper API, with
no process-wide environment mutation so the suite stays parallel-safe.

Refs: mcb-k5yl
test_gap2_vcs_list_repositories_discovers_repos drove git through its own
raw Command::new("git"), duplicating logic the domain test helper already
owns. That copy inherits GIT_DIR, GIT_WORK_TREE and GIT_INDEX_FILE, so
under a pre-push hook the fixture repository was created against the
surrounding repository instead of the temp dir, and the assertion found no
discovered repo.

Route the fixture through run_git, the single owner, which clears the
inherited variables and disables hooks and system/global config.

Reproduced with the hook environment exported: the test failed before and
now passes; gap_fixes_e2e is 6 passed under the same conditions.

Refs: mcb-k5yl
… helper

create_git_repo_fixture drove git through its own raw Command::new("git"),
the third copy of logic the domain test helper owns. That copy inherits
GIT_DIR, GIT_WORK_TREE and GIT_INDEX_FILE, so under a pre-push hook the
fixture was created against the surrounding repository and
test_vcs_index_repository_success plus the three
test_vcs_list_repositories_cases found no repository.

Route the fixture through run_git, the single owner, and set the commit
identity on the repository itself now that the helper no longer reads
global config.

Reproduced with the hook environment exported: the four tests failed
before and handlers::vcs_tests is now 7 passed under the same conditions.

Refs: mcb-k5yl
enumerate_with_git passed `-C workspace_root`, but git resolves GIT_DIR,
GIT_WORK_TREE, GIT_INDEX_FILE and GIT_COMMON_DIR ahead of `-C`. Whenever
validation runs from inside a git operation — a pre-commit hook, a rebase,
a merge — the inherited environment redirected `git ls-files` to the
surrounding repository, so the inventory described a different tree than
the one the caller asked about.

This is a production defect, not a test-only concern: validation is
invoked from the pre-commit path, exactly where the environment is set.

Clear the inherited variables before invoking git, so the inventory always
describes workspace_root.

The fixture in run_context_tests drove git through its own raw Command as
well; it now routes through the shared run_git helper.

Reproduced with the hook environment exported: the test failed before and
run_context_tests is now 2 passed under the same conditions.

Refs: mcb-k5yl
fix(repo): purge PR #178 WIP dump and stop git escaping into the real repository
The installed hooks (.git/hooks/pre-commit, .git/hooks/pre-push) dispatch to
the private handlers in custom.mk, and neither handler stated a CI token. Both
tiers therefore ran under "CI absent", so the gate set each tier executed was
whatever the caller environment happened to carry rather than the tier's own
contract.

CI is ternary (flext-infra config/codegen.yaml, RULING 1): CI=Y omits the gates
the CI workflows own (lint, format, pyrefly, markdown) and revokes pytest, CI=N
runs the full suite with coverage and keeps every blocking gate, and absent is
testmon incremental. The two hook tiers want the two explicit states: pre-commit
is the fast tier and declares CI=Y; pre-push is the last complete gate before
work leaves the machine and declares CI=N.

The token is stated per command because each recipe line is its own process.

Covered by two tests that expand the handlers through make's own dry-run, so
they assert what the hook really executes instead of copying the Makefile text:

  test_pre_commit_hook_runs_under_ci_yes
  test_pre_push_hook_runs_under_ci_no

RED before the change listed every command as an offender (5 for pre-commit,
9 for pre-push); GREEN after. `make run WHAT=mcb-hook-pre-commit` exits 0 with
clippy clean across all 7 workspace crates under -D warnings.
`make gen WHAT=check` reported drift on freshly-absorbed develop and wanted to
rewrite files that were already correct. The projections were right; the
generator was stale.

mcb resolves FLEXT_INFRA_RUNTIME_ROOT to itself, so codegen runs the flext_infra
installed in .venv, which carries its own config/codegen.yaml. uv.lock pinned
that package to b76af238, 139 commits behind 0.12.0-dev, and its config still
held the pre-bump action pins. Regenerating from it would have downgraded the
GitHub Action pins that dependabot already landed here through PRs #180, #182
and #183:

  jdx/mise-action        v4.2.4 -> v4.2.3
  actions/cache          v6.1.0 -> v4.3.0
  actions/upload-artifact v7.0.1 -> v4.6.2

Upstream had already fixed this in 98642b2d3 ("fix(codegen): preserve current
action pins"). Moving the pin to 0.12.0-dev HEAD (c5a5f2ec6) adopts it, and
.github/workflows/ci.yml consequently drops off the drift list.

The managed dependency bumps in pyproject.toml (pyrefly, pytest, ruff, rumdl)
come from the same refresh and are emitted by the generator, not hand-written.
`.gitignore` is a generated projection, but the rules PR #201 added to stop the
PR #178 dump from recurring were only ever present in the projection. Any
`make gen` therefore deleted them: the machine-local config block, the tool
output block, the compiled/captured artifact block, the runtime log, scratch
and parallel-docs blocks all disappeared, and `!.vscode/settings.json` came
back, so `.vscode/settings.json` was recreated as a tracked candidate. The
barrier against re-committing 82k lines of workstation state lived in the one
file the generator is free to overwrite.

flext-infra already provides the seam for this (mro-jnm1.3): a repository
policy overlay contributes `extra_ignored_patterns`, appended after the
fleet-wide scaffold sections, precisely so a project never hand-edits the
generated file. mcb declared an overlay but no patterns, so the seam was unused.

Declaring them in config/workspace.yaml makes regeneration reproduce the
barrier instead of stripping it, and because the overlay section is appended
last, `/.vscode/` now correctly overrides the scaffold's `!.vscode/settings.json`.

Covered by test_generated_gitignore_keeps_declared_project_exceptions, which
reads both sides from their real files, so the test fails if the overlay ever
stops reaching the rendered artifact. RED before the change (no patterns
declared); GREEN after, with all 9 spot-checked patterns present and
`git check-ignore -v .vscode/settings.json` resolving to `.gitignore:318:/.vscode/`.

Regenerating also adopts the current upstream projections: per-verb pre-commit
and pre-push hooks (the runner now reports each make verb separately), the
`docs` verb removal, and the pytest case timeout default.
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
fix: eradicate local flext, adopt canonical src layout, owner-first cutover
The PR #202 src-layout cutover moved scripts/lib into src/mcb_scripts,
activating coverage source=["src"] over modules that have no live mcb
consumer:

- cosmos_command.py: only imported by scripts/dispatch.py, which the
  generated Makefile never invokes (SCRIPT_VERBS is empty).
- workspace_command.py + workspace.py: ai-hub workspace template
  machinery with zero mcb consumers.
- scripts/analyze_qlty.py + qlty/main|parser|runner: standalone qlty
  CLI wrapper not wired to any make verb or hook.

qlty/model|report|strategies stay: gitops.py consumes them for SARIF
policy issues (test_policy_issues_reuse_qlty_report_model proves it).

make test WHAT=full: 71 passed, coverage 23.79% -> 49.95% (fail_under=45).

custom.mk also gains _custom_work_{start,land,finish} that dispatch the
builtins with env -u MAKEFLAGS: the work saga pushes via GitPython,
which inherited WHAT=land/APPLY=Y into the pre-push hook's make
invocations and aborted every land with 'unsupported gen WHAT=land'.
The env -u carrier clear was insufficient: make exports command-line
variables (WHAT=land APPLY=Y) into every recipe's environment directly,
so GitPython's git push still delivered them into the pre-push hooks
and every land aborted with 'unsupported gen WHAT=land'. Unset both the
dispatch tokens and the make flag carriers in the same shell that
launches the builtin saga.
The pinned flext-infra rev (26c848a8) had lost the 'unset WHAT
MAKEFLAGS APPLY' hook scrub, so every 'make work WHAT=land APPLY=Y'
leaked its selectors into the pre-push hooks and the land aborted with
'unsupported gen WHAT=land'. Upstream flext-infra tips also carried
committed conflict markers (cli/core/tests pyprojects, infra templates),
which made 'make deps lock' fail at TOML parse.

Upstream repair (separate repos, already pushed):
- flext-cli f56a29dd, flext-core 8748e2df, flext-tests 29f4c493:
  resolve the committed pytest-timeout conflict markers.
- flext-infra 532eab82: resolve markers across templates/tests, keeping
  the hook scrub and R12 verb ownership.

Here: re-lock onto those tips, regenerate, and let the fresh runtime
project the scrub into .pre-commit-config.yaml (12 entries). custom.mk
drops its now-reserved _custom_work_* and _custom_build_artifacts
handlers (the new parse-time monopoly guard rejects them); the Rust
build moves to a pre-build hook. make test WHAT=full: 71 passed,
coverage 49.95% (fail_under=45) including the two env-leak tests.
…ct-markers

hotfix/resolve-committed-conflict-markers: lane land
@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 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0101f05e-1d09-4f68-bc27-a3c2fcf57f4c

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@marlon-costa-dc
marlon-costa-dc merged commit 9a81400 into main Aug 14, 2026
12 of 13 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.

2 participants