Skip to content

fix: PR #9 review fixes + full codebase audit — reviewed by Raven (Giggso)#10

Merged
giggsoinc merged 3 commits into
giggsoinc:mainfrom
SatishwaranM:fix/pr9-review-fixes
Jun 2, 2026
Merged

fix: PR #9 review fixes + full codebase audit — reviewed by Raven (Giggso)#10
giggsoinc merged 3 commits into
giggsoinc:mainfrom
SatishwaranM:fix/pr9-review-fixes

Conversation

@SatishwaranM

Copy link
Copy Markdown
Contributor

Summary

This PR consolidates and supersedes PR #7, PR #8, and PR #9 with all identified review issues resolved and a full codebase audit completed — reviewed end-to-end by Raven Enterprise (Giggso, shadow mode).


PR #9 Original Fixes (5)

  • setup_agent.ps1.templateparam() block moved before $ErrorActionPreference
  • scan_repo_discovery.py.frag — A/B TEST debug header removed
  • scan_repo_discovery.py.frag — 63-line v1.0.0 rollback block removed
  • scan_repo_discovery.py.frag_REPO_MAX_SECONDS tunable comment corrected
  • src/store/agent_store.py — multi-process safety NOTE added to _catalog_lock

PowerShell Template Hardening (8 fixes)

  • 5x UTF-8 BOM fix: Set-Content -Encoding UTF8 replaced with Write-Utf8NoBom helper
  • 2x repo discovery depth fix: -Depth 4 to -Depth 6 (matches _REPO_MAX_DEPTH = 6)
  • 1x TmpMeta security: try/finally guarantees OTP hash temp file is always deleted

Full Codebase Audit — 133 issues resolved

Reviewed by Raven Enterprise (Giggso Inc, shadow mode):

  • 87 bare/broad except clauses annotated across agent frags, dashboard UI, and src/
  • 3 oversized files refactored into sub-modules:
    • hourly_rollup.py split into _rollup_agg.py, _rollup_s3.py, _rollup_scheduler.py
    • rollup_reader.py split into _rollup_merge.py
    • agent_store.py OTP helpers extracted to _agent_otp.py
  • 7 files: LOC-exempt with documented architectural justification in source
  • 4 test files: loc-exempt markers removed (Raven policy: LOC cap is production-code only)
  • False-positive SECRET annotations added for AWS documentation example keys in tests
  • Dead-marker / hack comments cleaned in chat/engine.py and chat/tools.py
  • Fragment globals documented in scan_header.py.frag

Test Results

Suite Result
Unit tests 444 passed, 0 failures
Integration tests 14 errors — pre-existing, require LocalStack at localhost:4566

Full verification report: ghost-ai-scanner/docs/full_fix_verification_report.pdf


Files Changed

67 files: 57 modified + 10 new (5 sub-modules + 5 docs/reports)


Supersedes

Closes #7 — Cross-platform installer fixes (included here)
Closes #8 — Scan pipeline performance (included here)
Closes #9 — PR #9 base branch (all fixes applied + full audit on top)


Reviewed by: Raven Enterprise — Giggso Inc (shadow mode)

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

SatishwaranM and others added 3 commits May 25, 2026 20:43
- scan_tools_code: replace Path.rglob with os.scandir + early pruning

- scan_repo_discovery: v2 multi-OS walker (6-rule algorithm, all drives)

- setup_agent.ps1: ExecutionTimeLimit PT2M to PT10M

- repo_discovery.yaml: updated config for v2 walker

- test fixes: encoding, MAX_PATH, new regression coverage

Tested: 22 unit tests pass, 355 full suite, e2e 3.06s on 113 repos
…ndling

- Add missing 'import platform as _platform' (P2)
- Add WSL1 detection fallback using os.environ.get('WSL_DISTRO_NAME') (P1)
- Improve Windows drive type check error handling for WSL2 compat (P2)
- Verify macOS gcloud exclusion via absolute path check (P1)

All 13 regression tests pass. Fixes giggsoinc#8 Raven feedback.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…Raven (Giggso)

PR giggsoinc#9 original fixes (5):
- PowerShell param() block moved before ErrorActionPreference
- Removed A/B TEST debug header from scan_repo_discovery.py.frag
- Removed 63-line v1.0.0 rollback block from scan_repo_discovery.py.frag
- Corrected _REPO_MAX_SECONDS tunable comment
- Added multi-process safety NOTE to _catalog_lock in agent_store.py

PowerShell template hardening (8):
- 5x UTF-8 BOM fix: Set-Content replaced with Write-Utf8NoBom helper
- 2x depth fix: -Depth 4 to -Depth 6 to match _REPO_MAX_DEPTH=6
- 1x TmpMeta security: try/finally ensures OTP hash temp file always deleted

Full codebase audit via Raven Enterprise (shadow mode) - 133 issues resolved:
- 87 bare/broad except clauses annotated across frags, dashboard, src/
- 3 files refactored into sub-modules (hourly_rollup, rollup_reader, agent_store)
  New: _rollup_agg.py, _rollup_s3.py, _rollup_scheduler.py, _rollup_merge.py, _agent_otp.py
- 7 LOC-exempt files: architectural justification documented in source
- 4 test files: loc-exempt markers removed (policy: cap is production-only)
- 2 false-positive SECRET annotations added for AWS docs example keys
- Dead-marker and hack comments cleaned in chat/engine.py and chat/tools.py
- Fragment globals documented in scan_header.py.frag

Test results: 444 passed, 1 skipped, 0 failures
Integration errors: 14 pre-existing (require LocalStack, unrelated to changes)

Supersedes: PR giggsoinc#7, PR giggsoinc#8, PR giggsoinc#9
Reviewed by: Raven Enterprise (shadow mode) - Giggso Inc
Report: docs/full_fix_verification_report.pdf

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@giggsoinc giggsoinc merged commit 79bdcc8 into giggsoinc:main Jun 2, 2026
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