COE-231: Bootstrap repository, tooling, and package skeleton#3
COE-231: Bootstrap repository, tooling, and package skeleton#3
Conversation
…skeleton - Add uv-managed pyproject.toml with ruff, mypy, pytest tooling - Create src/stackperf package with 5 core modules (api, benchmark_core, cli, collectors, reporting) - Add tests skeleton with import smoke tests - Add Makefile with lint, type-check, test, and quality commands - Include uv.lock for reproducible dependencies - All quality checks pass Closes COE-231
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9589c654c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Makefile
Outdated
| uv sync --all-extras | ||
|
|
||
| sync: ## Sync dependencies with uv | ||
| uv sync |
There was a problem hiding this comment.
Install dev extras in the
sync target
ruff, mypy, pytest, and pytest-cov are declared under [project.optional-dependencies].dev, but this target runs plain uv sync. I checked uv sync --help, which only installs optional dependencies when --extra/--all-extras is passed, and uv sync --dry-run on this tree shows it would install only stackperf. On any fresh checkout, make sync therefore leaves the environment without the quality tools, so make lint, make type-check, and make test will either fail or pick up unrelated global binaries instead of the locked versions.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This issue has been addressed in this commit. The sync target now uses uv sync --all-extras which installs the dev extras including ruff, mypy, pytest, and pytest-cov. Fresh checkouts will have all quality tools available.
- Makefile: sync now includes --all-extras for dev tools - pyproject.toml: added hatchling to dev dependencies - This ensures fresh checkouts have all tools available and offline builds work correctly with locked dependencies
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b92e3ee7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| lint: ## Run linting with ruff | ||
| uv run ruff check src tests |
There was a problem hiding this comment.
Pass dev extras to the
uv run quality targets
I checked uv run --help: optional dependencies are only included when --extra or --all-extras is passed. Here ruff, mypy, pytest, and pytest-cov are declared only under [project.optional-dependencies].dev in pyproject.toml, so make lint, make type-check, make test, and make test-cov are not self-contained on a fresh checkout unless the operator happened to run make sync first. In that state these targets will either fail or pick up unrelated global binaries instead of the locked toolchain.
Useful? React with 👍 / 👎.
| install: ## Install dependencies with uv | ||
| uv sync --all-extras | ||
|
|
||
| sync: ## Sync dependencies with uv (includes dev extras) | ||
| uv sync --all-extras |
There was a problem hiding this comment.
Freeze the lockfile in the bootstrap targets
I checked uv sync --help and uv run --help: --locked/--frozen are the switches that stop uv.lock from being updated. Because these bootstrap commands use plain uv sync and the quality targets use plain uv run, running make install, make sync, or a quality gate after a dependency edit can silently re-resolve and rewrite the checked-in lockfile instead of failing fast. That undermines the reproducibility goal of committing uv.lock and can leave read-only commands with a dirty worktree.
Useful? React with 👍 / 👎.
…relation keys (#14) * COE-306: Build LiteLLM collection job for raw request records and correlation keys - Implement LiteLLMCollector with idempotent ingest and watermark tracking - Add CollectionDiagnostics for missing field reporting - Add CollectionJobService in benchmark_core/services.py - Preserve session correlation keys in metadata - Add comprehensive unit tests (29 tests, all passing) Co-authored-by: openhands <openhands@all-hands.dev> * Update workpad: mark all tasks complete, add validation evidence * Update workpad: document GitHub PR blocker * COE-306: Update workpad - PR creation blocked, ready for human action * COE-306: Update workpad - document active GitHub PR blocker * COE-306: Final workpad update - sync HEAD commit hash * COE-306: Update workpad for retry #2 - document PR creation blocker * COE-306: Final workpad - document complete blockers status * COE-306: Final workpad - correct HEAD commit hash * COE-306: Retry #3 - Update workpad with PR creation blocker status * COE-306: Retry #4 - Update workpad with retry status * COE-306: Final retry #4 workpad - confirmed PAT permission blocker, all fallbacks exhausted * COE-306: Add PR description for manual creation * COE-306: Final workpad - ready for manual PR creation * COE-306: Retry #5 - Document PR creation blocker status after LLM provider change * COE-306: Retry #6 - Updated workpad with retry #6 blocker status * COE-306: Retry #7 - Update workpad with retry #7 confirmation * COE-306: Final workpad - confirmed PAT blocker, ready for manual PR * COE-306: Session #8 - PR #14 created successfully, workpad updated * COE-306: Update environment stamp to c083393 * COE-306: Address PR feedback - fix watermark logic, rename field, add evidence - Fix watermark/start_time interaction: use max() instead of unconditional override - Rename requests_new to requests_normalized for clarity - Remove WORKPAD.md from repo (add to .gitignore) - Add runtime evidence via scripts/demo_collector.py - Add test for watermark/start_time interaction - Update PR_DESCRIPTION.md with Evidence section --------- Co-authored-by: openhands <openhands@all-hands.dev>
* COE-309: Implement session manager service and CLI commands - Add SessionService with create_session(), get_session(), finalize_session() - Add CredentialService for proxy credential management - Implement session CLI commands: create, list, show, finalize, env - Add git metadata capture (branch, commit, dirty state) to sessions - Implement SQLAlchemySessionRepository for session persistence - Implement SQLAlchemyRequestRepository for request persistence - Add comprehensive tests for all components Co-authored-by: openhands <openhands@all-hands.dev> * COE-309: Restructure services into package format - Move services.py to services/ package with separate modules - Create session_service.py for SessionService - Create credential_service.py for CredentialService - Update CLI imports to use new structure Co-authored-by: openhands <openhands@all-hands.dev> * COE-309: Fix linting and formatting issues - Apply ruff formatting and import sorting - Fix exception handling with 'from e' for B904 compliance - Fix variable naming (session_local vs SessionLocal) - Remove unused imports Co-authored-by: openhands <openhands@all-hands.dev> * COE-309: Address PR feedback - remove dead code and handle detached HEAD - Remove unused _get_db_session() function from session.py - Add (detached) marker for detached HEAD state in git.py - All 108 tests passing * COE-309: Address PR feedback - move asyncio import to top of file * COE-309: Fix late imports - move all imports to top of session.py * COE-309: Update workpad with PR feedback response status * COE-309: Final workpad update with commit SHA and merge status * COE-309: Add CLI evidence document (EVIDENCE_COE-309.md) Addresses PR feedback about missing CLI command execution evidence. Document demonstrates all 5 session commands with expected outputs, git metadata capture, and test evidence. * COE-309: Update workpad for Retry #3 - CLI evidence committed * COE-309: Update workpad for Retry #4 - all feedback addressed - Updated status to reflect Retry #4 completion - Documented PR review status (COMMENTED, not CHANGES_REQUESTED) - Verified all inline comments resolved - Confirmed tests passing (108/108) * COE-309: Final workpad update - PR approved, awaiting merge * COE-309: Fix type errors in git.py and lint issues - quality checks passing * COE-309: Update workpad for Retry #5 - PR ready to merge, blocked by permissions * COE-309: Fix exports and remove unused import after merge Summary: - Update services/__init__.py to export CollectionJobService and CollectionJobResult - Remove unused Request import from session_service.py Rationale: - Merge from origin/main added CollectionJobService to session_service.py - Tests require CollectionJobService to be accessible from benchmark_core.services - F401 lint error flagged unused Request import Tests: - 136 unit tests passing with PYTHONPATH set correctly Co-authored-by: Codex <codex@openai.com> --------- Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Codex <codex@openai.com>
- Remove .opensymphony/ metadata files from git tracking (Critical Issue #1) - Remove orphaned src/cli/diagnose.py - health commands exist in cli/commands/health.py (Critical Issue #3) - Fix hex_secret pattern to require 41+ chars to avoid matching 40-char git SHAs (Important Issue #4) Refs: COE-299
Closes COE-231
Summary
Create the foundational repository structure with Python tooling, package layout, and development workflow.
Deliverables
Validation
All quality checks pass:
make lint→ ruff check passesmake type-check→ mypy strict passesmake test→ 6/6 pytest tests passmake quality→ all gates pass