Skip to content

docs: maintain durable product-technical gap baseline - #100

Draft
seonghobae wants to merge 215 commits into
developfrom
docs/product-technical-gap-baseline
Draft

docs: maintain durable product-technical gap baseline#100
seonghobae wants to merge 215 commits into
developfrom
docs/product-technical-gap-baseline

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Current execution receipt — 2026-09-12

  • Exact head: 1da55ee20e640a6dab1b5afbba52ce842482adf9; protected base: develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f; mergeable, Draft, unresolved threads 0.
  • Exact-head Foundation CI 34682956904 and SAST 34682956911: SUCCESS.
  • Security 34682956901: terminal FAILURE only because authenticated Dependency Graph compare returned HTTP 403 in dependency-review job 103524934799; OSV, Trivy and Scorecard succeeded.
  • CodeQL 34682956915: terminal FAILURE after actions/python compatibility jobs reported VERDICT_STATE=pending; exact dispatch job 103525312078 succeeded. Central settlement remains owned by ContextualWisdomLab/.github#2040.
  • Dependency Review source hardening is current at ContextualWisdomLab/.github#1725@59063ff7be935849671600d539a57fd1219bd4ae, but non-200 remains fail-closed and a live HTTP 200 consumer canary is required.
  • No predecessor result transfers; independent current-head approval is absent.

Scope

Canonical single-writer lane for docs/product-technical-gap-baseline.md. The baseline records durable product/domain/control-plane truth and causal dependency order; it is not merge authorization and does not freeze volatile PR heads, run IDs, queue snapshots, or review state into the document.

Current durable baseline

The baseline at c0a40a4d598635cc1056a29451a4707d00c613c5 remains code-current at the durable-contract level after workflow owner #161 integrated as protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f. It already records #63 shared HRIS-kernel ownership, #64-before-#65 owner order, protected-owner adoption before consumer evidence, Assignment dependency order, ruleset controls, and the release gate.

#211#214 refine the shared trust boundary. #215#228 refine durable People/hire scalar/container and command/result boundaries. #229 requires ordinary generic People results and confirmed-hire results to remain bound to authoritative pre-port target identities. #246 records the necessary idempotent-replay qualification for generic Employment/Position/Assignment: their published semantic digest deliberately excludes generated record IDs, so an identical same-key retry may return the first committed identity instead of the retry's fresh generated identity only when the persistence result carries exact replay evidence and the application independently recomputes the same semantic command digest. Unexplained foreign results remain fail-closed; confirmed-hire remains exact-identity-bound because its materialization identities are part of that route's command contract. #230 detaches direct PostgreSQL commands; #231 completes application-input ownership before purpose-bound authorization; #232 requires exact built-in Assignment allocation text. #233 closes a public-contract inconsistency by making the parser and published OpenAPI reject zero while retaining the authoritative Assignment allocation domain (0, 1.0000]; deterministic manifest evidence is resealed. These are refinements of the existing durable application/API trust-boundary and idempotency invariants, not new HR aggregates, so leaf SHAs and run IDs remain PR/Issue metadata rather than baseline-body data.

A distinct durable buyer/scientific gap remains #234: protected architecture assigns validity-study registry/scientific evidence ownership to workforce_validation, while protected implementation still lacks the complete owner API and durable owner-table adoption. Draft #235 establishes the independent owner application read boundary from protected develop; #236 makes retained persisted study evidence structurally immutable; #237 applies the same structural-immutability requirement to authenticated principal evidence before purpose-bound authorization. #238 corrects the PostgreSQL role-isolation model: a NOLOGIN schema owner cannot rely on ALTER ROLE ... SET search_path for later SET ROLE runtime isolation, because PostgreSQL applies role defaults at login. #239 adds the complementary constructor-bypass invariant for identity evidence: exact tuple-backed principal type alone is insufficient because low-level tuple.__new__ can bypass ValidationPrincipal.__new__; the owner read boundary must reconstruct/revalidate stored tenant/actor/scope evidence before Keyverse request construction/evaluation. #240 adds the repository-capability invariant exposed by the earlier review graph: runtime Protocol shape alone is not proof of a callable repository dependency, and dependency checking itself must not execute a caller-controlled descriptor before authorization. #241 extends retained-evidence hardening to the data projection by making ValidityStudyView structurally immutable. #242 narrows the ordinary public constructor surface, but does not treat constructor exclusivity or the Python runtime type as proof that authorization occurred; low-level tuple fabrication remains possible and consequential consumers must re-authorize and re-resolve authoritative state. #243 adds the nested-identity invariant: an immutable outer value object is still unsafe if it retains a mutable UUID object alias. Canonical identity authority must be reduced to interpreter-immutable scalar evidence, public UUIDs reconstructed fresh, and executable repository calls must receive detached UUID objects while post-port target verification remains bound to an immutable pre-port snapshot. #244 adds the ingress-scalar invariant: exact UUID outer type is still insufficient if its internal int slot was forged; the boundary must read the payload once, prove exact built-in int before any sentinel/range/equality behavior, and only then store the validated scalar. #245 completes the ordinary issuance-surface cleanup by removing an unconditional module-level projection issuer. #249 closes the remaining checked-versus-used capability gap: inertly validating a repository member before authorization is insufficient if the authorized path later performs a fresh dynamic attribute lookup. The exact ordinary repository function accepted before authorization must be the same function directly invoked afterward; caller-controlled __getattribute__ or descriptor machinery cannot be allowed to substitute a new executable capability after the access decision. #253 completes the concrete-dependency side of that rule: an inherited Protocol/interface declaration is still a runtime function and can satisfy a function-type gate even though no repository implementation exists, so the canonical interface placeholder itself must be rejected before authorization rather than treated as a concrete executable dependency.

