Skip to content

Commit 4c66392

Browse files
authored
chore: promote dev/v0.2 to main
Promote dev/v0.2 as the new mainline after selected main backfills, with additional security-scan hardening from the promotion PR. CodeQL was treated as advisory for this migration PR; CI and packaging smoke passed.
1 parent 7fbf21f commit 4c66392

489 files changed

Lines changed: 43549 additions & 26680 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2+
version = 1
3+
name = "codesign"
4+
5+
[setup]
6+
script = ""
7+
8+
[[actions]]
9+
name = "运行"
10+
icon = "run"
11+
command = "pnpm install && pnpm dev"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AGENTS.md v2 Update Plan
2+
3+
## Goal
4+
5+
Update `AGENTS.md` so Codex agents follow the latest v0.2 plan instead of the stale `CLAUDE.md` copy.
6+
7+
## Sources Read
8+
9+
- `CLAUDE.md`
10+
- `AGENTS.md`
11+
- `docs/VISION.md`
12+
- `docs/PRINCIPLES.md`
13+
- `docs/v0.2-plan.md`
14+
15+
## Steps
16+
17+
1. Identify stale CLAUDE/AGENTS content. - complete
18+
2. Rewrite `AGENTS.md` around v0.2 agentic workspace decisions. - complete
19+
3. Validate for stale references and whitespace issues. - complete
20+
21+
## Findings
22+
23+
- `CLAUDE.md` and current `AGENTS.md` still describe Open CoDesign mainly as a prompt-to-artifact app rather than a local design agent.
24+
- They still point design history at SQLite, while v0.2 moves sessions to pi JSONL and files to real workspaces.
25+
- They say pi-ai gaps should become `packages/providers` extensions, but the pi spike says provider/session/capability/bash should be handed to pi-coding-agent.
26+
- They hard-code some stack versions; `AGENTS.md` should tell agents to read manifests for exact versions.
27+
- Latest plan: design equals pi session, every design has a workspace, no sealed/open mode, no project abstraction in v0.2.
28+
- Validation found no stale old phrases for `better-sqlite3`, old provider-extension guidance, hardcoded React/Vite versions, or old storage wording.
29+
- `git diff --no-index --check /dev/null AGENTS.md` produced no whitespace warnings.
30+
31+
## Errors
32+
33+
- First stale-phrase search used a shell command with unescaped backticks in the pattern. That triggered command substitution. Re-ran with `rg -e` patterns and no backticks.

.Codex/workspace/core_fail_fast_audit.md

Lines changed: 141 additions & 0 deletions
Large diffs are not rendered by default.

.Codex/workspace/full_review_root_fix_plan.md

