Skip to content
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
6a6e87f
feat: expose mobile branding workspace actions
seonghobae May 16, 2026
cd3ede6
fix: address mobile workspace review feedback
seonghobae May 16, 2026
6dabce6
fix: dedupe mobile workspace data fetches
seonghobae May 16, 2026
38c9054
fix: keep inbox text on safe render path
seonghobae May 16, 2026
3f835a8
feat: align branding shell navigation
seonghobae May 17, 2026
d31ab0a
feat: wire shell actions to email detail
seonghobae May 17, 2026
2788799
feat: add startup workspace preference
seonghobae May 17, 2026
2ee6e79
fix: keep startup preference off hash routes
seonghobae May 17, 2026
fbfc9f5
fix: handle blank subjects and storage failures
seonghobae May 17, 2026
3176110
test: assert inbox fixture fetches
seonghobae May 17, 2026
eb027d2
feat: collapse tablet AI panel
seonghobae May 17, 2026
a1713a4
feat: back mobile panels with search API
seonghobae May 17, 2026
1aa1801
feat: build functional AI hub workspace
seonghobae May 17, 2026
9d67dc1
fix: keep mobile workspace hash in sync
seonghobae May 17, 2026
0967785
fix: keep settings API out of startup scope
seonghobae May 17, 2026
20ca2ab
feat: link AI hub sidebar sections
seonghobae May 17, 2026
bc97e51
test: prove safe text rendering path
seonghobae May 17, 2026
519f40b
feat: adopt insight cards in email detail
seonghobae May 17, 2026
bb8b2b6
feat: back startup views with search data
seonghobae May 17, 2026
dfb9fa8
feat: add project workspace roadmap
seonghobae May 17, 2026
3579b98
feat: expose connector bootstrap manifest
seonghobae May 17, 2026
b7ad165
feat: add calendar writeback intent
seonghobae May 17, 2026
cd5512f
feat: add access policy deny precedence
seonghobae May 17, 2026
faffb32
fix: address review followups
seonghobae May 17, 2026
1b68baf
fix: resolve mobile workspace review threads
seonghobae May 17, 2026
81be759
fix(auth): require token for dev header trust
seonghobae May 17, 2026
0699391
fix(strix): scan changed context from PR head
seonghobae May 18, 2026
a770c7a
test(auth): make dev auth overrides opt in
seonghobae May 18, 2026
f7aafab
fix(ci): ignore unsafe regular PR context names
seonghobae May 18, 2026
6789d5f
fix(security): require configured encryption key
seonghobae May 18, 2026
4878079
fix(auth): gate dev headers to local runtimes
seonghobae May 18, 2026
7ca4b4b
fix(auth): fail closed on dev headers
seonghobae May 18, 2026
1564ad6
fix(calendar): trust server writeback sources
seonghobae May 18, 2026
c4328f1
Merge remote-tracking branch 'origin/master' into feature/branding-mo…
seonghobae May 18, 2026
a898a90
fix: scope Strix zero-finding infra bypass
seonghobae May 18, 2026
d7a0dce
fix: add signed session auth
seonghobae May 18, 2026
62304fc
fix: close API ownership trust gaps
seonghobae May 18, 2026
9926a3e
fix: enforce organization-scoped email access
seonghobae May 18, 2026
d149174
fix: harden database and SMTP egress config
seonghobae May 18, 2026
8630b42
fix: close SMTP sockets after pinned send
seonghobae May 18, 2026
9c7f4b0
fix: validate calendar writeback boundaries
seonghobae May 18, 2026
634770b
fix: require DNS validation for SMTP destinations
seonghobae May 18, 2026
48aa217
fix: make SMTP allowlist denial explicit
seonghobae May 18, 2026
5117325
fix: pin session token algorithm
seonghobae May 18, 2026
60c0f0e
fix: avoid Bandit session algorithm false positive
seonghobae May 18, 2026
60c72e9
fix: harden Strix security follow-ups
seonghobae May 18, 2026
71ce036
fix: pin SMTP DNS resolution to socket target
seonghobae May 19, 2026
05f35b7
fix: close north-star workspace gaps
seonghobae May 19, 2026
d856c40
fix: resolve current-head review findings
seonghobae May 19, 2026
4bfb8e5
fix: extend Strix PR scan budget
seonghobae May 19, 2026
5366b15
fix: harden auth and secret encryption gates
seonghobae May 19, 2026
adabbc4
fix: close task tracking and workspace IA gaps
seonghobae May 19, 2026
b327250
fix: make SMTP host allowlist guard explicit
seonghobae May 19, 2026
87540a4
fix: resolve current-head governance review blockers
seonghobae May 19, 2026
84e6f5d
fix: address current-head review follow-ups
seonghobae May 19, 2026
315d3cc
fix: reject SMTP header injection inputs
seonghobae May 19, 2026
f0394da
fix: retry stale Strix PR head fetch
seonghobae May 19, 2026
7c3bc95
fix: include calendar service in Strix PR scope
seonghobae May 19, 2026
ea8c5a1
fix: map Strix narrative file findings safely
seonghobae May 19, 2026
93a0c3e
feat: expand workspace destination surfaces
seonghobae May 19, 2026
356021a
fix: require strong session secret in all runtimes
seonghobae May 19, 2026
1bfe452
fix: allow scoped calendar writeback admins
seonghobae May 19, 2026
c53934e
fix: harden SMTP hostname validation
seonghobae May 19, 2026
73840c4
fix: reject mixed SMTP DNS answers
seonghobae May 20, 2026
28c34e8
Merge remote-tracking branch 'origin/master' into feature/branding-mo…
seonghobae May 20, 2026
f797363
fix: remove workspace mobile button trailing whitespace
seonghobae May 20, 2026
fc09460
fix: keep Strix PR findings fail-closed
seonghobae May 20, 2026
181cd75
fix: harden frontend auth headers
seonghobae May 20, 2026
3ec9c7d
fix: enforce default private api auth
seonghobae May 20, 2026
86d2971
fix: harden task title and session secret inputs
seonghobae May 20, 2026
902a36c
fix: avoid regex task title scanning
seonghobae May 20, 2026
fdafa67
fix: harden llm egress and email display text
seonghobae May 20, 2026
b121f58
Merge branch 'master' into feature/branding-mobile-action-workspace
seonghobae May 20, 2026
c7d256a
test: align Strix fixtures with trusted input root
seonghobae May 21, 2026
93abd0f
fix: include LLM provider URL context in Strix scope
seonghobae May 21, 2026
1e49395
fix: disable redirects for LLM provider requests
seonghobae May 21, 2026
e548a5e
Merge remote-tracking branch 'origin/master' into HEAD
seonghobae May 21, 2026
2c72573
Merge remote-tracking branch 'origin/master' into HEAD
seonghobae May 21, 2026
b767ba9
fix: harden prompt and email safety checks
seonghobae May 21, 2026
6bbe614
test: align prompt API import style
seonghobae May 21, 2026
5774032
fix: scope email sending to authenticated user
seonghobae May 21, 2026
ff6c9e0
fix: scope LLM providers to organizations
seonghobae May 21, 2026
3c6960d
fix: address PR review safety gaps
seonghobae May 21, 2026
dc1697d
fix: route calendar actions through writeback intent
seonghobae May 21, 2026
8a6df82
fix: clarify SMTP DNS validation before connect
seonghobae May 21, 2026
a4ecb19
fix: wire tasks page to signed task API
seonghobae May 21, 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
103 changes: 27 additions & 76 deletions .github/workflows/pr-governance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
- Application CI
- Bandit Security Scan
- Build and Publish Docker Images
- strix
- Strix Security Scan
types: [completed]
check_run:
types: [completed]
workflow_dispatch:
inputs:
Expand All @@ -27,88 +29,37 @@ jobs:
governance:
name: metadata-only gate evaluation
runs-on: ubuntu-latest
if: ${{ github.event_name != 'check_run' || github.event.check_run.app.slug == 'coderabbitai' || contains(github.event.check_run.name, 'CodeRabbit') || contains(github.event.check_run.name, 'coderabbit') }}
steps:
- name: Evaluate PR gate metadata
- name: Materialize trusted governance gate
env:
GH_TOKEN: ${{ github.token }}
EVENT_NAME: ${{ github.event_name }}
DIRECT_PR_NUMBER: ${{ github.event.inputs.pr_number || '' }}
TARGET_PR_NUMBER: ${{ github.event.pull_request.number || '' }}
WORKFLOW_RUN_PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number || '' }}
TRUSTED_PR_NUMBER: ${{ github.event.pull_request.number || github.event.workflow_run.pull_requests[0].number || github.event.check_run.pull_requests[0].number || github.event.inputs.pr_number || '' }}
run: |
set -euo pipefail