#254 adds the Foundation provenance invariant exposed by a real hosted RED: executing a root PostgreSQL acceptance contract from the canonical Foundation workflow is not enough. Every such executable contract must also be registered in both canonical required-file inventories—Node REQUIRED_FILES and Python REQUIRED—and appear in the deterministic manifest.json exact path/hash/bytes/lines seal. A missing inventory entry or stale seal is a real acceptance failure; the repair is to register and reseal the exact artifact, not exempt discovery, remove execution, weaken the manifest path-set equality check, or lower coverage/security gates. #255 adds the complementary exact retained-policy-scalar coverage invariant: an immutable frozenset is not sufficient if one contained field is a caller-defined executable str subtype. The Workforce Validation boundary must reject non-exact policy-field strings before authorization comparison/hashing/persistence, and 100% coverage must execute that fail-closed branch rather than delete or weaken it. Volatile commit/run identifiers remain in #235/#254/#255 metadata rather than the baseline body.

#235 keeps workforce_validation_role as deny-default migration/schema-owner authority only, proves actual SET ROLE behavior in PostgreSQL acceptance, revalidates principal storage before authorization, binds the exact validated owner repository function across authorization, rejects the inherited Protocol declaration as a non-concrete capability, stores UUID authority without retained mutable aliases, validates UUID internal payloads before executable comparison, exposes no ordinary unconditional view issuer, and explicitly treats the returned ValidityStudyView as data rather than reusable authority. A distinct least-privilege runtime role plus schema-qualified relations/function-level search-path controls remain part of the durable adapter increment. The service test lane and owner-schema PostgreSQL contract are admitted to canonical Foundation without weakening hash/coverage controls, and #254 requires the executable contract to be represented in both provenance inventories plus the exact manifest seal. Current #235 exact head is dd95dd7256f37aab2c4f26aa1fb43e8c867f4e4d: Foundation and SAST are terminal GREEN, including owned coverage and isolated PostgreSQL acceptance. Security remains terminal non-passing only at the central Dependency Review availability probe tracked by .github#810; CodeQL remains terminal non-passing only after current-head dispatch succeeds and the central verdict handoff fails, tracked by .github#1927/#1929. These foreign control-plane failures are not leaf source defects and do not authorize no-op churn, synthetic verdicts, gate weakening, or mutable-source adoption. A qualifying independent approval is still absent.

Dependency-first Draft #248 / Issue #247 contains the next forward-only owner-table adoption, least-privilege runtime role and schema-qualified PostgreSQL read adapter. #250 adds the durable dependency-ownership invariant that a validated connection factory must be structurally bound against retained-reference replacement. #251 adds the migration-integrity invariant exposed by the owner-schema move: preserving a table OID, FKs, RLS and triggers is insufficient when an existing trigger/function body embeds a schema-qualified reference to the old relation. A forward owner migration must repair that dependent executable SQL in place while preserving function signature/trigger attachment and governance semantics; it must not paper over the defect with a compatibility copy/view or rewrite protected global migration history. #252 completes the adapter-side checked-versus-used rule: storing an executable connection capability immutably is insufficient if the read path later resolves a subclass-overridable property; execution must consume the exact structurally stored capability rather than perform a fresh dynamic lookup. #248 remains exact d54d44d795444df572efbb301a667d74ac574d58 on stale mutable-parent snapshot 656a0c41c06bc517b2cf7c554e35a6fb4f8c4f4b; it must not absorb mutable #235 source merely to restore mechanical mergeability. #235 integrates normally first; then #248 non-force adopts protected owner truth—including #249/#253/#254/#255—and reacquires exact-head coverage, PostgreSQL, security and review evidence before integration.

The durable follow-on after #248 integration is idempotent registration → explicit predictor/sample/decision-policy/analysis-protocol model → versioned scientific adapters/API/performance evidence. This independent lane does not change the People/Assignment owner order and must not copy mutable #63/#64/#65 source.

#63 exact Foundation CI is terminal success after its predecessor real RED (218 tests passed, 99.43% coverage) and three-branch test repair; SAST and Security are also terminal success. CodeQL remains failed in the central exact-head handoff state and qualifying approval is still absent, so normal integration remains blocked without an Orgmetra no-op retrigger or gate bypass. #64 owns #229#233 plus #246's replay-result reconciliation; its current exact head is 4be7f1681959e43d32c8e85a8f2660da36ff6d9c. Foundation, Security and SAST are terminal GREEN on that head; People API is 239/239 with 1472 statements / 482 branches at 100.00% statement/branch coverage and isolated PostgreSQL acceptance. CodeQL remains terminal FAILURE only at the same shared current-head verdict handoff after both compatibility jobs successfully request dispatch; no qualifying independent approval exists. #65 owns validate_authorization_decision(...) and purpose-bound durable-consumer validation. They overlap on People files, so #65 must non-force adopt protected #64 after normal #64 integration and preserve both invariant sets.

A further owner relationship is explicit: #141 contains a valid employing-legal-Organization HRIS feature but is Draft/non-mergeable on an old base and overlaps #64/#65 on People, authorization, and OpenAPI files. It must follow #65, non-force adopting protected owner truth while preserving its legal-employer feature. Assignment #163/#165 remain downstream consumers and must not adopt mutable sibling source.

