Skip to content
Open
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
42cef9f
test(hris): require employing organization bitemporal truth
seonghobae Aug 28, 2026
4eb2886
test(hris): run employing organization PostgreSQL contract
seonghobae Aug 28, 2026
b8ac031
test(hris): harden employer scope regression
seonghobae Aug 28, 2026
17adafc
feat(hris): persist employing legal organization
seonghobae Aug 28, 2026
3c8a030
docs(adr): record employing organization boundary
seonghobae Aug 28, 2026
871ec6c
docs(doctoring): ground employer scope decision
seonghobae Aug 28, 2026
d69639a
test(hris): isolate cross-tenant employer regression
seonghobae Aug 28, 2026
59517e3
ci(hris): bind employer docs to focused gate
seonghobae Aug 28, 2026
f24d877
ci(foundation): require employer scope provenance
seonghobae Aug 28, 2026
60fe5d7
ci(foundation): require employer scope provenance
seonghobae Aug 28, 2026
a44a565
ci(hris): expose exact provenance candidate
seonghobae Aug 28, 2026
401b113
ci(hris): cover foundation migration changes
seonghobae Aug 28, 2026
c96a90e
fix(foundation): preserve canonical person-name trigger contract
seonghobae Aug 28, 2026
88b102f
test(hris): prove positive tenant reads at system time
seonghobae Aug 28, 2026
ede293c
fix(foundation): seal employing-organization provenance
seonghobae Aug 28, 2026
5873efd
fix(foundation): register employing organization evidence
seonghobae Aug 28, 2026
33169e2
fix(sql): guard employing organization UUIDs
seonghobae Aug 28, 2026
52f7320
fix(sql): enforce employing organization coverage
seonghobae Aug 28, 2026
1f6e282
fix(ci): load UUID guard dependency
seonghobae Aug 28, 2026
852dc9a
test(sql): isolate foreign-employer fixture
seonghobae Aug 28, 2026
a9fb199
test(sql): scope RLS correction assertion
seonghobae Aug 28, 2026
f7bb1e3
fix(people): materialize employing organization
seonghobae Aug 28, 2026
93b1065
fix(people): enforce organization target scope
seonghobae Aug 28, 2026
4172010
test(hris): require employer organization lookup index
seonghobae Aug 28, 2026
ac382dd
test(hris): exercise employer organization lookup index
seonghobae Aug 28, 2026
092b4f3
fix(hris): index employing organization lookups
seonghobae Aug 28, 2026
8c75bbc
test(hris): pin employer organization foundation contract
seonghobae Aug 28, 2026
ba43e76
test(hris): reject truncated postgres constraint names
seonghobae Aug 28, 2026
9cc3468
test(hris): make identifier-length regression executable
seonghobae Aug 28, 2026
138f054
fix(hris): keep postgres constraint names canonical
seonghobae Aug 28, 2026
a5fdab2
chore(provenance): reseal employer organization contract
seonghobae Aug 28, 2026
d399e69
test(hris): fold employer index proof into canonical contract
seonghobae Aug 28, 2026
f952257
test(hris): retire duplicate standalone employer index probe
seonghobae Aug 28, 2026
acbe4b3
chore(provenance): reseal employer postgres contract
seonghobae Aug 28, 2026
f190a1a
test(hris): restore employer lookup index regression
seonghobae Aug 28, 2026
e46c4b5
chore(provenance): repair ADR manifest digest
seonghobae Aug 28, 2026
b1f4523
test(auth): require target-specific denial guidance
seonghobae Aug 28, 2026
fb23014
test(hris): deduplicate employer index regression
seonghobae Aug 28, 2026
5b8da31
test(hris): remove duplicate employer index contract
seonghobae Aug 28, 2026
4d3ed04
fix(auth): explain missing governed target scope
seonghobae Aug 28, 2026
48de156
test(authz): bind employing organization scope evidence
seonghobae Aug 28, 2026
ed4a7b2
fix(authz): preserve exact governed target scope
seonghobae Aug 28, 2026
323d905
fix(authz): verify employer target at persistence boundary
seonghobae Aug 28, 2026
459793a
fix(authz): bind confirmed hire to employer scope
seonghobae Aug 28, 2026
5936a12
test: pin employing organization migration contract
seonghobae Aug 28, 2026
b27be87
test(hris): reproduce employer write-skew race
seonghobae Aug 28, 2026
db0e1a6
fix(hris): serialize employer exact-one mutations
seonghobae Aug 28, 2026
7bf7acc
docs(hris): record employer invariant serialization
seonghobae Aug 28, 2026
0d0a51e
docs(traceability): bind employer race regression
seonghobae Aug 28, 2026
8d12ee7
chore(provenance): reseal employer concurrency repair
seonghobae Aug 28, 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
69 changes: 69 additions & 0 deletions .github/workflows/employment-employing-organization-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Employment Employing Organization Quality