PR_NUMBER="${DIRECT_PR_NUMBER:-${TARGET_PR_NUMBER:-${WORKFLOW_RUN_PR_NUMBER:-}}}"
if [ -z "$PR_NUMBER" ]; then
printf 'No pull request number is available for event %s; nothing to evaluate.\n' "$EVENT_NAME"
exit 0
fi

OWNER="${GITHUB_REPOSITORY%/*}"
REPO="${GITHUB_REPOSITORY#*/}"
COMMENT_BODY=""

PR_JSON="$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json number,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup)"
HEAD_SHA="$(gh api "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" --jq '.head.sha')"
HEAD_REF_OID="$HEAD_SHA" # headRefOid equivalent for REST metadata paths.
MERGE_STATE="$(printf '%s' "$PR_JSON" | jq -r '.mergeStateStatus')"
IS_DRAFT="$(printf '%s' "$PR_JSON" | jq -r '.isDraft')"

if [ "$IS_DRAFT" = "true" ]; then
COMMENT_BODY="${COMMENT_BODY}- Draft PR: merge automation is paused.\n"
fi

if [ "$MERGE_STATE" = "BEHIND" ]; then
COMMENT_BODY="${COMMENT_BODY}- Branch is BEHIND the base branch; update the branch and re-run checks.\n"
fi

