From bd79b46e96775534a98696f4be3d862bba3963dc Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:07:35 +0000 Subject: [PATCH] fix(CODEWIKI-007): Config constructed via Config.from_args at call site inside background worker, bypassing web-app factory --- codewiki/src/fe/background_worker.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/codewiki/src/fe/background_worker.py b/codewiki/src/fe/background_worker.py index 007ef88c..dac8a9c0 100644 --- a/codewiki/src/fe/background_worker.py +++ b/codewiki/src/fe/background_worker.py @@ -204,11 +204,8 @@ def _process_job(self, job_id: str): job.progress = "Analyzing repository structure..." # Create config for documentation generation (using env vars) - import argparse - args = argparse.Namespace(repo_path=temp_repo_dir) - config = Config.from_args(args) - # Override docs_dir with job-specific directory using config constants - config.docs_dir = os.path.join(OUTPUT_BASE_DIR, DOCS_DIR, f"{job_id}-docs") + docs_dir = os.path.join(OUTPUT_BASE_DIR, DOCS_DIR, f"{job_id}-docs") + config = Config.from_web_job(repo_path=temp_repo_dir, docs_dir=docs_dir) job.progress = "Generating documentation..." @@ -253,4 +250,4 @@ def _process_job(self, job_id: str): try: subprocess.run(['rm', '-rf', temp_repo_dir], check=True) except Exception as e: - print(f"Failed to cleanup temp directory: {e}") \ No newline at end of file + print(f"Failed to cleanup temp directory: {e}")