Lines changed: 487 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Issue Triage Findings
2+
3+
## Project Context Read
4+
- `docs/VISION.md`: open-codesign is a local-first Electron app for prompt-to-design artifacts, with all model support routed through `pi-ai`.
5+
- `docs/PRINCIPLES.md`: keep features lean, lazy-load heavy capabilities, avoid silent fallbacks, and ensure public/persistent contracts are versioned.
6+
- Current branch is `dev/v0.2`, ahead of `origin/dev/v0.2` by 4 commits.
7+
- `AGENTS.md` is untracked in the working tree.
8+
9+
## Issue Context
10+
- Recent provider-related issues cluster around provider capability profiles (#206), wire/role/reasoning policy (#207), diagnostics parity (#216), and model discovery modes (#210).
11+
- Gemini-specific bug #175 was closed by merged PR #186, which strips `models/` from Gemini OpenAI-compatible model IDs at the provider wire boundary.
12+
- #175 has a recent follow-up comment: a user confirms the issue still persists in the latest version for Google Gemini models.
13+
- PR #186 review comments identified a separate flaw: Gemini endpoint detection was initially too broad, and even after a follow-up was still host-only rather than requiring an OpenAI-compatible `/openai` path.
14+
- Issue #229 is separate but related provider compatibility work: self-signed TLS and `developer` role rejection by Bedrock-like OpenAI-compatible backends.
15+
- Local code contains the #186 fix in `packages/providers/src/index.ts`, but the live v0.2 generation path uses `packages/core/src/agent.ts::buildPiModel`.
16+
- `buildPiModel` currently sets `id: model.modelId` directly and `reasoning: true` for every provider/wire. This bypasses Gemini `models/` stripping and can also force developer/reasoning behavior on OpenAI-compatible custom providers.
17+
- This explains why #175 can remain visible after being closed: title/legacy provider calls were patched, but the agent runtime path still sends the old model ID shape.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Issue Triage Plan
2+
3+
## Goal
4+
Review recent GitHub issue activity for open-codesign, identify still-active problems in recently closed issues, and fix the Gemini-related issue if it is reproducible from the codebase.
5+
6+
## Phases
7+
- [complete] Gather issue context from GitHub, focusing on recent comments and Gemini-related threads.
8+
- [complete] Map the issue symptoms to local code paths and reproduce or explain the bug.
9+
- [complete] Implement the smallest aligned fix with tests if code changes are needed.
10+
- [complete] Run targeted verification and summarize remaining risks.
11+
12+
## Project Constraints
13+
- Model calls must go through `@mariozechner/pi-ai`; no direct provider SDK imports in app code.
14+
- Use `pnpm`, Vitest, Biome, and strict TypeScript.
15+
- Keep changes lean, local-first, and scoped.
16+
17+
## Errors Encountered
18+
| Error | Attempt | Resolution |
19+
|---|---|---|
20+
| Vitest startup failed because `@rolldown/binding-darwin-arm64` is missing from `node_modules`. | Ran targeted provider/core tests. | Reinstall dependencies with `pnpm i`, then rerun targeted tests. |
21+
| Initial targeted Vitest command matched no files because package-relative paths were required. | Used workspace-root paths with `pnpm --filter`. | Reran with `pnpm --dir packages/... exec vitest run src/...`; tests executed and passed. |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Issue Triage Progress
2+
3+
## Session Log
4+
- Started issue triage for recent GitHub activity, with emphasis on Gemini-related problems that may remain after a closed issue.
5+
- Read project vision and engineering principles before making changes.
6+
- Queried recent GitHub issue activity and Gemini-specific threads.
7+
- Confirmed #175 has a recent "still persists" comment after its closing fix PR #186.
8+
- Traced local model construction and found the likely bypass in the live agent runtime.
9+
- Patched Gemini URL detection and agent-runtime model construction; added provider/core regression tests.
10+
11+
## Verification
12+
- `pnpm --dir packages/providers exec vitest run src/gemini-compat.test.ts src/index.test.ts` — 2 files, 36 tests passed.
13+
- `pnpm --dir packages/core exec vitest run src/agent.test.ts` — 1 file, 25 tests passed.
14+
- `pnpm typecheck` — passed across workspace.
15+
- `pnpm lint` — passed after fixing provider export ordering.
16+
- `git diff --check` on touched source/test files — passed.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PR Review Bot Update Plan
2+
3+
## Goal
4+
5+
Update the Codex PR review bot so public PR reviews do not cite private/internal docs as evidence and do not rely on stale model knowledge for version-sensitive claims.
6+
7+
## Constraints Read
8+
9+
- `docs/VISION.md`
10+
- `docs/PRINCIPLES.md`
11+
- `docs/COLLABORATION.md`
12+
- `CLAUDE.md`
13+
- `AGENTS.md`
14+
15+
## Plan
16+
17+
1. Complete context scan of the bot workflow and prompt. - complete
18+
2. Edit `.github/prompts/codex-pr-review.md` with public-evidence and fresh-version rules. - complete
19+
3. Check the edited prompt for consistency with the workflow. - complete
20+
4. Run lightweight validation on changed files. - complete
21+
22+
## Findings
23+
24+
- Bot is configured by `.github/workflows/codex-pr-review.yml`.
25+
- Main behavior lives in `.github/prompts/codex-pr-review.md`.
26+
- `docs/` is explicitly gitignored/internal; public contributors cannot see those files.
27+
- Current prompt names internal docs as "Key docs" and asks the bot to load/cite them, which can make public reviews point at files contributors cannot access.
28+
- Current prompt states version facts like "Electron 33+" directly, which can go stale as dependencies move.
29+
- Updated prompt now distinguishes public context from internal-only context.
30+
- Updated prompt requires repository/package metadata first, and public authoritative sources when needed, before version-sensitive findings.
31+
- `git diff --check` passed.
32+
33+
## Errors
34+
35+
None so far.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Preview Blank Fix Plan
2+
3+
## Hypothesis
4+
5+
Root cause: workspace file preview can render a JSX-backed `index.html` through the runtime, but `FilesTabView` does not subscribe to sandbox `IFRAME_ERROR` messages, so runtime failures appear as a blank canvas and the model/user workaround becomes adding React/Babel CDN scripts directly to `index.html`.
6+
7+
## Tasks
8+
9+
- [ ] Add regression coverage for HTML + `text/babel` preview and file-tab iframe error handling.
10+
- [ ] Wire `FilesTabView` iframe messages through the same trusted `IFRAME_ERROR` path as `PreviewPane`.
11+
- [ ] Tighten prompt/output guidance so generated `index.html` stays host-runtime source, not standalone CDN HTML.
12+
- [ ] Run focused tests.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Session History Restore Plan
2+
3+
## Root Cause
4+
5+
`window.codesign.chat.*` in `apps/desktop/src/preload/index.ts` is a v0.2 TODO stub. It returns empty lists and resolves appends in memory, so renderer chat rows are never persisted or reloaded.
6+
7+
## Plan
8+
9+
1. [x] Restore persisted chat IPC channels in main using the existing chat message helpers.
10+
2. [x] Point preload chat methods at those IPC channels.
11+
3. [x] Add IPC regression coverage for append/list, snapshot seeding, and tool status updates.
12+
4. [x] Run the focused desktop main-process tests.

0 commit comments

Comments
 (0)