Skip to content

[codex] promote dev workflow cleanup to main - #77

Open
KazanderDad wants to merge 26 commits into
mainfrom
dev
Open

[codex] promote dev workflow cleanup to main#77
KazanderDad wants to merge 26 commits into
mainfrom
dev

Conversation

@KazanderDad

Copy link
Copy Markdown
Member

Summary

  • Promotes the current dev housekeeping/backlog alignment into main.
  • Adds branch-scoped session-log workflow support already landed on dev.
  • Marks repo-local todos as superseded by GitHub Issues and the GreenPill Project.
  • Aligns local Supabase/Colima startup defaults for local operator workflows.

Objective

Keep main aligned with the current agent workflow, backlog source of truth, and local Supabase bootstrap expectations before the next production-readiness sprint.

Changes

Validation

  • git diff --check
  • bash -n scripts/start-local-supabase.sh
  • GitHub Project issue migration verified through gh project item-list.
  • PR CI/review validation pending on this production promotion PR.

Reviewer Notes

  • Review commit-by-commit; this is workflow/backlog/local-dev cleanup, not a runtime product feature change.
  • This PR does not mutate linked or remote Supabase projects.
  • Agents must not merge PRs targeting main; a human must perform the production merge after checks/reviews are satisfactory.

Follow-ups

Objective:
- move active backlog tracking from repo-local todos to GitHub Issues and the owner-level project

Changes:
- mark agent-context/todo.md as superseded by GitHub Issues
- link migrated/open issues #57, #59, #63, #74, #75, and #76
- add a dev branch session-log entry for the backlog migration

Validation:
- gh issue create for #74, #75, #76
- gh project item-add and item-edit for #57, #59, #63, #74, #75, #76
- gh project item-list 1 --owner GreenPill-TO --format json --limit 20
- git diff --check

Notes:
- issues are intentionally left in Inbox and not yet aligned to features, sprints, or goals
Objective:
- keep local Supabase startup aligned with the shared Colima agent runtime

Changes:
- default the local Supabase helper to DOCKER_CONTEXT=colima-agents and clear DOCKER_HOST
- document the shared Colima context in README local setup guidance
- set local Supabase Postgres major version to 17 and disable local analytics
- add a dev branch session-log entry for the local startup alignment

Validation:
- bash -n scripts/start-local-supabase.sh
- git diff --check

Notes:
- did not start or mutate any linked Supabase project
@KazanderDad

Copy link
Copy Markdown
Member Author

@codex review

@KazanderDad
KazanderDad marked this pull request as ready for review July 16, 2026 18:12
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spare-change Ready Ready Preview, Comment Jul 21, 2026 5:23am
tcoin Ready Ready Preview, Comment, Open in v0 Jul 21, 2026 5:23am
tcoin-dev Ready Ready Preview, Comment Jul 21, 2026 5:23am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d453f70a2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo "PR version bump writes back to same-repo branches only. Please apply the expected package.json version bump manually for forked PRs."
exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow fork PRs to pass after manual bump

Forked PRs to dev/main hit this step and fail before checkout or version verification. The message asks contributors to apply the bump manually, but even a manually corrected fork PR can never get this check green, which blocks the PR if this workflow is required; skip writeback for forks or run a read-only verification instead of exiting failure.

Useful? React with 👍 / 👎.

if docker context ls --format '{{.Name}}' | grep -qx 'colima-varrun'; then
docker context use colima-varrun >/dev/null
fi
export DOCKER_CONTEXT="${DOCKER_CONTEXT:-colima-agents}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fall back when the Colima context is absent

On a machine with a working default Docker setup or a differently named Colima context, this now exports DOCKER_CONTEXT=colima-agents before checking that the context exists; Docker uses DOCKER_CONTEXT to override the active/default context, so subsequent supabase/docker calls target a context that may not exist. The previous code switched only when the context was present, so local startup regresses unless users know to override DOCKER_CONTEXT manually.

Useful? React with 👍 / 👎.

Comment thread AGENTS.md

## Branch-Scoped Session Logs And Todos

- Use `agent-context/session-log/` for active session logs. Do not add new entries to legacy `agent-context/session-log.md` files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Update the mandatory checklist with the new log path

This new branch-log rule conflicts with the still-mandatory agent-context/workflow.md checklist, which continues to require updating session-log.md and recording balances in session-log.md. Since agents are told to follow both files each session and this commit moved the legacy file into archive/, future sessions can recreate the deprecated root log instead of using the branch-scoped file.

Useful? React with 👍 / 👎.

Objective:
- capture Sprint #78 vetting and the first TCOIN release-alignment environment check before continuing implementation

Changes:
- add a branch-scoped session-log entry for Sprint #78 vetting
- record GitHub Environment variable/secret-name validation for Task #82
- document remaining environment-specific Supabase secret follow-ups

Validation:
- git diff --check
- gh variable list --env Preview – tcoin / Production – tcoin
- gh secret list --env Preview – tcoin / Production – tcoin

Notes:
- no linked Supabase writes were run
- no secret values were printed or committed
KazanderDad and others added 6 commits July 16, 2026 15:25
Objective:
- document Task #83 Vercel environment confirmation evidence and the exact remaining auth/tooling blocker

Changes:
- add a branch-scoped session-log entry for the TCOIN Vercel env confirmation attempt
- record the available PR/Vercel deployment evidence and missing local Vercel access path

