Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8354e5a
test(position): define lifecycle application persistence contract
seonghobae Aug 24, 2026
abe1c47
test(position): add lifecycle application quality gate
seonghobae Aug 24, 2026
e3e91e2
feat(position): persist reviewed lifecycle changes
seonghobae Aug 24, 2026
c10f723
docs(position): record lifecycle application architecture
seonghobae Aug 24, 2026
1349a2c
docs(position): trace lifecycle application evidence
seonghobae Aug 24, 2026
f0a0568
docs(position): add lifecycle application primary references
seonghobae Aug 24, 2026
f78cab1
test(position): align lifecycle fixture with foundation anchors
seonghobae Aug 24, 2026
8e55d29
test(position): reject forged lifecycle transitions
seonghobae Aug 24, 2026
33effec
test(position): exercise lifecycle transition vocabulary
seonghobae Aug 24, 2026
37f6a80
fix(position): enforce reviewed lifecycle transitions
seonghobae Aug 24, 2026
a5b6ce2
test(position): exercise transition hardening migration
seonghobae Aug 24, 2026
1a76b46
test(position): bind transition hardening provenance
seonghobae Aug 24, 2026
3ab4ae1
test(position): require fresh lifecycle snapshot evidence
seonghobae Aug 24, 2026
3738929
test(position): add fresh snapshot integrity regression
seonghobae Aug 24, 2026
dcb7446
fix(position): bind lifecycle application to fresh snapshots
seonghobae Aug 24, 2026
abce10e
test(position): exercise snapshot hardening migration
seonghobae Aug 24, 2026
db4905b
docs(position): record snapshot integrity boundary
seonghobae Aug 24, 2026
0f1aa47
docs(position): trace fresh snapshot enforcement
seonghobae Aug 24, 2026
e546bcf
fix(position): make lifecycle review key validation locale-stable
seonghobae Aug 24, 2026
f478cf4
test(position): exercise transition-hardened lifecycle validator
seonghobae Aug 24, 2026
4f2a003
fix(position): make lifecycle canonical JSON locale-stable
seonghobae Aug 24, 2026
260f952
fix(position): harden lifecycle application boundary
seonghobae Aug 28, 2026
1889851
fix(position): close lifecycle review gaps
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
106 changes: 106 additions & 0 deletions .github/workflows/position-lifecycle-application-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Position Lifecycle Application Quality

on:
pull_request:
branches:
- develop
- feat/position-lifecycle-review
paths:
- "database/migrations/0023_position_lifecycle_application.sql"
- "database/migrations/0024_position_lifecycle_transition_hardening.sql"
- "database/migrations/0025_position_lifecycle_snapshot_hardening.sql"
- "tests/test_position_lifecycle_application_postgres.sh"
- "tests/test_position_lifecycle_transition_validation_postgres.sh"
- "tests/test_position_lifecycle_snapshot_integrity_postgres.sh"
- "docs/adr/0112-position-lifecycle-application.md"
- "docs/traceability/position-lifecycle-application.md"
- "docs/doctoring/position-lifecycle-application-references.md"
- ".github/workflows/position-lifecycle-application-quality.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: position-lifecycle-application-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
postgres_contract:
name: Governed Position lifecycle application contract
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 deterministic lifecycle application provenance
run: |
python - <<'PY'
import hashlib
import json
from pathlib import Path

required = [
"tests/test_position_lifecycle_application_postgres.sh",
"tests/test_position_lifecycle_transition_validation_postgres.sh",
"tests/test_position_lifecycle_snapshot_integrity_postgres.sh",
".github/workflows/position-lifecycle-application-quality.yml",
]
optional = [
"database/migrations/0023_position_lifecycle_application.sql",
"database/migrations/0024_position_lifecycle_transition_hardening.sql",
"database/migrations/0025_position_lifecycle_snapshot_hardening.sql",
"docs/adr/0112-position-lifecycle-application.md",
"docs/traceability/position-lifecycle-application.md",
"docs/doctoring/position-lifecycle-application-references.md",
]
rows = []
for path_text in required + [path for path in optional if Path(path).is_file()]:
data = Path(path_text).read_bytes()
rows.append({
"path": path_text,
"sha256": hashlib.sha256(data).hexdigest(),
"bytes": len(data),
"lines": len(data.decode("utf-8").splitlines()),
})
print(json.dumps(rows, separators=(",", ":")))
PY
- name: Run Position lifecycle application regressions
run: bash tests/test_position_lifecycle_application_postgres.sh
- name: Create isolated transition-validation database
env:
ADMIN_DATABASE_URL: postgresql://orgmetra:orgmetra@localhost:5432/postgres
run: psql "$ADMIN_DATABASE_URL" -v ON_ERROR_STOP=1 -c 'CREATE DATABASE orgmetra_position_lifecycle_transition'
- name: Reject forged lifecycle transition evidence
env:
DATABASE_URL: postgresql://orgmetra:orgmetra@localhost:5432/orgmetra_position_lifecycle_transition
run: bash tests/test_position_lifecycle_transition_validation_postgres.sh
- name: Verify fresh Position and Assignment snapshot evidence
run: bash tests/test_position_lifecycle_snapshot_integrity_postgres.sh
- name: Require clean checkout
run: |
git diff --exit-code
test -z "$(git status --porcelain)"
1 change: 1 addition & 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 governed Position lifecycle application: migrations `0023_position_lifecycle_application.sql`, `0024_position_lifecycle_transition_hardening.sql`, and `0025_position_lifecycle_snapshot_hardening.sql` apply only independently reviewed, canonical v1 evidence whose fresh bitemporal Position and Assignment snapshots still match; occupied closures/abolitions fail closed, PositionVersion history and application evidence remain append-only, and one atomic audit/outbox event records the high-impact mutation. PostgreSQL function search paths, tenant-qualified version bindings, forced RLS, truncation guards, explicit mutation privileges, and exact PostgreSQL regressions are part of the boundary; the review remains non-authorizing and the branch remains active-PR truth until protected gates pass.
- 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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ Job evidence
## Status

Protected `develop` includes the employment-truth kernel, governed candidate-to-worker conversion, purpose-bound PII authorization, normalized worker-bound validity studies, criterion-observation scope, bitemporal workforce-composition evidence, the governed Naruon intent adapter, and requisition review packets. This active PR adds durable purpose-bound People mutation and confirmed-hire materialization paths for Employment, Position, and Assignment with atomic audit/outbox evidence and tenant-scoped idempotency; treat those write paths as active-PR truth until this exact head passes all fresh protected-base gates and merges.

The stacked Position lifecycle application branch adds a separate high-impact database boundary: only canonical human-reviewed lifecycle evidence whose fresh tenant-scoped Position and Assignment snapshots still match may produce an immutable bitemporal PositionVersion correction and atomic audit/outbox evidence. It remains active-PR truth until its parent review boundary is integrated and fresh protected gates pass.
Loading