if [ "$MERGE_STATE" = "DIRTY" ] || [ "$MERGE_STATE" = "UNKNOWN" ]; then
COMMENT_BODY="${COMMENT_BODY}- Merge state is ${MERGE_STATE}; resolve conflicts or refresh mergeability.\n"
fi

THREADS_JSON="$(gh api graphql \
-F owner="$OWNER" \
-F repo="$REPO" \
-F number="$PR_NUMBER" \
-f query='query($owner:String!, $repo:String!, $number:Int!) { repository(owner:$owner, name:$repo) { pullRequest(number:$number) { headRefOid mergeStateStatus reviewThreads(first:100) { nodes { id isResolved isOutdated } } } } }')"
UNRESOLVED_THREADS="$(printf '%s' "$THREADS_JSON" | jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false and .isOutdated == false)] | length')"
if [ "$UNRESOLVED_THREADS" != "0" ]; then
COMMENT_BODY="${COMMENT_BODY}- ${UNRESOLVED_THREADS} unresolved current review thread(s) remain.\n"
fi

if ! REQUIRED_CHECKS="$(gh pr checks "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --required --json name,state,link 2>/tmp/pr-checks-error.txt)"; then
COMMENT_BODY="${COMMENT_BODY}- Required check metadata could not be read: $(cat /tmp/pr-checks-error.txt).\n"
if [ -n "$TRUSTED_PR_NUMBER" ]; then
trusted_ref="$(gh api "repos/${GITHUB_REPOSITORY}/pulls/${TRUSTED_PR_NUMBER}" --jq '.base.sha')"
else
FAILED_REQUIRED="$(printf '%s' "$REQUIRED_CHECKS" | jq '[.[] | select(.state != "SUCCESS" and .state != "SKIPPED")] | length')"
if [ "$FAILED_REQUIRED" != "0" ]; then
COMMENT_BODY="${COMMENT_BODY}- ${FAILED_REQUIRED} required check(s) are not successful on ${HEAD_REF_OID}.\n"
fi
default_branch="$(gh api "repos/${GITHUB_REPOSITORY}" --jq '.default_branch')"
trusted_ref="$(gh api "repos/${GITHUB_REPOSITORY}/branches/${default_branch}" --jq '.commit.sha')"
fi