Validation:
- git diff --check
- vercel --version failed with command not found
- pnpm exec vercel --version failed with command not found
- checked process/local env profiles and Vercel auth/project metadata paths

Notes:
- no Vercel env values were changed
- no linked Supabase writes were run
Objective:
- capture Task #84 remote Supabase readiness checks and the external DNS blocker before stopping the sprint implementation loop

Changes:
- add a branch-scoped session-log entry for the remote Supabase preflight attempt
- record failed read-only wallet preflight, TorontoCoin ops, pool compatibility, fetch, and DNS checks

Validation:
- git diff --check
- pnpm ops:wallet:preflight:supabase-remote failed with fetch failed
- pnpm exec tsx scripts/run-with-env-profile.ts .env.local-supabase-remote -- pnpm ops:torontocoin failed with fetch failed
- pnpm exec tsx scripts/run-with-env-profile.ts .env.local-supabase-remote -- pnpm ops:torontocoin:pools failed with fetch failed
- direct Node DNS/fetch probe failed with getaddrinfo ENOTFOUND

Notes:
- no linked Supabase writes were run
- remote Supabase profile URL must be corrected or the project restored before continuing hosted release smoke
Objective:
- update Task #84 evidence after the remote Supabase projects were restored

Changes:
- add a branch-scoped session-log entry for restored remote release checks
- record that DNS/reachability is fixed but release blockers remain

Validation:
- git diff --check
- pnpm ops:wallet:preflight:supabase-remote reached release-health RPC and failed on release blockers
- pnpm exec tsx scripts/run-with-env-profile.ts .env.local-supabase-remote -- pnpm ops:torontocoin reached ops checks and failed on indexer tracking blockers
- pnpm exec tsx scripts/run-with-env-profile.ts .env.local-supabase-remote -- pnpm ops:torontocoin:pools reached pool checks and failed on indexed visibility blockers

Notes:
- no linked Supabase writes were run
- pg_cron/cleanup cron and indexer visibility fixes need explicit operator approval before continuing
Squash merge PR #97 after green CI. Routes wallet-critical Edge Function deployment through the gated TCOIN Supabase workflow and repairs Preview user-settings runtime compatibility.
Objective:
- correct the valid Codex review feedback that landed after PR #97 was merged

Changes:
- make manual Supabase workflow dry-runs non-mutating by default
- gate manual Edge Function deploys on explicit deploy mode plus deploy toggle
- deploy wallet-critical Edge Functions one at a time through supported CLI calls
- record the corrective follow-up in the dev session log

Validation:
- ruby -e 'require "yaml"; YAML.load_file(".github/workflows/supabase-deploy-tcoin.yml"); puts "ok"'
- git diff --check

Notes:
- PR #97 merged before the Codex review was submitted, but the feedback was still valid and is fixed here on dev.
KazanderDad and others added 2 commits July 20, 2026 23:51
Objective:
- unblock authenticated wallet bootstrap on hashed Vercel Preview deployments

Changes:
- allow HTTPS Vercel preview origins for the known tcoin and spare-change Cubid-team hosts
- keep arbitrary origins, HTTP previews, and lookalike hostnames rejected
- add CORS regression coverage for hashed and git-style preview URLs
- record the diagnosis and validation in the branch session log

Validation:
- pnpm exec vitest run supabase/functions/_shared/cors.test.ts supabase/functions/_shared/auth.test.ts supabase/functions/user-settings/index.test.ts
- pnpm exec tsc --noEmit --pretty false
- pnpm lint
- git diff --check

Notes:
- browser console showed user-settings ensure-user preflight missing Access-Control-Allow-Origin for the hashed TCOIN Vercel Preview host; bearer token values were not recorded.
Objective:
- unblock authenticated wallet bootstrap on hashed Vercel Preview deployments

Changes:
- allow HTTPS Vercel preview origins for the known tcoin and spare-change Cubid-team hosts
- keep arbitrary origins, HTTP previews, and lookalike hostnames rejected
- add CORS regression coverage for hashed and git-style preview URLs
- record the diagnosis and validation in the branch session log

Validation:
- pnpm exec vitest run supabase/functions/_shared/cors.test.ts supabase/functions/_shared/auth.test.ts supabase/functions/user-settings/index.test.ts
- pnpm exec tsc --noEmit --pretty false
- pnpm lint
- git diff --check

Notes:
- browser console showed user-settings ensure-user preflight missing Access-Control-Allow-Origin for the hashed TCOIN Vercel Preview host; bearer token values were not recorded.
KazanderDad and others added 2 commits July 21, 2026 00:56
Objective:
- unblock authenticated bootstrap on TCOIN dev custom and Vercel preview hosts

Changes:
- allow the owned dev.tcoin.me custom domain in Edge CORS
- include the tcoin-dev Vercel preview project prefix in the narrow preview-origin matcher
- add regression coverage for the new allowed origins and lookalike rejections
- record the diagnosis and validation in the branch session log

Validation:
- pnpm exec vitest run supabase/functions/_shared/cors.test.ts supabase/functions/_shared/auth.test.ts supabase/functions/user-settings/index.test.ts
- pnpm exec tsc --noEmit --pretty false
- pnpm lint
- git diff --check

Notes:
- deployed preflight checks confirmed the earlier tcoin preview host was fixed by #98, while tcoin-dev-git-dev and dev.tcoin.me were still missing Access-Control-Allow-Origin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant