Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Summary

  • What: Fix malformed scripts/orchestrate_content.py where main() was nested inside call_ollama()'s exception handler
  • Why: File was non-functional—main() defined but never callable, references to undefined process_module() and orchestrate()

Changes

  • Restored proper module structure:
    • call_ollama() - HTTP retry logic with status code validation
    • process_module() - per-module processing with quality guards
    • orchestrate() - async orchestration with semaphore concurrency
    • main() - CLI entry point at module level
  • All functions now at correct scope with proper control flow

Testing

  • All 9 existing tests pass
  • Python syntax validation confirms AST structure

Checklist

  • File structure corrected
  • All referenced functions defined
  • Tests pass
  • Code review complete

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: 73junito <86015877+73junito@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from PR 158 review comments Fix broken file structure in scripts/orchestrate_content.py Jan 16, 2026
Copilot AI requested a review from 73junito January 16, 2026 01:51
@73junito 73junito requested a review from Copilot January 16, 2026 09:28
Copy link
Owner

@73junito 73junito left a comment

Choose a reason for hiding this comment

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

viewed

@73junito 73junito marked this pull request as ready for review January 16, 2026 09:28
@73junito 73junito merged commit 96ca163 into merge/pr-158-local Jan 16, 2026
5 of 8 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical file structure bug in scripts/orchestrate_content.py where the main() function was incorrectly nested inside call_ollama()'s exception handler, making the script non-functional. The fix restores proper module structure by moving all top-level functions to the correct scope.

Changes:

  • Fixed malformed file structure by moving main(), process_module(), and orchestrate() functions to module level
  • Enhanced HTTP error handling in call_ollama() with explicit status code validation and proper timeout configuration
  • Simplified command-line interface while maintaining full programmatic API flexibility

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants