Skip to content

Fix Python 3.11 CI lint blockers in CLI output flow and L2 expert routing - #3

Merged
faresrafat3 merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-job
Jul 21, 2026
Merged

Fix Python 3.11 CI lint blockers in CLI output flow and L2 expert routing#3
faresrafat3 merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

The build (3.11) Actions job failed in Ruff’s hard-error gate due to a syntax break in cli.py and an undefined spec reference in l2_conductor.py. This PR applies focused fixes to restore parseability and correct expert routing input flow.

  • CLI syntax and control-flow correction

    • Replaced the broken multiline f-string with a valid single-line call.
    • Corrected the if/else structure so claim rendering and fallback messaging are syntactically valid.
  • L2 conductor routing fix

    • Updated _route_experts to accept ProjectSpec instead of only domain.
    • Derived domain from spec inside _route_experts, allowing generate_dynamic_expert(spec) to use a defined symbol.
    • Updated call site to pass spec directly.
  • Illustrative diff snippet

    # before
    def _route_experts(self, domain: str) -> list[EpistemicExpert]:
        dynamic_expert = generate_dynamic_expert(spec)
    
    # after
    def _route_experts(self, spec: ProjectSpec) -> list[EpistemicExpert]:
        domain = spec.domain
        dynamic_expert = generate_dynamic_expert(spec)

Copilot AI changed the title [WIP] Fix the failing GitHub Actions job build (3.11) Fix Python 3.11 CI lint blockers in CLI output flow and L2 expert routing Jul 21, 2026
Copilot AI requested a review from faresrafat3 July 21, 2026 03:15
@faresrafat3
faresrafat3 marked this pull request as ready for review July 21, 2026 03:21
Copilot AI review requested due to automatic review settings July 21, 2026 03:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores Python 3.11 CI “hard-error” lint pass by fixing a CLI syntax break and correcting L2 expert routing so dynamic expert generation receives a valid ProjectSpec.

Changes:

  • Fixes CLI output flow by replacing an invalid multiline f-string and restoring syntactically valid control flow.
  • Updates L2 conductor routing to pass ProjectSpec through _route_experts and derive domain from spec for routing logic and dynamic expert generation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
epistemic_forge/pipeline/l2_conductor.py Passes ProjectSpec into _route_experts and uses it for dynamic expert generation and domain-based routing.
epistemic_forge/cli.py Repairs CLI printing/control flow to avoid syntax errors and ensure budget reporting prints correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread epistemic_forge/cli.py
Comment on lines 101 to 104
if hasattr(result, "claims"):
display_claim_lattice(result.claims)

console.print(f"
[bold yellow]💰 {budget_manager.get_report()}[/bold yellow]")
else:
console.print("[yellow]Notice: No claims extracted in the final result.[/yellow]")
@faresrafat3
faresrafat3 merged commit eadf174 into main Jul 21, 2026
4 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.

3 participants