Skip to content

Conversation

@harp-intel
Copy link
Contributor

This pull request reorganizes and refactors the codebase to improve modularity, clarity, and maintainability. The main changes include moving shared types and command workflow logic from the internal/common package to new, more focused packages (internal/app, internal/extract, and internal/workflow), and updating all relevant documentation and code references to match the new structure.

Codebase organization and refactoring:

  • Split the former internal/common package into internal/app (application context and shared types), internal/extract (data extraction helpers), and internal/workflow (workflow orchestration for reporting commands). Updated all code and documentation to use the new package locations. [1] [2] [3]
  • Refactored all imports and references in the benchmark and config commands to use the new packages (app, extract, workflow) instead of common. [1] [2] [3] [4]

Documentation updates:

  • Updated ARCHITECTURE.md to reflect the new internal package structure, including diagrams, descriptions, and code references for ReportingCommand and related workflows. [1] [2] [3]
  • Clarified the use of helper functions from internal/extract in table processing and updated test file naming examples. [1] [2]
  • Updated CONTRIBUTING.md to show correct usage of test commands and imports with the new package structure. [1] [2] [3]

Command and flag handling:

  • Updated all flag definitions, validation, and usage in the benchmark command to use types and helpers from app and workflow packages instead of common. [1] [2] [3] [4]
  • Ensured that all code referencing table definitions, summary functions, and flag groups now uses the appropriate new package. [1] [2]

Data extraction helpers:

  • Moved all data extraction functions (e.g., parsing output, extracting benchmark values) from common to extract, and updated all usages in the codebase. [1] [2] [3] [4] [5]

These changes improve the separation of concerns and make the codebase easier to navigate and maintain as it grows.

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel requested a review from Copilot December 28, 2025 23:30
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 pull request refactors the codebase by splitting the monolithic internal/common package into three focused packages: internal/app (application context and shared types), internal/extract (data extraction helpers), and internal/workflow (workflow orchestration). This improves modularity and separation of concerns across the codebase.

Key changes:

  • Reorganized shared types, constants, and flag definitions into internal/app
  • Moved data extraction functions (from script outputs) into internal/extract
  • Created internal/workflow for command workflow orchestration and target management

Reviewed changes

Copilot reviewed 62 out of 62 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/workflow/*.go New workflow package for orchestrating reporting commands, target management, and signal handling
internal/extract/*.go New extract package containing data parsing/extraction functions previously in internal/common
internal/app/*.go New app package for application-wide context, types, and constants
cmd/report/*.go, cmd/telemetry/*.go, cmd/metrics/*.go Updated imports to use new packages (app, extract, workflow)
internal/common/*.go Removed files as functionality moved to new packages
go.mod Updated module replacements to reflect new package structure

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit d30ff8e into main Dec 29, 2025
7 of 8 checks passed
@harp-intel harp-intel deleted the refactor/split-common-package branch December 29, 2025 19:13
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.

2 participants