Canonical People/Assignment durable order is #63#64#65#141#163#165, each through normal protected integration and non-force protected adoption where required. The independent workforce_validation order is #235#248 → later scientific/API increments, with mutable-parent source never treated as protected dependency evidence.

Writer branch repair finding

PR #100 remains Draft at exact head 1da55ee20e640a6dab1b5afbba52ce842482adf9 on protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f. Fresh comparison is ahead 215 / behind 0 and GitHub reports it mergeable. The branch preserves the canonical baseline plus the latest acceptance-infrastructure invariants; its newly materialized exact-head checks and independent review must be evaluated without transferring predecessor evidence. This is a normal integration boundary, not authority for force-push, destructive rebase, synthetic status or routine bypass.

No self-approval, routine administrator bypass, gate weakening, predecessor-evidence substitution, mutable-owner source copy, or release claim is authorized by this PR.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6266320a-d62c-4576-9ff6-4ac7ecbbcc6a

📥 Commits

Reviewing files that changed from the base of the PR and between c3289c8 and 4a07d0d.

📒 Files selected for processing (1)
  • docs/product-technical-gap-baseline.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

제품·기술 격차 기준 문서를 2026-08-26 기준으로 갱신했다. 조직 ruleset, control anchor, 활성 capability, 구매자 격차, 실행 검증 조건과 운영 진단을 최신 상태로 변경했다.

Changes

제품·기술 격차 기준

Layer / File(s) Summary
저장소 보호 및 실행 기준
docs/product-technical-gap-baseline.md
조직 ruleset 18156473과 PR #119 control anchor를 기록했다. Issue #89의 상업 통제 격차를 3건으로 확장했다. 실행 루프가 유효 ruleset과 현재 PR 그래프를 재조회하도록 갱신했다.
기능 상태 및 주요 격차
docs/product-technical-gap-baseline.md
PR #116–#119의 활성 capability를 추가했다. 목적 바운드 HR 반출, 권위적 성과목표, 접근성, 권위적 릴리스 운영을 최고 가치 구매자 격차로 정의했다.
운영 진단 및 참고문헌
docs/product-technical-gap-baseline.md
리뷰 트리아지와 제공자 복구 진행을 2026-08-25/26 기준 네 가지 항목으로 재작성했다. References (APA 7th) 제목과 목록은 유지했다.

Estimated code review effort: 2 (간단) | ~10분

Merge Risk: 🟡 Moderate · up to 4a07d

The baseline still contains an inaccurate section heading, a conflicting open-PR count, and unclear workflow rerun instructions. These can mislead readers about repository status and recovery steps, so the PR needs follow-up before merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 제품·기술 격차 기준 문서를 시점 기준으로 갱신하는 주요 변경을 정확히 설명합니다. 간결하고 구체적입니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/product-technical-gap-baseline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 23, 2026 15:03
@seonghobae
seonghobae marked this pull request as ready for review August 23, 2026 15:35
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review the current unchanged head against protected develop. Local exact-head verification: all owned package suites pass at 100% statement/branch coverage.

@seonghobae
seonghobae marked this pull request as draft August 24, 2026 20:04
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 20:07
coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 25, 2026 08:07
@seonghobae
seonghobae marked this pull request as ready for review August 25, 2026 10:26
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@seonghobae
seonghobae marked this pull request as draft August 25, 2026 20:55

Copy link
Copy Markdown
Contributor Author

SOURCE WRITER CLAIM — 2026-09-12. Fresh live metadata shows canonical baseline head 4da095a7b47c4802f77412e649c305a716d82eae on protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f, ahead 214 / behind 0, Draft and mergeable. I am taking this existing single-writer branch only to fold the already-handed-off durable Foundation/document-record acceptance invariants into docs/product-technical-gap-baseline.md, record the documentation delta in CHANGELOG, regenerate the deterministic manifest from final bytes, and run exact-tree repository validation. No product/runtime owner source, dependency workflow, PR state, settings, rerun, merge, bypass, or release mutation is included.

Copy link
Copy Markdown
Contributor Author

SOURCE WRITER RELEASE — exact head 1da55ee20e640a6dab1b5afbba52ce842482adf9 is one ordinary child of 4da095a7b47c4802f77412e649c305a716d82eae; exact tree 4eb0c6b9fa79177daf92b9c739d5c6d29524ed63, published with force=false after a final unchanged-head check. The canonical baseline now records five already-handed-off durable acceptance rules: tenant binding before database-global coordination; complete server-owned replay results; collision-resistant temporary-principal cleanup; immutable transitive executable inputs; and empty/allowlisted disposable execution authority. CHANGELOG and deterministic manifest were updated from the same final bytes. Exact local evidence: npm run validate = 57/57 Node tests plus Python foundation validation PASS; git diff --check PASS. Fresh protected compare is ahead 215 / behind 0, 28 paths; the PR is Draft, mergeable, unresolved threads 0. Successor runs: Foundation 34682956904 in progress, Security 34682956901 in progress, SAST 34682956911 queued, CodeQL 34682956915 queued. No predecessor hosted evidence transfers and no approval/merge authority is claimed.

Copy link
Copy Markdown
Contributor Author

Canonical-baseline handoff from document_records retry work; no baseline-source edit from the #312 lane.

Durable operability invariant exposed by #309/#312: an idempotency acceptance is incomplete if it proves only sequential same-key replay after a known successful first call. For commands whose caller may lose the result after the database has committed, acceptance must create a durable first result and then make the original caller path fail/lose the usable result before a fresh connection retries. The retry must recover the exact first authoritative identity, semantic/receipt evidence, and database-owned time without duplicate business/audit/outbox state. Where the acceptance uses PostgreSQL backend termination, it must prove commit externally (for example, another session can see the receipt) before terminating the original backend; elapsed time alone is not commit evidence.

