Skip to content

Align monorepo release metadata and settlement read boundaries#4

Merged
OziinG merged 6 commits intomainfrom
feature/cheonha-driver-app-settlement-read
Apr 28, 2026
Merged

Align monorepo release metadata and settlement read boundaries#4
OziinG merged 6 commits intomainfrom
feature/cheonha-driver-app-settlement-read

Conversation

@OziinG
Copy link
Copy Markdown
Contributor

@OziinG OziinG commented Apr 28, 2026

Summary

  • Add local workload metadata for every Dockerfile-backed development slice so release expansion can run offline from the monorepo.
  • Keep Track A settlement reads behind explicit service boundaries: payroll amount truth -> settlement-ops external read -> driver-ops session facade.
  • Document the settlement read vs inquiry write split and keep release resolver tests local-only.
  • Add a monorepo image-build preflight so a missing ECR OIDC role fails once in detect instead of fanning out 27 identical AWS credential timeouts.

Deployment test focus

  • Verified monorepo umbrella wiring and image matrix selection.
  • Verified runtime release resolver tests without GitHub/AWS credential dependency.
  • Verified edge public OpenAPI docs/parity build path.
  • Triggered Build development images on this branch for all Dockerfile-backed slices.

GitHub Actions deployment test result

  • Run 25028865175: full 27-slice build matrix started, then every image build failed at Configure AWS credentials because vars.ECR_BUILD_AWS_ROLE_ARN is empty for this repo/org.
  • Run 25029181575: after the preflight commit, the same deployment test fails fast in detect with Missing ECR build role and skips the matrix, confirming the remaining blocker is repository configuration rather than application code.
  • Required external configuration before merge/deploy can pass: set repository or organization variable ECR_BUILD_AWS_ROLE_ARN to the ECR build IAM role ARN for AWS account 902837199612.

Validation

  • git diff --check
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/build-development-images.yml")'
  • scripts/verify/verify-monorepo-umbrella.sh
  • python3 -m unittest scripts.github.tests.test_resolve_image_build_matrix
  • workload metadata audit: 27 buildable slices / 27 metadata files / missing []
  • uv run --python 3.12 --with pytest python -m pytest release/tests/test_release_resolution.py -q
  • edge public OpenAPI/docs unit tests: 47 tests OK
  • edge actual install/build/parity command OK
  • settlement-payroll selected tests: 23 OK
  • settlement-operations-view selected tests: 21 OK
  • driver-operations-view selected tests: 6 OK
  • account-access Cheonha signup tests: 3 OK
  • organization seed test: 1 OK
  • front-driver-app npm test and npm run typecheck OK

Notes

OziinG added 6 commits April 28, 2026 10:24
Every Dockerfile-backed development slice now carries local workload metadata, so the runtime release resolver does not depend on ad hoc GitHub metadata fetches when composing a monorepo release set.

Constraint: runtime-prod-release fails without local metadata when GITHUB_TOKEN is unavailable.

Rejected: Keep missing metadata as implicit neutral defaults | the resolver only defaults after a GitHub 404 path, not for local offline runs.

Confidence: high

Scope-risk: moderate

Tested: python metadata audit confirmed 27 buildable slices and 0 missing metadata; JSON parsing succeeded for all workload-metadata files.

Not-tested: live production release dispatch.
The missing service modules are kept because existing routes already point at them, but the implementation preserves the payroll -> settlement-ops -> driver-ops chain instead of letting a facade or PR patch recalculate settlement truth.

Constraint: driver app needs a session-based calendar surface while settlement amount truth remains payroll-owned.

Rejected: Merge PR #3 as-is | it restored module names but ignored the current price, attendance, exception, and snapshot-reference contracts.

Rejected: Put inquiry write state into operations-view services | Track B requires a separate persistent owner.

Confidence: high

Scope-risk: moderate

Directive: Do not move daily amount calculation out of service-settlement-payroll without revisiting docs/contracts/22-driver-app-settlement-read-contract.md.

Tested: service-settlement-payroll 23 selected tests with config.test_settings; service-settlement-operations-view 21 selected tests; service-driver-operations-view 6 selected tests; service-account-access Cheonha signup tests; service-organization-registry seed command test.

Not-tested: live cross-service HTTP fan-out against production dependencies.
The docs now split Track A settlement read from Track B inquiry write, locking the API edge relationship as payroll amount truth, settlement-ops external read, and driver-ops session facade.

Constraint: the driver app UI needs settlement values, but work-logs is not a settlement endpoint.

Rejected: Treat MSA as adding one more service surface | the contracts need role ownership and API-edge joins rather than table/meaning leakage.

Confidence: high

Scope-risk: narrow

Directive: Keep inquiry thread/message persistence out of operations-view until a dedicated write owner is chosen.

Tested: documentation links and backend tests listed in the adjacent settlement-read commit.

Not-tested: rendered documentation site build.
The front-driver-app slice is kept as the Expo/React Native app shell for login, signup, work-log calendar, MY, admin-empty, and settlement inquiry/date-picker surfaces so the driver flow can be verified from the monorepo.

Constraint: phase 1 targets native Expo rather than a web surface.

Rejected: Keep brainstorm HTML mockups as source | the executable Expo app and tests are the maintainable source, while .superpowers artifacts were local throwaways.