on:
pull_request:
branches:
- develop
paths:
- "database/migrations/0001_foundation_schema.sql"
- "database/migrations/0002_sealed_evidence_digest.sql"
- "database/migrations/0040_employment_employing_organization.sql"
- "tests/test_employment_employing_organization_postgres.sh"
- "scripts/foundation-contract-core.mjs"
- "tests/validate_repository.py"
- ".github/workflows/employment-employing-organization-quality.yml"
Comment thread
seonghobae marked this conversation as resolved.
- "docs/adr/0141-employment-employing-organization.md"
- "docs/doctoring/employment-employing-organization.md"
- "docs/DATA_MODEL.md"
- "docs/ERD.md"
- "docs/TRACEABILITY.md"
- "CHANGELOG.md"
- "manifest.json"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: employment-employing-organization-quality-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
postgres:
name: Employer scope bitemporal and tenant boundaries
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: postgres:16.14@sha256:33f923b05f64ca54ac4401c01126a6b92afe839a0aa0a52bc5aeb5cc958e5f20
env:
POSTGRES_USER: orgmetra
POSTGRES_PASSWORD: orgmetra
POSTGRES_DB: orgmetra
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U orgmetra -d orgmetra"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgresql://orgmetra:orgmetra@localhost:5432/orgmetra
steps:
- name: Checkout exact candidate
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- name: Prove exact candidate checkout
env:
ORGMETRA_EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: test "$(git rev-parse HEAD)" = "$ORGMETRA_EXPECTED_HEAD_SHA"
- name: Print exact foundation manifest candidate
run: python tests/validate_repository.py --print-manifest
- name: Prove Employment employing-organization contract
run: bash tests/test_employment_employing_organization_postgres.sh
- name: Require clean checkout
run: |
git diff --exit-code
test -z "$(git status --porcelain)"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to Orgmetra will be documented in this file.

### Added

- Active-PR employment employing-organization truth: bitemporal, tenant-qualified `employment_employing_organization_record` keeps legal-employer identity independent from Position and Assignment, requires exactly one legal employer for every active/leave Employment coordinate without effective gaps, requires `legal_entity` organization classification and active/leave Employment coverage, persists the relationship from both People employment and confirmed-hire transactions, preserves correction history, and proves forced-RLS isolation. ADR-0141 records the bounded HRIS slice; payroll, statutory-account, compensation, and autonomous employment decisions remain out of scope.
- Accepted ADRs 0001–0003 now include buyer-facing Context, Decision, and Consequences grounded in verified ISO 30400:2022, ISO 30414:2025, Uniform Guidelines (29 C.F.R. Part 1607), SIOP (2018), OpenAPI Specification v3.2.0, OpenID Connect Core 1.0 errata set 2, CloudEvents v1.0.2, Jensen and Snodgrass (1999), Snodgrass (1999), and Allen (1983) records already listed in `docs/doctoring/REFERENCES.md`. ADRs 0004 and 0005 gained APA 7th References pointers to that same bibliography without changing their Decision bodies.
- Active-PR governed Job Analysis persistence/API on the canonical `JobAnalysisSnapshot` model: migration `0013_job_analysis_snapshot.sql` stores immutable tenant-scoped snapshot, Task, KSAO, Task–KSAO, FJA and write-command evidence; `POST /v1/tenants/{tenant_record_id}/job-analysis-snapshots` and matching GET enforce purpose-bound Keyverse scope, authenticated-principal actor authority, bounded/strict JSON handling, transactional Idempotency-Key serialization, parent-scope fail-closed integrity, forced RLS, and atomic audit/outbox evidence. ADR 0014 records the persistence decision while ADR 0007 remains the domain/evidence authority; validated evidence still requires accountable human review and non-LLM provenance, and the service does not make a high-impact employment decision.
- Active-PR `orgmetra_selection_review` packet for PII-minimized, evidence-bound human selection review: canonical operational tenant identity, UUID-backed opaque candidate/Job/sealed-evidence/reviewer references, explicit purpose/reason/evidence version, deterministic canonical JSON and SHA-256 correlation, mandatory human decision state, redacted packet repr, and provenance-paired model evidence that remains `untrusted_draft`, with exact 100% owned statement and branch coverage required by its quality gate.
Expand Down Expand Up @@ -56,6 +57,7 @@ All notable changes to Orgmetra will be documented in this file.

### Security

- Employment and confirmed-hire writes now require an authenticated exact employing-organization target scope in addition to the coarse People operation scope; missing same-tenant organization authorization fails before persistence.
- Predictive-validity cases fail closed when selection evidence, Job scope, study criterion, converted worker, or system-recorded visibility does not match; the normalized case relation is tenant-qualified, append-only, TRUNCATE-protected, and forced through row-level security.
- Purpose-bound PII authorization now fails closed across active tenant, authenticated actor tenant, resource tenant, resource kind, purpose, operation, operation-specific Keyverse scope, and requested-field subset; malformed/wildcard-like attributes, mutable field/scope collections, reserved UUID sentinels, and cross-tenant confused-deputy contexts are rejected before protected values are returned. Authorization requests and allow/deny evidence now also require and preserve one namespaced opaque target-resource reference, so immutable audit correlation identifies the exact HR record without copying its protected values. Authorization evidence otherwise contains governance metadata and field names only, with stable denial reasons and actionable next steps rather than PII.
- LLM output constrained to draft evidence.
Expand Down
Loading
Loading