Repository navigation
feat: establish shared file ownership foundation #8609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mzxchandra
wants to merge
32
commits into
codex/project-entity-enforcement
from
codex/file-ownership-foundation
+232,030
−5,259
Draft
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
25d7280
feat: establish durable file ownership and rollout compatibility
mzxchandra 2613baa
test: align file ownership fixtures and validation reports
mzxchandra 6f8882e
refactor: persist file owners with native foreign keys
mzxchandra 5cc36e8
fix(db): parenthesize the file owner search index expression
mzxchandra 0f50572
chore(files): merge latest project entity enforcement
mzxchandra 3742422
chore(files): align ownership migrations with staging
mzxchandra 16abd8a
chore(files): follow refreshed project migration sequence
mzxchandra 43f2119
fix(files): harden ownership lifecycle and realtime admission
mzxchandra a8cee8a
test(files): complete Project detachment database fixture
mzxchandra 8c38f18
test(files): seed required Project memberships in integration fixtures
mzxchandra 78b6b71
fix(files): resolve lifecycle and search review findings
mzxchandra 347cc6c
fix(realtime): fence file joins by owner-qualified room
mzxchandra 94125e1
fix(files): retain shared resources after creator deletion
mzxchandra 341a721
fix(files): reconcile creator handoff with project ownership
mzxchandra 5089d12
fix(files): preserve upload history across creator handoff
mzxchandra df7d505
fix(files): align lifecycle fixtures and conflict responses
mzxchandra 4e0223e
fix(files): preserve empty history and order lifecycle locks
mzxchandra e0b359e
fix(files): retry restore names claimed by legacy writers
mzxchandra 1eecc18
fix(files): make staged cleanup safe across database failures
mzxchandra bbf557f
fix(files): clean staged content after rejected commits
mzxchandra 65f35e1
chore(files): reconcile foundation with current project parent
mzxchandra 4be4772
fix(ci): resolve manual audit base from the open pull request
mzxchandra 57cd686
fix(files): bound affected subtrees and preserve fenced revisions
mzxchandra 1372339
Merge remote-tracking branch 'origin/codex/project-entity-enforcement…
mzxchandra 23b0ad5
fix(ci): pin the current pull request base branch
mzxchandra 4b7ed91
fix(files): require workspace owners for workspace-scoped files
mzxchandra b676fc0
Merge project enforcement parent and reconcile file migration ordering
mzxchandra 1beb436
fix(db): make file ownership provisioning replay safe
mzxchandra 903c669
Merge project enforcement parent after table row trigger migration
mzxchandra 1f47329
Merge project enforcement parent with table ordering updates
mzxchandra d0b34d9
Merge project enforcement parent with acquisition attribution
mzxchandra 1cc338b
Merge project enforcement fixture corrections
mzxchandra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| if [ "$GITHUB_EVENT_NAME" = pull_request ]; then | ||
| git fetch --depth=1 origin "$GITHUB_BASE_REF" | ||
| echo "ref=origin/$GITHUB_BASE_REF" >> "$GITHUB_OUTPUT" | ||
| elif [ "$GITHUB_EVENT_NAME" = workflow_dispatch ]; then | ||
| if [ "$GITHUB_REF_TYPE" != branch ]; then | ||
| echo 'Manual diff audits require a branch with exactly one open pull request.' >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| pr_pages=$(gh api --method GET "repos/$GITHUB_REPOSITORY/pulls" \ | ||
| -f state=open -f "head=${GITHUB_REPOSITORY%%/*}:$GITHUB_REF_NAME" --paginate --slurp) | ||
| matching_prs=$(jq -ce --arg repository "$GITHUB_REPOSITORY" --arg branch "$GITHUB_REF_NAME" \ | ||
| '[.[][] | select(.state == "open" and .head.ref == $branch and .head.repo.full_name == $repository)]' \ | ||
| <<< "$pr_pages") | ||
| if [ "$(jq 'length' <<< "$matching_prs")" != 1 ]; then | ||
| echo 'Manual diff audits require exactly one open pull request for the dispatched branch.' >&2 | ||
| exit 1 | ||
| fi | ||
| if [ "$(jq -r '.[0].head.sha' <<< "$matching_prs")" != "$GITHUB_SHA" ]; then | ||
| echo 'The pull request head changed after dispatch; dispatch again for its current head.' >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| base_ref=$(jq -er '.[0].base.ref | select(type == "string" and length > 0)' <<< "$matching_prs") | ||
| if ! git check-ref-format "refs/heads/$base_ref"; then | ||
| echo 'The pull request did not provide a valid base branch.' >&2 | ||
| exit 1 | ||
| fi | ||
| git fetch --depth=1 origin "refs/heads/$base_ref" | ||
| base_sha=$(git rev-parse --verify 'FETCH_HEAD^{commit}') | ||
| echo "ref=$base_sha" >> "$GITHUB_OUTPUT" | ||
| elif [ -n "${GITHUB_BEFORE:-}" ] && | ||
| [ "$GITHUB_BEFORE" != 0000000000000000000000000000000000000000 ]; then | ||
| git fetch --depth=1 origin "$GITHUB_BEFORE" | ||
| echo "ref=$GITHUB_BEFORE" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo 'ref=HEAD~1' >> "$GITHUB_OUTPUT" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.