Skip to content

chore: clean up ambiguous root files - #18

Merged
CoreyLeath-code merged 7 commits into
mainfrom
codex/root-directory-cleanup
Aug 6, 2026
Merged

chore: clean up ambiguous root files#18
CoreyLeath-code merged 7 commits into
mainfrom
codex/root-directory-cleanup

Conversation

@CoreyLeath-code

@CoreyLeath-code CoreyLeath-code commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Cleans up ambiguous root files without deleting uncertain source or build inputs.

  • Moves the unique ServiceMonitor manifest into k8s/.
  • Moves the unique historical repository-layout reference into docs/reference/.
  • Removes the duplicate root Test snapshot; tests/ is canonical.
  • Removes the now-stale .dockerignore entry for the relocated root layout file.
  • Adds a root-directory audit report with the required NEEDS HUMAN DECISION section for source files that cannot be safely deleted.

Files changed

File Change and reason
FILE Structure Deleted after relocation; a space-containing root documentation filename is not a stable canonical location.
docs/reference/historical-repository-layout.md New canonical historical location for the original layout snapshot; explicitly labelled non-generated.
Test Deleted; it was only a listing of the already canonical tests/ tree and had no repository reference.
Prometheus ServiceMonitor (Metrics Credibility) Deleted after relocation; a Kubernetes resource needs a conventional YAML filename under k8s/.
k8s/sentinelai-backend-servicemonitor.yaml New canonical ServiceMonitor manifest, content preserved from the root file.
.dockerignore Removes the only repository reference to FILE Structure; Markdown documentation is already covered by *.md.
docs/reference/root-directory-audit.md Records all dispositions and the mandatory uncertainty report.

Reference audit and preservation decisions

  • Searched build, Docker, source, documentation, CI, and script content for all deleted/moved filenames before removal.
  • bindings.cpp is preserved: it is a unique pybind11 declaration, no ingestion_cpp/ implementation exists, and its intended build owner cannot be proven.
  • Root drift_engine.cpp is preserved: it differs materially from drift-engine/drift_engine.cpp, and docker/Dockerfile explicitly compiles the root program.
  • The audit report recommends the follow-up required before either source file can be deleted.

Validation performed

  • Read every requested ambiguous root file.
  • Verified Test duplicates the tests/ tree listing and has no repository reference.
  • Verified the ServiceMonitor is unique and targets the existing k8s/backend-service.yaml selector.
  • Verified docker/Dockerfile references root drift_engine.cpp, so it is not removed.
  • CI is triggered on this PR. No runtime source, CMake/Makefile, Docker command, or workflow was changed.

Risks

  • External deployment automation may reference the former root ServiceMonitor path outside this repository. The canonical path is stated in the audit report.
  • The historical layout document is intentionally retained as historical context, not a current generated tree.

Follow-up recommendations

  • Resolve the two NEEDS HUMAN DECISION source files with their owning build/runtime paths in dedicated build-validated work.
  • Replace the historical layout snapshot with a generated inventory only if an automated source of truth is adopted.

Summary by CodeRabbit

  • New Features

    • Added Kubernetes monitoring support for the backend, including automatic scraping of its metrics endpoint.
  • Documentation

    • Added an audit of the repository’s root directory and clarified the historical status of an older repository layout reference.
  • Chores

    • Removed obsolete test files and an outdated ignore-list entry as part of repository cleanup.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 85eac0bd-69fb-4041-bfaf-a8db760f4f44

📥 Commits

Reviewing files that changed from the base of the PR and between 3e1a234 and 1731b3e.

📒 Files selected for processing (5)
  • .dockerignore
  • Test
  • docs/reference/historical-repository-layout.md
  • docs/reference/root-directory-audit.md
  • k8s/sentinelai-backend-servicemonitor.yaml

📝 Walkthrough

Walkthrough

The change removes obsolete repository entries and test files, documents the 2026-08-05 root-directory audit, and adds a Kubernetes ServiceMonitor for the SentinelAI backend /metrics endpoint.

Changes

Repository audit updates

Layer / File(s) Summary
Audit documentation and repository cleanup
.dockerignore, docs/reference/historical-repository-layout.md, docs/reference/root-directory-audit.md, tests/
The historical layout now includes audit context and a fenced snapshot. The root-directory audit records moved files, a removed duplicate, and pending decisions. The obsolete FILE Structure ignore entry and tests/ contents were removed.

Backend metrics monitoring

Layer / File(s) Summary
Backend ServiceMonitor configuration
k8s/sentinelai-backend-servicemonitor.yaml
Added a ServiceMonitor in the sentinelai namespace. It selects services labeled app: sentinelai-backend and scrapes the http port at /metrics.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/root-directory-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CoreyLeath-code
CoreyLeath-code marked this pull request as ready for review August 6, 2026 14:32
@CoreyLeath-code
CoreyLeath-code merged commit 55fe74e into main Aug 6, 2026
16 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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.

1 participant