The executable #312 implementation is currently tests/document_record_idempotency_postcommit_recovery_companion.sh on exact 4535d9fea7b2b995be627a23316a65474d714957. It is a companion of the main idempotency root, not an independent root, and fails closed if owner schema/function state from the root is absent. Hosted GREEN remains pending Foundation reconciliation, so this is a durable acceptance principle, not a release/merge claim.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from #312: destructive acceptance actions must bind checked identity through use, not only at observation time. For PostgreSQL backend termination/cleanup, a captured numeric PID is insufficient because the intended backend can disappear and the PID can later identify another session. The recovery fixture now uses an execution-unique UUID-derived application marker, captures (pid, application_name, backend_start) only after durable receipt visibility + PgSleep, and terminates only a still-matching identity; the asserted termination requires exact 1|true, while EXIT cleanup uses the same guarded helper best-effort. Generalize this as a test/operability invariant where acceptance code kills processes, sessions, leases, or principals: bind stable identity/version/creation-time evidence at the destructive use boundary and fail closed on mismatch.

Copy link
Copy Markdown
Contributor Author

2026-09-12 exact-head terminal RCA checkpoint — product source remains unchanged at 1da55ee20e640a6dab1b5afbba52ce842482adf9 on protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f.

  • Foundation CI 34682956904 and SAST 34682956911: SUCCESS.
  • Security 34682956901: FAILURE solely at dependency-review job 103524934799. Exact checkout succeeded; OSV, Trivy and Scorecard succeeded. The authenticated exact-base/head Dependency Graph compare returned HTTP 403 with curl exit 0, so the canonical gate correctly failed closed instead of treating unavailable evidence as clean.
  • CodeQL 34682956915: actions job 103524902314 and python job 103524902346 both ended with DISPATCH_OUTCOME=success, VERDICT_STATE=pending; dispatch job 103525312078 succeeded. This is the central terminal-settlement boundary, not a product-code verdict.
  • Central Dependency Review owner ContextualWisdomLab/.github#1725 is now ordinary-restacked at 59063ff7be935849671600d539a57fd1219bd4ae on current protected main, with the exact six owner paths preserved. It intentionally retains non-200 fail-closed semantics; a live authenticated HTTP 200 consumer canary is still required.
  • Central CodeQL owner ContextualWisdomLab/.github#2040 is actively moving at be25a767aa2e0d5cb79d6988853011bae16d4be3; no competing source mutation was made.

No predecessor GREEN transfers. #100 remains Draft: unresolved threads are 0 and mergeable=true, but exact Security/CodeQL and qualifying independent review are absent.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from document_records owner: a service-facing PostgreSQL function is a capability boundary, not merely an implementation detail. PostgreSQL grants EXECUTE on newly created functions to PUBLIC by default, so a restricted HR write port must explicitly revoke that ambient capability in the same creation transaction. Future application/service principals should receive an explicit purpose-bound EXECUTE grant with executable ACL acceptance; tenant/RLS validation inside the function does not substitute for function-level admission. #312 implements this for persist_document_record_once(...) at exact 874a3eb2f26af094a604c8fe9b07b8a946b54e8f and adds a real-PostgreSQL probe proving an unprivileged role cannot enter the function body while the owner retains capability. Please incorporate the invariant through the canonical baseline writer rather than copying mutable #312 source.

Copy link
Copy Markdown
Contributor Author

Durable provenance invariant handoff from current #312 repair: when a stacked owner ordinary-forward adopts a parent provenance seal, every file newly added to either canonical Foundation required-file inventory and every tracked file changed by the child must be re-closed under manifest.json at the post-merge exact head. Inventory registration without matching manifest coverage is a false-GREEN; a parent merge can also overwrite a child’s earlier manifest hashes even when the child source is otherwise preserved. #312 exposed this after #107 adoption: migration 0024/ADR0309/idempotency roots+companion were registered in both inventories but absent from the manifest, while OPERABILITY/TEST_STRATEGY reverted to parent hashes. Ordinary-forward repair is #312 8db666f33804058b377b393406b73675bbb01a2e; exact manifest is 96 entries, SHA-256 aa43e3484567e1facb9ddb0042599a25973b2b97c0a32f9080f3d1d29e7cff8a, 18,895 bytes / 583 newline-counted lines. Please fold the invariant into the canonical baseline in your single-writer lane; no competing baseline source write was made here.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from the document_records lane: #313 records a verified code↔DDD-model drift on #312 exact 5fa9b191864b11f6a842c64a84e03e5a532525de. Migration 0024 persists document_record_persist_receipt, while canonical docs/DATA_MODEL.md/docs/ERD.md and the migration-backed logical-object inventory do not yet name/protect that relation. Durable invariant: every newly persisted domain/aggregate-support relation that becomes part of an owner contract must be co-registered in the canonical model/ERD and migration-backed identity validation (where applicable), then exact-byte manifest resealed; executable migration presence alone is not enough to claim model/DDD traceability. Keep volatile #312/#313 SHAs in PR/Issue metadata rather than freezing them into the baseline body.

Copy link
Copy Markdown
Contributor Author