CHECK_RUNS="$(gh api "repos/${GITHUB_REPOSITORY}/commits/${HEAD_SHA}/check-runs")"
CODERABBIT_MATCHES="$(printf '%s' "$CHECK_RUNS" | jq '
[.check_runs[]
| select(.app.slug == "coderabbitai" or (.name | test("CodeRabbit|coderabbit"; "i")))]'
)"
CODERABBIT_COUNT="$(printf '%s' "$CODERABBIT_MATCHES" | jq 'length')"
CODERABBIT_NOT_READY="$(printf '%s' "$CODERABBIT_MATCHES" | jq '
[.[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped"))]
| length'
)"
if [ "$CODERABBIT_COUNT" = "0" ]; then
COMMENT_BODY="${COMMENT_BODY}- Missing current-head CodeRabbit/coderabbitai evidence for ${HEAD_REF_OID}.\n"
elif [ "$CODERABBIT_NOT_READY" != "0" ]; then
COMMENT_BODY="${COMMENT_BODY}- Current-head CodeRabbit check is not successful on ${HEAD_REF_OID}.\n"
fi
trusted_workspace="$RUNNER_TEMP/trusted-governance"
trusted_archive="$RUNNER_TEMP/trusted-governance.tar.gz"
mkdir -p "$trusted_workspace"
gh api "/repos/${GITHUB_REPOSITORY}/tarball/${trusted_ref}" > "$trusted_archive"
tar -xzf "$trusted_archive" -C "$trusted_workspace" --strip-components=1
test -f "$trusted_workspace/scripts/ci/pr_governance_gate.sh"
echo "GOVERNANCE_GATE=$trusted_workspace/scripts/ci/pr_governance_gate.sh" >> "$GITHUB_ENV"

if [ -n "$COMMENT_BODY" ]; then
gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
-f body="$(printf 'PR governance metadata gate is not ready for `%s`:\n\n%s' "$HEAD_REF_OID" "$COMMENT_BODY")"
exit 0
fi

gh pr merge "$PR_NUMBER" \
--repo "$GITHUB_REPOSITORY" \
--auto \
--merge \
--match-head-commit "$HEAD_SHA"
- name: Evaluate PR gate metadata
env:
GH_TOKEN: ${{ github.token }}
EVENT_NAME: ${{ github.event_name }}
DIRECT_PR_NUMBER: ${{ github.event.inputs.pr_number || '' }}
TARGET_PR_NUMBER: ${{ github.event.pull_request.number || '' }}
WORKFLOW_RUN_PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number || '' }}
CHECK_RUN_PR_NUMBER: ${{ github.event.check_run.pull_requests[0].number || '' }}
run: |
bash "$GOVERNANCE_GATE"
53 changes: 53 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,56 @@
explicit `if: ${{ always() }}` upload steps when needed.
- Prefer upgrading or removing vulnerable dependencies over downgrading patched
packages unless compatibility evidence is recorded in the PR.

## PR automation and review defaults

- Follow `docs/development/merge-gate-policy.md` for PR gate interpretation.
- PR Governance must stay metadata-only: no PR-head checkout, no admin merge, no
review dismissal, and no security-check suppression.
- Pending/queued checks and pending CodeRabbit evidence are wait states, not hard
failures. Hard blockers should be reported through the idempotent
`<!-- pr-governance:metadata-gate -->` comment path.
- Missing current-head CodeRabbit evidence is a wait state until bounded polling
or authoritative skip/review evidence resolves it; do not post a hard blocker
only because the current head has not been reviewed yet.
- `STARTUP_FAILURE` in required PR governance/check metadata is a hard blocker
and should use the same idempotent metadata-gate comment path.

## Workspace and task tracking defaults

- First-run frontend sessions should open the Today execution dashboard while
preserving explicit Dashboard, Email, and Calendar startup choices.
- Workspace navigation changes must keep the desktop primary nav and the
tablet/mobile drawer in sync for Mail, Calendar, Tasks, Projects, Context
Search, AI Hub, Data, Security, and Settings; add route and responsive E2E
coverage instead of documenting unavailable destinations as implemented.
- Workspace destination pages must show actionable detail surfaces, not inert
marketing placeholders. Calendar needs month/week/detail/coordination and
CalDAV writeback states; Tasks needs source-linked ticket boards/details;
Search needs result/detail graph/timeline states; Projects needs decision logs;
Data needs repository/ingestion/embedding/quality/WebDAV queues; Security and
Settings need governance and operational control surfaces. Keep provider writes
labeled as future work until source-backed integrations exist.
- Browser frontend writes to signed backend routes must carry the stored
`naruon_session_token` as `Authorization: Bearer` and must not emit or forward
public identity headers such as `X-User-Id`, `X-Organization-Id`,
`X-Group-Id`, `X-Group-Ids`, `X-User-Role`, or `X-Dev-Auth-Token`;
tests/mocks must exercise the signed-session path.
- Private backend `/api/*` routers must be registered with the default
`get_auth_context` signed-session dependency; only explicitly documented
public endpoints such as `/api/runtime-config`, `/`, and `/metrics` may omit
it. Admin/provider registry endpoints must enforce role checks in addition to
authentication.
- Email-derived tasks must stay source-linked to the email/thread and tenant
owner scope. Do not expose new sequential database ids through task APIs; use
opaque public ids for user-visible ticket tasks. Task titles are plain text:
reject HTML-like execution item markup at the backend boundary rather than
storing user-supplied tags for later UI rendering.
- New database tables and columns must use at least two-word `snake_case` names;
avoid single-token columns such as `id`, `title`, `status`, or `priority` on
newly introduced objects.
- When reviews find public/private identifier leaks or stale API fixture shapes,
update tests, frontend mocks, E2E mocks, README examples, and architecture docs
together so the same bug pattern does not reappear in copied examples.
- DB-affecting API slices need both mocked fast tests and a real PostgreSQL
bootstrap/smoke path before PR merge evidence is considered complete.
Loading
Loading