Skip to content

Conversation

@metachris
Copy link
Contributor

@metachris metachris commented Sep 4, 2025

Disallow empty measurements by default, to avoid misconfiguration.

Empty measurements can be allowed (for local development) by running BuilderHub with --allow-empty-measurements / ALLOW_EMPTY_MEASUREMENTS

@metachris metachris changed the base branch from main to codex-tests September 4, 2025 16:00
@metachris metachris changed the title required measurements Require non-empty measurements by default Sep 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds validation to disallow empty measurements by default, improving data quality and security. Empty measurements can now only be allowed with an explicit configuration flag for development/testing purposes.

Key changes:

  • Added allowEmptyMeasurements configuration parameter to control empty measurement validation
  • Implemented validation logic that rejects empty measurements maps unless explicitly allowed
  • Updated CLI flags, environment variables, and documentation to support the new configuration

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ports/admin_handler.go Added validation logic and configuration parameter for empty measurements
cmd/httpserver/main.go Added CLI flag and environment variable support for allowing empty measurements
httpserver/e2e_test.go Added comprehensive tests for empty measurement validation behavior
httpserver/handler_test.go Updated constructor call to include new allowEmptyMeasurements parameter
docker/docker-compose.yaml Added environment variable for local development convenience
go.mod Moved golang.org/x/crypto from indirect to direct dependency
README.md Updated documentation to reflect new validation behavior and removed empty measurement examples
Makefile Updated development commands and removed empty measurement example from dev setup
AGENTS.md Added development guidelines for database testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@metachris metachris force-pushed the required-measurements branch from f780a41 to d1614d7 Compare September 4, 2025 16:04
@metachris metachris requested a review from shashial September 4, 2025 16:31
Base automatically changed from codex-tests to main September 23, 2025 10:01
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