Canonical baseline handoff from #312; no competing edit to docs/product-technical-gap-baseline.md. Durable invariant to record when the baseline writer next advances: an application-facing function is not an execute-only capability if a SECURITY INVOKER caller must also receive underlying table DML. For purpose-bound write capabilities, either preserve true invoker least privilege or use a narrowly reviewed SECURITY DEFINER boundary owned by a fresh NOLOGIN/NOBYPASSRLS role with fixed trusted search_path and only the minimum object privileges; the externally assignable executor gets function EXECUTE only, no direct protected-table DML/schema CREATE. Reserved security-role collisions must fail before project mutation rather than reuse unknown memberships/ACLs, and temporary ownership-transfer privileges must be revoked in the same transaction. #312 exact authority is 8e86c42d5545b9025341dca9afc220666ab56c93.

Copy link
Copy Markdown
Contributor Author

Durable-invariant handoff from the document_records owner lane (#313/#312); no competing baseline-source write from that lane.

A persisted owner relation introduced by migration is not code-current merely because its SQL exists. The same durable truth must be represented in the bounded-context Data Model/ERD and in executable migration-backed provenance inventory, and repository validation must distinguish executable DDL from DDL-shaped text in comments/string/dollar-quoted literals. For idempotency receipts specifically, canonical docs must also preserve PII minimization and the lifecycle boundary: a creation/retry receipt is not return/destruction completion evidence.

The #313 repair also exposed a cardinality rule worth retaining: documentation must describe constraints over the full persisted dataset, not only the new write port. Migration 0024 creates exactly one receipt for first commits through persist_document_record_once(...), but does not backfill historical document_record rows, so the relation is dataset-level zero-or-one receipt per document, not mandatory one-to-one.

Current implementation authority is #312 b996e19090e5cc38ef0a4d41a8b4de6d561b89d8 (stacked Draft). Keep volatile head details in PR/Issue metadata; only the invariant belongs in docs/product-technical-gap-baseline.md when this canonical single-writer incorporates it.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from stacked canonical packet owner #307: an eligible candidate-document return request must retain the versioned policy's claim_window_end through request/verification/dispatch/delivery/destruction states. Without that evidence, return_requested_at cannot be proven timely and later receipts become detached from the effective policy window. #307 now enforces this at c97cbee4ab97bbb2f07beb817574c38e67f3910a with RED→GREEN and 100% statement/branch coverage. Please reconcile the invariant into the single-writer product gap baseline when updating #100; this comment does not mutate or compete with its source branch.

seonghobae commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

#302/#314에서 baseline-worthy People invariants를 확인했습니다. Canonical baseline writer에서 다음 durable rule을 reconciliation 대상으로 검토해 주세요.

  • 재입사는 Person identity를 유지하면서 기본적으로 새 Employment identity를 생성하는 별도 governed event이며, 과거/현재-open candidate→worker conversion의 존재만으로 후속 Employment를 rehire-authorized로 간주하지 않는다. prior Employment와 authoritative separation/end-state, explicit actor/purpose/reason/evidence/confirmation이 결박되어야 하며 old-Employment 재사용은 별도 policy/contract 없이는 금지합니다. Candidate match는 evidence일 뿐 People authorization이 아니고, concurrent ordinary multi-employment도 rehire로 오분류하면 안 됩니다.
  • Employment separation은 bitemporal correction/supersession mutation이어야 하며 review packet이나 in-place status rewrite가 authoritative termination truth를 대신할 수 없다. Protected contract가 employment_record_version business-field in-place UPDATE를 이미 거부하므로, #314가 authoritative separation transition을 먼저 소유하고 #302가 그 truth를 재입사 prerequisite로 소비하는 순서가 맞습니다.

Fresh live metadata finding도 함께 넘깁니다. #100 body의 People section은 아직 #64 current exact head = 4be7f168...라고 적지만 live #64는 818950960c4fe0a4e7b026bd5499fe9cca1002be, Draft · mergeable입니다. Durable baseline 내용과 별개로 PR authority 설명이 stale하므로 canonical writer에서 currentize해 주세요. 이 lane에서는 docs/product-technical-gap-baseline.md를 경쟁 수정하지 않습니다.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from the new Employment-separation owner slice (#314/#64): PostgreSQL acceptance that creates temporary roles/users/schemas must use collision-resistant per-execution identities whenever failure cleanup is necessarily best-effort. Failure cleanup must not mask the causal assertion/runtime error; conversely, a nominal success path must verify cleanup and fail closed if the temporary authority remains. PID/BASHPID or one fixed role name is not sufficient when runners/containers can share a persistent database.

The current People owner also exposes a stale volatile receipt in #64’s PR body: live #64 is now fdb33797fde1efc215ab0dcde474ce82e7d27dfd on protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f, Draft · mergeable, while the body still names 818950.... Keep volatile SHA/check state out of the durable baseline body except where needed as repair evidence; the durable rule is failure-isolated temporary database authority plus verified cleanup, not this leaf SHA.

Copy link
Copy Markdown
Contributor Author

Baseline single-writer handoff from current People owner work: the PR description's #64 exact head 4be7f168... is stale. Live canonical #64 is now cd920715c0b3db67223b6bef8df622ca38caca31 on protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f, still Draft · mergeable; volatile SHA/check state should remain PR metadata rather than baseline-body truth.

Durable invariant worth folding into docs/product-technical-gap-baseline.md when the #100 writer next updates it: a transactional persistence adapter must validate returned database receipt structure/types and target identity before the connection/transaction context is allowed to commit whenever that validation can still fail the operation. Commit-then-validate converts a detectable checked-versus-used defect into an avoidable uncertain outcome. Idempotent replay is recovery for genuinely uncertain commit outcomes, not a substitute for keeping receipt-integrity checks inside the rollback-capable boundary.

People #64 demonstrates the repair at RED 4ba75c0240edda8417d17c904c8a8131473254d6 → fix 1e69528a659ccc0e015537de82fd28c213d58d29; employment-separation traceability is current at cd920715.... This handoff does not authorize competing edits to the #100-owned baseline branch.

Copy link
Copy Markdown
Contributor Author

Fresh baseline-writer handoff: this PR's body is stale for canonical People owner #64. It still names #64@4be7f1681959e43d32c8e85a8f2660da36ff6d9c and historical gate state, while live #64 is now c8d1c3993ce1eb4e8bdabfe4b666c61eda57fcff on protected develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f, open · Draft · mergeable.

Durable invariants that should be reflected by the #100 single writer, without copying volatile run IDs into docs/product-technical-gap-baseline.md:

  • A persistence receipt whose shape/type/target identity can fail validation must be validated while the DB transaction is still rollback-capable; commit-then-validate is not rescued by idempotent replay.
  • Governed Employment separation is a bitemporal People/Employment aggregate transition, not an in-place status rewrite and not a review-packet side effect. Review evidence is input evidence, not mutation authority.
  • Separation must keep external/long-running workflow out of the DB transaction, preserve purpose-bound authorization/idempotency/audit/outbox/database-owned recorded time, and fail closed when Assignment coordination requires a released owner contract.
  • Security/model acceptance preserves default-null/unbounded model-timeout semantics end-to-end. A downstream security scanner request timeout is not a reason to add an elapsed-time kill or direct provider fallback; timeout provenance and request identity belong to the central CO/security owner path.

Current #64 exact-head Foundation is hosted GREEN including repository PostgreSQL contracts, but merge remains unauthorized because required Security/CodeQL/Strix/independent-approval evidence is non-passing or absent. Please currentize the #100 PR authority text through its existing single-writer lane; this handoff does not edit the baseline from #64.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from canonical People #64 at 6f89e6c26a1bf6c66d29c1125d6b7f525a67b4a7 (no competing baseline source write): high-impact write error taxonomy must distinguish authoritative-state conflict from trusted persistence/control-boundary integrity failure. A stale expected version, semantic idempotency conflict, or governed Assignment/future-version coordination may be client-resolvable conflict. A malformed database receipt, mismatched returned target identity, or impossible authorization/result wiring is an internal integrity fault: validate it while rollback is still possible, fail closed, return a sanitized operator-supportable 5xx at the buyer edge, and never advise the buyer to refresh/change an idempotency key as though the request semantics were wrong. The new EmploymentSeparationPersistenceIntegrityError boundary and HTTP regression on #64 are the executable evidence; volatile leaf SHAs belong in PR/issue metadata rather than the baseline body.

Also retain #314's unresolved concurrency qualification: same-key advisory-lock replay evidence is not proof of the Employment aggregate conflict boundary. Distinct idempotency keys against the same expected Employment version require a real two-session DB blocker/loser acceptance before the separation transition can be treated as requirement-5 complete.

Copy link
Copy Markdown
Contributor Author

Baseline owner handoff from current People writer #64: the prior Distinct-key Employment conflict serialization gap is no longer document-only on the People branch.

Current #64 exact head is fbcaee1f0c8e8012e6013b27568400bb631e6785. a67ed4b1afec755356d1cb4149007bfabaf10090 added tests/test_employment_separation_distinct_key_concurrency.sh, and fbcaee1... currentized docs/traceability/employment-separation.md.

Durable invariant for docs/product-technical-gap-baseline.md when #100 next reconciles: two first attempts with different idempotency keys against one Employment/expected version must serialize on the Employment aggregate rather than being mistaken for same-key idempotency serialization. Acceptance observes the actual PostgreSQL blocker with pg_blocking_pids(...) and a row/transaction lock wait, produces one committed separation, makes the loser fail as stale authoritative state, and proves no duplicate/loser-side separation, audit, outbox or idempotency truth. The companion uses a shell-controlled FIFO pre-commit boundary instead of a database sleep, so elapsed time is not the evidence.

Evidence status must stay precise: implemented on active #64, but awaiting canonical Foundation #311 registration and exact-head PostgreSQL execution; protected develop has not adopted it. Also #100's PR receipt still references an older #64 head, so please currentize that authority in the baseline writer rather than treating the stale snapshot as live truth.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from current People/Employment separation owner (#64), without competing edit to docs/product-technical-gap-baseline.md:

A concurrency acceptance is incomplete if it proves only the normal winner/replay or winner/stale-loser path. For a transactional HR mutation that starts client and server sessions, the failure path must also prove quiescence before test/database teardown and rollback of all durable side effects. The executable form now added on #64 establishes a real blocker, terminates the blocked loser before the pre-commit winner, waits both clients, requires both named PostgreSQL backends to disappear from pg_stat_activity, then requires zero separation/audit/outbox/idempotency residue while the original current Employment version remains authoritative. Elapsed polling is coordination only, not correctness evidence.

This should generalize as a Foundation/PostgreSQL contract invariant: process cleanup is not merely kill/wait on shell PIDs; server-side sessions and transaction residue must be observed independently when the contract intentionally exercises blocked/aborted transactions.

Current #64 exact head after this increment is 52db8ff03d1c7ec8963b9d0a24c7f1e9d7579077. The #100 body still names an older #64 leaf head; please currentize that volatile owner metadata in this single-writer lane when reconciling the next baseline update.

Copy link
Copy Markdown
Contributor Author

Baseline single-writer handoff from current People work; no competing docs/product-technical-gap-baseline.md edit made here.

Durable invariant to absorb when #100 next writes: ordinary same-key replay is not sufficient evidence for a retry-safe high-impact mutation. Where the caller can lose trust in the outcome after the database commits, acceptance must prove an uncertain-commit path: independent database state qualifies the first commit; the original caller subsequently fails; a fresh connection with the same semantic command/idempotency key recovers the exact first committed identity and database-owned recorded time; and retry-only audit/outbox identities leave no durable rows. This complements, rather than replaces, the existing failure-cleanup invariant that pre-commit aborts must leave zero durable side effects and quiesce server sessions.

People exact evidence is #64 c099e367f80843910face46c45d4c02b1ee0ce51, with tests/test_employment_separation_uncertain_commit_recovery.sh introduced at 07cf1143906125dec527bd4272a5ff9c5746baf0. It remains pending canonical #311 companion registration/exact-tree PostgreSQL execution, so do not record it as protected/runtime GREEN yet. Also note #100's body still names an old #64 leaf; volatile leaf SHAs should be currentized in PR metadata without turning them into durable baseline truth.

Copy link
Copy Markdown
Contributor Author

Baseline single-writer handoff from People #64 current head 0d0b18ef9204077463d044073c92722d455dcd14 (no competing edit to docs/product-technical-gap-baseline.md).

Durable invariant to absorb when #100 next currentizes the baseline: a governed Employment separation and Assignment creation that can establish contradictory People truth must share the same aggregate conflict boundary. Under PostgreSQL READ COMMITTED, putting FOR UPDATE into the same statement that reads business versions is not sufficient freshness evidence—the statement snapshot may have been taken before waiting. Correct acceptance is: acquire the Employment anchor in one statement, then perform a fresh post-lock coverage read; prove both commit orders with the real lock graph; and prove loser-side contradictory durable truth is zero.

Capability corollary: do not broaden the ordinary Assignment runtime with Employment UPDATE merely to obtain SELECT ... FOR UPDATE. The coordination privilege belongs behind a dedicated non-login/non-bypass-RLS database boundary. #64 implements this in migration 0017 and ADR 0015 remains Proposed pending canonical PostgreSQL execution and protected integration.

Copy link
Copy Markdown
Contributor Author

Durable People-domain invariant for the baseline writer from fresh #64 review:

candidate_worker_conversion_record is recruiting-origin provenance, not generic People mutation authority. Its protected schema requires exact candidate + resulting Person + resulting Employment + sealed hire selection decision, and the Employment/Person composite FK means the referenced Employment must already exist. Therefore a generic server-generated new-Employment command cannot safely prove authority by pre-querying a conversion for that future Employment; doing so creates an impossible FK/precondition cycle. Conversely, a Person-only historical conversion must not authorize an unrelated later Employment or rehire.

Canonical contract split should remain explicit: confirmed recruiting hire/rehire materialization may atomically create/bind new Employment + governed conversion from the sealed selection decision; direct People-admin Employment/rehire must use its own purpose-bound human-confirmed evidence and must not fabricate/reuse candidate conversion. Assignment/Employment truth remains People-owned; recruiting provenance remains a referenced fact, never a substitute for target-aggregate authorization.

Also currentize the volatile #64 receipt only in PR metadata, not durable baseline prose: #64 moved beyond the stale 4be7f168... text. The attempted exact pre-insert conversion binding was identified as circular and was normally reverted rather than promoted as a durable invariant.

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from current #64 People owner: generic Employment creation must not use candidate_worker_conversion_record as authority. The conversion relation is recruiting-origin provenance and depends on the resulting Employment; exact binding is circular before generic Employment insert, while Person-only historical conversion reuse can authorize unrelated later Employment/rehire. Hosted RED 20e29962311b17eb004412cd775dd5ada0ca4cba exposed the old dependency. Current repair 7f9fbd08470e5c5ab9292469ca91f7e42c2d8dc9 serializes different-key Employment creation on the stable tenant-qualified current Person row (FOR UPDATE OF person), obtains recorded time after that conflict boundary, then reads the Employment portfolio in a fresh READ COMMITTED statement before exclusivity validation. Assignment retains its separate conversion provenance requirement. Please absorb this as durable domain/concurrency wording through #100 only; do not freeze the volatile SHA into docs/product-technical-gap-baseline.md.

Copy link
Copy Markdown
Contributor Author

Fresh #64 owner handoff for the baseline single-writer lane:

  • Generic Assignment authority is canonical Employment + Position business-effective coverage; candidate_worker_conversion_record is recruiting-origin provenance and is not a generic staffing prerequisite.
  • A focused “without recruiting conversion” acceptance fixture must still cover the governed command’s effective interval. fix(people): protect governed mutation runtime types #64 exposed a real fixture defect where Employment/Position began 2026-09-01 while the reused Assignment command began 2026-08-18; the kernel correctly rejected the unrelated temporal mismatch. fix(people): protect governed mutation runtime types #64 repairs only the fixture window rather than weakening coverage validation.
  • The same fix(people): protect governed mutation runtime types #64 head also added explicit tests for the newly introduced detached-snapshot fail-closed guards so owned statement/branch coverage remains 100% after alias-detachment hardening.

Current #64 exact head is af87c0fd21ea5b5443cc552817863f1881843e91; exact-head Foundation is terminal SUCCESS, Recovery/SAST are SUCCESS, Security remains fail-closed only at the known Dependency Review HTTP 403 owner incident, and CodeQL is still settling. Keep volatile SHA/run data out of docs/product-technical-gap-baseline.md; only the durable invariants above belong in the baseline. The existing baseline body still names an old #64 head, so currentize that volatile PR metadata only in #100's own writer lane.

Copy link
Copy Markdown
Contributor Author

Baseline-owner handoff from the People lane: high-impact HR reason codes must be a closed canonical People vocabulary and remain identical across public API schema, application command validation, database function/table constraints, audit/event semantics, and evidence/review packets. A lower_snake_case syntax check alone is not governance. Current #64 candidate closes Employment separation to exactly voluntary_resignation, retirement_transition, fixed_term_completion, position_elimination, employer_initiated_separation; arbitrary syntactically-valid codes fail before mutation. Please record this durable invariant in docs/product-technical-gap-baseline.md when #100 next reconciles protected/current People evidence rather than copying mutable #64 source.

Copy link
Copy Markdown
Contributor Author

Baseline single-writer handoff: #64 now carries the Employment-separation docs-to-code reconciliation through exact head e38fe69ba4a0082fe671f6cdd19b24c0d810aa39 (subject to current-head hosted validation). Durable baseline invariants to adopt when this owner lane next advances:

  • canonical API/Data Model/ERD/UML/PRD/TRD must distinguish active-PR separation truth from protected/released truth;
  • employment_separation_record + terminal terminated version is the authoritative separation fact; continuation effective_to is structural interval closure, not a second termination truth;
  • public/application/DB reason vocabulary is exactly the five reviewed codes;
  • Assignment and separation share the Employment aggregate conflict boundary, but separation does not own/modify Assignment rows;
  • feat(people): 재입사를 기존 Person + 새 Employment로 명시적으로 모델링 #302 rehire is planned downstream and must not appear as an implemented state transition before protected separation truth exists;
  • same-key uncertain-outcome replay must converge on first durable result without retry-only separation/audit/outbox side effects.

Please also currentize any stale #64 exact-head references in docs/product-technical-gap-baseline.md when the #100 writer lane safely advances. I did not edit that file from #64.

Copy link
Copy Markdown
Contributor Author

Final baseline-writer handoff from the #64 People owner line is now d9cc516d54b4642f59fe126c331a19945fdf75f1 after adopting an intervening CHANGELOG-only delta and repairing its deterministic manifest provenance.

Durable baseline facts to carry when #100 safely advances:

  • API/Data Model/ERD/UML/PRD/TRD/SECURITY/THREAT_MODEL/TEST_STRATEGY/OPERABILITY all distinguish active-PR separation truth from protected/released truth.
  • terminal employment_record_version(status='terminated') + employment_separation_record is the single authoritative separation fact; continuation effective_to is interval structure, not a second termination truth.
  • the five-value reason vocabulary, human confirmation/versioned evidence, purpose-bound authorization, audit/outbox/idempotency atomicity, uncertain-outcome replay, Employment-aggregate serialization, post-lock coverage re-read, session quiescence, and no Assignment-side mutation are durable invariants.
  • legacy fix(people): protect governed mutation runtime types #64 PostgreSQL GREEN is not canonical specialized separation acceptance; ci: make PostgreSQL Foundation discovery fail closed #311 remains the execution owner.
  • feat(people): 재입사를 기존 Person + 새 Employment로 명시적으로 모델링 #302 rehire is planned downstream and must not appear as an implemented transition or reuse an old candidate-worker conversion as authority.
  • no buyer p95 claim exists yet for separation; it still requires production-representative measurement.

Please currentize any stale #64 exact-head references in docs/product-technical-gap-baseline.md when the #100 single-writer lane advances. I did not edit that file from #64.

Copy link
Copy Markdown
Contributor Author

Single-writer handoff for docs/product-technical-gap-baseline.md from the #316/#317 performance lane: when currentizing the Employment separation buyer-performance gap, preserve these durable acceptance invariants rather than only recording a latency number: exact result-artifact SHA-256 binding; independently observed deployed candidate SHA; fixed >=1,000 non-contending and >=100 contention sample floors; profile-separated p50/p95/p99/max with p95<=20ms only on ordinary first-commit; right-cleared prepared-state provenance; mandatory host CPU/RSS + DB pool acquisition/use/waiter/connection evidence; and zero residual HTTP tasks/DB sessions/open transactions/sockets/background workers/pool checkouts/waiters. Current performance mechanics owner is #317@301053f0f504484dfa65ee36058933997df26143; no actual p95 GREEN exists yet.

seonghobae commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Durable baseline handoff from #316/#317: commercial performance evidence must bind both the benchmark runner's effective option surface and the approved load model. k6 CLI options have higher precedence than script/config options, so a canonical runner must not pass opaque caller CLI arguments. Likewise RPS/duration/preallocated-VU/max-VU cannot remain caller-supplied environment values if post-run acceptance merely checks result/runtime agreement; otherwise a weaker load can be internally consistent and still false-GREEN.

#317 exact cfbdad595fac009374766a19efe27933beace9ea now rejects positional k6 options, removes caller-controlled load-model environment forwarding, version-controls exact per-profile constant-arrival-rate models, and requires fixture cardinality to fit the approved schedule exactly. Current v1 ordinary profiles use 20 RPS × 50 s with 20 preallocated / 80 max VUs; contention uses 10 pair-iterations/s × 10 s with 20 / 80 VUs. Those numeric values are volatile acceptance-contract metadata rather than a released capacity claim. Keep volatile SHA/test counts and concrete load values in PR/Issue metadata; if the invariant itself is durable enough for docs/product-technical-gap-baseline.md, incorporate it through this #100 single-writer lane rather than copying the baseline into #64/#317.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation priority: medium status: draft type: docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant