Skip to content

feat: validateSubjectToken at gRPC boundary, in_flight Prometheus metric, ADR index cleanup#477

Merged
mvillmow merged 1 commit into
mainfrom
grpc-monitoring-bundle-m8
Apr 26, 2026
Merged

feat: validateSubjectToken at gRPC boundary, in_flight Prometheus metric, ADR index cleanup#477
mvillmow merged 1 commit into
mainfrom
grpc-monitoring-bundle-m8

Conversation

@mvillmow
Copy link
Copy Markdown
Collaborator

Summary

  • Apply validateSubjectToken in gRPC service boundary (ENABLE_GRPC) #279: Applies validateNatsSubjectToken() at all gRPC service method boundaries in HMASCoordinatorServiceImplSubmitTask, StreamTaskStatus, GetTaskResult, SubmitResult, CancelTask, and GetTaskProgress. Rejects task_id / parent_task_id values containing path-traversal characters or anything outside the NATS token grammar before any internal routing occurs.
  • Expose in_flight_count as a Prometheus metric #302: Exposes in_flight_count as a Prometheus gauge. Added Metrics::setInFlightCount() / getInFlightCount() (lock-free std::atomic<int64_t>) to core::Metrics, exposed as keystone_task_claimer_in_flight_count in PrometheusExporter::generateMetrics(), and documented in the exporter header.
  • Audit ADR index for references to extracted HMAS components #263: Added ADR-015 cross-reference notes to ADR-001, ADR-002, ADR-006, ADR-008, ADR-009, and ADR-010 clarifying that ChiefArchitectAgent, ComponentLeadAgent, ModuleLeadAgent, and TaskAgent now live in ProjectAgamemnon while Keystone retains only transport primitives.

Test plan

  • Build passes with cmake --preset debug && cmake --build --preset debug
  • clang-format --dry-run --Werror clean on all modified C++ files
  • gRPC service validation: submit a task with a malformed task_id (e.g. containing /) and verify accepted=false with a clear error message
  • Prometheus /metrics output includes keystone_task_claimer_in_flight_count gauge after calling Metrics::getInstance().setInFlightCount(N)
  • ADR cross-reference notes render correctly in GitHub markdown

Closes #263
Closes #279
Closes #302

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

✅ Dependency Audit

Severity Count
Critical 0
High 0
Medium 0
Low 0

See the Security tab for detailed findings.


Workflow: Dependency Audit

@github-actions
Copy link
Copy Markdown

Security Scan Results

  • ❌ Secret Scanning: Potential secrets found
  • ✅ SAST: Completed (check Security tab for details)
  • ✅ Dependency Scanning: Completed
  • ✅ C++ Static Analysis: Completed
  • ✅ Docker Image Scanning: 0 high, 22 medium vulnerabilities (acceptable)

Recommendations

  • Review findings in the GitHub Security tab
  • Check artifact uploads for detailed reports
  • Address critical Docker vulnerabilities immediately

Workflow: Security Scanning

@mvillmow mvillmow force-pushed the grpc-monitoring-bundle-m8 branch 3 times, most recently from aaf7851 to ed93b26 Compare April 26, 2026 18:31
…ric, ADR index cleanup

- #279: Apply validateNatsSubjectToken() at all gRPC service methods in
  HMASCoordinatorServiceImpl (SubmitTask, StreamTaskStatus, GetTaskResult,
  SubmitResult, CancelTask, GetTaskProgress).  Rejects task IDs and
  parent_task_ids containing path-traversal characters or other characters
  outside the NATS token grammar before any internal routing is attempted.

- #302: Expose in_flight_count as a Prometheus gauge.  Added
  Metrics::setInFlightCount() / getInFlightCount() (atomic int64) to
  core::Metrics, wired as keystone_task_claimer_in_flight_count in
  PrometheusExporter::generateMetrics(), and documented in
  include/monitoring/prometheus_exporter.hpp.

- #263: Audit ADR index for references to extracted HMAS components.
  Added ADR-015 cross-reference notes to ADR-001, ADR-002, ADR-006,
  ADR-008, ADR-009, and ADR-010 clarifying that ChiefArchitectAgent,
  ComponentLeadAgent, ModuleLeadAgent, and TaskAgent now live in
  ProjectAgamemnon, while Keystone retains only transport primitives.

Closes #263
Closes #279
Closes #302

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow force-pushed the grpc-monitoring-bundle-m8 branch from ed93b26 to e7e92ae Compare April 26, 2026 18:34
@mvillmow mvillmow merged commit 5c11be9 into main Apr 26, 2026
4 of 9 checks passed
@mvillmow mvillmow deleted the grpc-monitoring-bundle-m8 branch April 26, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant