Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4a7201d
Documentation part
tmikula-dev Mar 9, 2026
7f682c7
Terraform phase
tmikula-dev Mar 9, 2026
6acb976
Previous code with reusable components.
tmikula-dev Mar 9, 2026
1c4937b
Tests fix to have expected == actual.
tmikula-dev Mar 9, 2026
5507640
Typing upgrade (no used of Typing, united module docs).
tmikula-dev Mar 10, 2026
3bdb4f4
Logger logic simplification
tmikula-dev Mar 10, 2026
d00b601
Esthetic fixes
tmikula-dev Mar 10, 2026
4861f9e
Code review.
tmikula-dev Mar 17, 2026
041ffa6
Test review.
tmikula-dev Mar 17, 2026
6d07800
Removing the obsolete aquasec tooling.
tmikula-dev Mar 17, 2026
f49ee8e
CodeRabbit review comments implementation.
tmikula-dev Mar 17, 2026
ae4a5be
CodeRabbit review comments implementation.
tmikula-dev Mar 17, 2026
f87b300
CodeRabbit review comments implementation.
tmikula-dev Mar 17, 2026
c270034
CodeRabbit review comments implementation.
tmikula-dev Mar 17, 2026
e2b5dfe
Making new stats endpoint available anonymously.
tmikula-dev Mar 24, 2026
b45a028
Changing LocalHost into moto AWS mock.
tmikula-dev Mar 24, 2026
fc1136b
Makefile tool adding.
tmikula-dev Mar 24, 2026
3de7c18
change of the makefile command
tmikula-dev Mar 24, 2026
973fd65
Fixes.
tmikula-dev Mar 30, 2026
763eb0f
Aqua fixes.
tmikula-dev Mar 31, 2026
6b36859
New black version format fixes.
tmikula-dev Mar 31, 2026
b7138cf
AquaSec findings fixes.
tmikula-dev Mar 31, 2026
c40c10e
Black fix.
tmikula-dev Mar 31, 2026
880d657
Review comments implementation.
tmikula-dev Apr 7, 2026
8862ae0
Correct handling the sql templates.
tmikula-dev Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/agents/devops-engineer.agent.md

This file was deleted.

35 changes: 0 additions & 35 deletions .github/agents/reviewer.agent.md

This file was deleted.

36 changes: 0 additions & 36 deletions .github/agents/sdet.agent.md

This file was deleted.

36 changes: 0 additions & 36 deletions .github/agents/senior-developer.agent.md

This file was deleted.

43 changes: 0 additions & 43 deletions .github/agents/specification-master.agent.md

This file was deleted.

20 changes: 13 additions & 7 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,34 @@ Purpose
AWS Lambda event gateway that receives messages via API Gateway and dispatches them to Kafka, EventBridge, and PostgreSQL.

Structure
- Entry point: `src/event_gate_lambda.py`
- Handlers: `src/handlers/` (HandlerApi, HandlerToken, HandlerTopic, HandlerHealth)
- Main lambda (event ingestion): `src/event_gate_lambda.py`
- Stats lambda (read-only queries): `src/event_stats_lambda.py`
- Shared config loading: `src/utils/config_loader.py`
- Handlers: `src/handlers/` (HandlerApi, HandlerToken, HandlerTopic, HandlerHealth, HandlerStats)
- Writers: `src/writers/` (inherit from `Writer` base class)
- Readers: `src/readers/` (read-only database access for stats)
- Config: `conf/config.json`, `conf/access.json`, `conf/topic_schemas/*.json`
- Production Terraform scripts are not part of this repository; `terraform_examples/` for reference configurations only

Python style
- Python 3.13
- Type hints for public functions and classes
- Use built-in generics for type hints
- Use `logging.getLogger(__name__)`, not print
- Lazy % formatting in logging: `logger.info("msg %s", var)`
- F-strings in exceptions: `raise ValueError(f"Error {var}")`
- All imports at top of file (never inside functions)
- Apache 2.0 license header in every .py file (including `__init__.py`)
- Docstrings must start with a short summary line
- No blank lines between docstring sections (summary, Args, Returns, Raises)
- Use single backticks in docstrings (`value`), never double backticks (`` ``value`` ``)
- Do not use `# -----------` separator comments to divide sections
- End all log messages with a period: `logger.info("Message.")`

Patterns
- `__init__` methods must not raise exceptions; defer validation and connection to first use (lazy init)
- Writers: inherit from `Writer(ABC)`, implement `write(topic, message) -> (bool, str|None)` and `check_health() -> (bool, str)`
- Route dispatch via `ROUTE_MAP` dict mapping routes to handler functions in `event_gate_lambda.py`
- Route dispatch via `ROUTE_MAP` dict mapping routes to handler functions in `event_gate_lambda.py` and `event_stats_lambda.py`
- Separate business logic from environment access (env vars, file I/O, network calls)
- No duplicate validation; centralize parsing in one layer where practical
- Preserve existing formatting and conventions
Expand All @@ -33,14 +40,13 @@ Patterns

Testing
- Mirror src structure: `src/handlers/` -> `tests/unit/handlers/`
- Test modules (`test_*.py`) must not have module-level docstrings
- Unit tests: mock external services via `conftest.py` (Kafka, EventBridge, PostgreSQL, S3)
- Integration tests: call `lambda_handler` directly with real containers (testcontainers-python for Kafka, PostgreSQL, LocalStack)
- No real API/DB calls in unit tests
- Use `mocker.patch("module.dependency")` or `mocker.patch.object(Class, "method")`
- Assert pattern: `assert expected == actual`

Quality gates (run after changes, fix only if below threshold)
- black .
- mypy .
- pylint $(git ls-files '*.py') >= 9.5
- pytest tests/ >= 80% coverage
- Run all quality gates at once: `make qa`
- Once a quality gate passes, do not re-run it in different scenarios
Loading