Confidence: high

Scope-risk: moderate

Directive: Replace temporary settlement overlay data with the Track A backend contract when the app API integration is wired end-to-end.

Tested: npm ci; npm test 27/27 pass; npm run typecheck exit 0.

Not-tested: iOS/Android simulator runtime.
The rollout-order test now stubs image digest resolution like the adjacent resolver tests, so verifying release ordering does not require GitHub or AWS credentials.

Constraint: local branch verification must run without production cloud credentials.

Rejected: Require GITHUB_TOKEN/AWS credentials for a pure ordering test | that would make cleanup verification dependent on external state.

Confidence: high

Scope-risk: narrow

Tested: uv run --python 3.12 --with pytest python -m pytest release/tests/test_release_resolution.py -q -> 12 passed.

Not-tested: live AWS/GitHub digest resolution.
The first deployment test proved the branch reaches the image-build workflow, but every slice waited for AWS credentials because the repository has no ECR_BUILD_AWS_ROLE_ARN variable. Validate that required build role once in detect so monorepo umbrella deployment tests fail fast with a precise repository-configuration error instead of spawning 27 identical two-minute timeouts.\n\nConstraint: GitHub Actions cannot infer an AWS OIDC role when vars.ECR_BUILD_AWS_ROLE_ARN is unset.\nRejected: Guess an IAM role ARN from account id | repo docs intentionally keep the role ARN out of source and local AWS credentials are unavailable.\nConfidence: high\nScope-risk: narrow\nDirective: Keep build and deploy roles separate; do not replace ECR_BUILD_AWS_ROLE_ARN with a production deploy secret.\nTested: ruby YAML parse for .github/workflows/build-development-images.yml; python3 -m unittest scripts.github.tests.test_resolve_image_build_matrix; git diff --check.\nNot-tested: Successful ECR push, blocked by missing repository or organization variable ECR_BUILD_AWS_ROLE_ARN.
@OziinG
Copy link
Copy Markdown
Contributor Author

OziinG commented Apr 28, 2026

Deployment test update:

  • Build development images run 25028865175 reached the full 27-slice monorepo image matrix, but every build failed at AWS OIDC credential configuration because vars.ECR_BUILD_AWS_ROLE_ARN is empty.
  • I pushed commit 62cd1e1 to fail fast before matrix fanout when that role variable is missing.
  • Re-run 25029181575 now fails in detect with a precise Missing ECR build role error and skips all build jobs.

Remaining blocker before merging/deploying: set repository or organization variable ECR_BUILD_AWS_ROLE_ARN to the ECR build IAM role ARN for AWS account 902837199612.

@OziinG
Copy link
Copy Markdown
Contributor Author

OziinG commented Apr 28, 2026

Deployment test passed after wiring the repo configuration:

  • Created AWS OIDC ECR build role: arn:aws:iam::902837199612:role/GitHubActions-CleverMsaPlatform-EcrBuild
  • Set repo variables:
    • ECR_BUILD_AWS_ROLE_ARN
    • AWS_REGION=ap-northeast-2
  • Re-ran Build development images against this branch: https://github.com/EVNSolution/clever-msa-platform/actions/runs/25029506939
  • Result: detect + all 27 image build/push/evidence jobs completed successfully.

Proceeding to merge this PR into main and verify the post-merge main workflow.

@OziinG OziinG merged commit f4609c3 into main Apr 28, 2026
29 of 30 checks passed
@OziinG OziinG deleted the feature/cheonha-driver-app-settlement-read branch April 28, 2026 01:53
@OziinG
Copy link
Copy Markdown
Contributor Author

OziinG commented Apr 28, 2026

Final deployment/merge status:

@OziinG
Copy link
Copy Markdown
Contributor Author

OziinG commented Apr 28, 2026

Runtime release completed after restoring the AWS runtime host.

Restored / checked:

Released workloads:

  • service-settlement-payroll -> sha256:2a94607abe8e7f3eef7b8487ae64aff64b782dc1a2e12ca738d207d51f9df348
  • service-settlement-operations-view -> sha256:13728e86866a12c80b0f1d3fc73227c929bbd83d53df0d516aa3a1fe89c8a863
  • service-driver-operations-view -> sha256:b69aadedcfac9298cfe8f94f2d169c2b5572530994767bdd162ebdb27f0ff8b7

SSM commands:

  • service-settlement-payroll: d925f634-aa09-4dcc-900e-f5ec88809440
  • service-settlement-operations-view: d8422453-dd1d-4226-9489-65f0efd4bb97
  • service-driver-operations-view: 4879cabb-748e-4ede-a833-b8bb5970cc43

Release evidence:

  • resolved_image_digest == runtime_image_digest == actual_image_digest for all three workloads.
  • Release smoke result is passed for all three workloads.
  • Public smoke checked: ev-dashboard.com/healthz, api.ev-dashboard.com/healthz, openapi.yaml, swagger/, and driver-ops/health/ all returned HTTP 200.
  • Auth-boundary smoke checked: new protected driver/settlement endpoints returned HTTP 401 without credentials as expected.

Follow-up note:

  • CloudFormation stack outputs still reference old AppHost/DataHost instance IDs that no longer exist; the live runtime source of truth observed for this release is EVDash-msa / i-00c2915aec1c313e7.

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