Skip to content

fix(local): preserve manual gates without PyYAML - #63

Open
MertensMing wants to merge 1 commit into
Tencent:mainfrom
MertensMing:codex/loopforge-49-config-gates
Open

MertensMing wants to merge 1 commit into
Tencent:mainfrom
MertensMing:codex/loopforge-49-config-gates

Conversation

@MertensMing

Copy link
Copy Markdown

What changed

Fixes #49.

The Classic CodeBuddy hook skipped manual gates without PyYAML. It now reads plain multi.auto_mode settings with the standard library.

PyYAML missing -> read the plain multi.auto_mode setting
Config unreadable -> keep manual gates with main
Partial override -> preserve the default auto_mode value

The log records config_unreadable for read or parse errors. Thanks to pcbeingused333 for the follow-up discussion in #49.

Scope

  • Classic

Compatibility

This change affects the Classic CodeBuddy hook. The fallback supports plain block mappings and boolean values. Complex syntax without PyYAML keeps manual gates with main. PyYAML remains the parser for full YAML syntax.

Evidence

  • Before: Two new tests produced six failures with the YAML import blocked.
  • After: All eight Classic runtime tests pass. They cover all three gates, both modes, invalid values, read errors, and partial overrides.

Validation

Commands ran from local/.

  • Passed: python3 scripts/build-classic-hosts.py --write and --check.
  • Passed: bash scripts/validate.sh.
  • Passed: bash scripts/smoke-install.sh.
  • Passed: bash scripts/smoke-npm.sh.
  • Passed: bash scripts/smoke-curl-install.sh.
  • Passed: bash scripts/e2e.sh (30 tests, one browser suite skipped).
  • Passed: final Classic runtime tests (8 tests).
  • Passed: bash scripts/test-observability.sh (132 tests).
  • Skipped: the browser suite needs Playwright.
  • Blocked: bash scripts/scan-secrets.sh requires Linux x86_64. This machine runs macOS.
  • Not run: platform tests. This change only affects Local.

Safety

  • I did not include credentials or private infrastructure.
  • I preserved user files and unrelated changes.
  • I ran the Classic bundle generator. It produced no changes.
  • This change adds no third-party content.

Merge Danger

Door: two-way
Blast Radius: CodeBuddy

Unsupported YAML syntax without PyYAML requires manual review at gate events.

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.

[Bug]: Classic CodeBuddy ignores auto_mode: false when PyYAML is not installed, so manual gates are skipped

1 participant