Skip to content

sync(upstream): primera sincronizacion segura con OpenCode (Issue #41) - #42

Merged
jaminsmoke merged 4 commits into
devfrom
sync-upstream-20260810
Aug 10, 2026
Merged

sync(upstream): primera sincronizacion segura con OpenCode (Issue #41)#42
jaminsmoke merged 4 commits into
devfrom
sync-upstream-20260810

Conversation

@jaminsmoke

@jaminsmoke jaminsmoke commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Sincronizacion upstream #41

Primera sync con el nuevo flujo: informe + cherry-picks seleccionados en rama separada.

Cherry-picks (3 candidatos)

Excluido por politica: fe82a1b chore:generate (regenera artefactos rebrandeado).

Tooling (pasos 1-3 del plan)

  • scripts/upstream-report.py + tests (10 unittest)
  • .github/workflows/upstream-report.yml (cron semanal, solo informe)
  • docs/UPSTREAM_SYNC.md (checklist 4 categorias)

Checklist 4 categorias: PASS

  1. Workflows: solo ci-quality, release-desktop, upstream-report (+ carpeta inerte). Ningun heredado reactivado.
  2. Contratos generados: sin cambios en sdk/openapi.json, v2/gen, protocol/groups.
  3. Strings visibles: 0 OpenCode nuevo.
  4. Dependencias: sin cambios en package.json/bun.lock.

Gates

  • Typecheck opencode/app/stats: PASS
  • Tests: config 96/96, directory-picker 23/23, stats 7/7: PASS

Summary by Sourcery

Introduce an upstream sync reporting workflow and incorporate selected upstream fixes for directory search, config parsing, and stats sync reliability.

New Features:

  • Add a reproducible upstream sync reporting script that classifies candidate commits according to project policy.
  • Introduce a scheduled GitHub Actions workflow to generate and publish a weekly upstream sync report as an issue or comment.
  • Document the safe upstream synchronization process with a checklist-based guide in UPSTREAM_SYNC.md.

Bug Fixes:

  • Improve the directory picker search to handle empty and unsupported search cases by falling back to default directory listings and matching.
  • Update the opencode config parser to ignore unknown top-level keys while still rejecting invalid values.
  • Ensure stats full sync failures fall back to incremental sync instead of skipping the daily run.

Enhancements:

  • Increase Athena query polling limits to better tolerate slow query completion in stats.
  • Refine config tests to reflect the new behavior of ignoring unknown top-level keys while preserving permission key order.
  • Extend directory picker tests to cover empty search handling and typed search fallbacks.

CI:

  • Add a dedicated upstream-report GitHub Actions workflow that runs on a weekly schedule or manual dispatch to publish upstream sync reports.

Documentation:

  • Add UPSTREAM_SYNC.md describing the upstream sync strategy, policies, and mandatory review checklist.
  • Document the non-merging nature and exclusion rules of the upstream reporting workflow and script.

Tests:

  • Add unit tests for the upstream-report script, covering commit parsing, classification, and report generation.
  • Expand directory picker tests for new search behaviors and config tests for updated schema validation rules.

Brendonovich and others added 4 commits August 10, 2026 02:43
…evision (Issue #41)

- scripts/upstream-report.py: ahead/behind + commits candidatos con deteccion de excluibles (generate, workflows, deps) - con tests unittest (10)

- .github/workflows/upstream-report.yml: cron semanal que publica el informe como issue/comentario sin auto-merge

- docs/UPSTREAM_SYNC.md: checklist de 4 categorias + procedimiento (nunca sync directo sobre dev)
@sourcery-ai

sourcery-ai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implements the first safe upstream sync with OpenCode via three cherry-picked fixes (directory picker, config parsing, stats sync robustness), adds tooling for automated upstream reports (Python script, tests, GitHub Actions workflow, and documentation), and adjusts a few stats and Athena polling parameters, while keeping workflows, generated contracts, visible strings, and dependencies within defined policy.

Sequence diagram for the weekly upstream-report GitHub workflow

sequenceDiagram
  participant GitHubActions as GitHubActions
  participant Repo as JarvisRepo
  participant Upstream as UpstreamRepo
  participant Script as upstream-report.py
  participant gh as gh_cli
  participant Issues as GitHubIssues

  GitHubActions->>Repo: actions/checkout (fetch-depth 0)
  GitHubActions->>Repo: git remote add upstream https://github.com/sst/opencode.git
  GitHubActions->>Script: python scripts/upstream-report.py
  Script->>Upstream: git fetch upstream dev
  Script->>Repo: git rev-list --left-right --count upstream/dev...HEAD
  Script->>Upstream: git log --oneline upstream/dev ^HEAD
  Script->>Upstream: git diff-tree --name-only -r <sha>
  Script-->>GitHubActions: markdown report to stdout
  GitHubActions->>gh: gh issue list (search existing "Informe upstream (semanal)")
  alt existing_issue
    GitHubActions->>gh: gh issue comment --body-file /tmp/upstream-report.md
    gh->>Issues: add comment to existing report issue
  else no_existing_issue
    GitHubActions->>gh: gh issue create --title "Informe upstream (semanal)" --body-file /tmp/upstream-report.md --label upstream
    gh->>Issues: create new upstream report issue
  end
Loading

File-Level Changes

Change Details Files
Enhance directory picker search behavior to handle servers with or without empty and typed search support, with new tests.
  • Add SDK file.list stub to existing test mock for directory autocomplete.
  • Introduce tests for keeping indexed directory results when empty search is supported, listing default directory when empty search is unsupported, and matching default listing when typed search is unsupported.
  • Update createDirectorySearch to fall back to fuzzy match or directory listing when search results are empty, preserving active request checks.
packages/app/src/components/directory-picker-domain.test.ts
packages/app/src/components/directory-picker-domain.ts
Relax opencode config parsing to ignore unknown top-level keys while still validating values, and update tests accordingly.
  • Change schema decoder to use onExcessProperty: "ignore" instead of manually rejecting unrecognized keys.
  • Remove custom topLevelExtraKeys helper and rely on EffectSchema excess-property handling.
  • Update tests to expect failures only on invalid values and to verify that unknown top-level keys are ignored and not present on the parsed config object.
packages/opencode/src/config/parse.ts
packages/opencode/test/config/config.test.ts
Improve stats synchronization robustness by falling back from failed full syncs to incremental syncs and increase Athena polling tolerance.
  • Wrap daily full stats sync in an effect that logs a warning and falls back to incremental sync if the full sync fails, while managing lastFullDay state correctly.
  • Broaden outer error handling to log stats sync failures with pretty-printed causes as before.
  • Increase ATHENA_MAX_POLL_ATTEMPTS from 300 to 900 to tolerate longer-running Athena queries.
packages/stats/server/src/stat-sync.ts
packages/stats/core/src/athena.ts
Introduce upstream sync reporting tooling: a Python script to generate markdown reports, unit tests, documentation, and a scheduled GitHub Actions workflow.
  • Add scripts/upstream-report.py to compute ahead/behind between dev and upstream/dev, classify upstream commits (including exclusions based on subjects and files), and emit a markdown report suitable for issues/comments.
  • Add unit tests for parsing rev-list counts, parsing commits, classifying commits, and building reports to validate the script behavior.
  • Document the upstream sync process, decisions, manual review checklist, and automatic exclusions in docs/UPSTREAM_SYNC.md.
  • Create .github/workflows/upstream-report.yml to run the report weekly and on demand, posting results to a dedicated GitHub issue via gh CLI, without performing any merges.
scripts/upstream-report.py
.github/workflows/upstream-report.yml
docs/UPSTREAM_SYNC.md
scripts/tests/test_upstream_report.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@jaminsmoke
jaminsmoke merged commit 9bf9a90 into dev Aug 10, 2026
6 checks passed
@jaminsmoke
jaminsmoke deleted the sync-upstream-20260810 branch August 10, 2026 00:45

@amazon-q-developer amazon-q-developer 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.

The PR addresses Issue #41 by implementing upstream synchronization infrastructure and includes several bug fixes. All changes have been reviewed and no blocking issues were found. The implementation correctly handles the documented sync workflow, error handling, and configuration updates.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • In scripts/upstream-report.py, the GENERATED_ARTIFACTS constant is declared but never used; either wire it into classify_commit or remove it to avoid dead configuration that can drift from actual policy.
  • The upstream-report workflow unconditionally runs git remote add upstream ..., which will fail on subsequent runs if the remote already exists; consider guarding this with a check or appending || true to make the step idempotent.
  • The change to ConfigParse.schema uses onExcessProperty: "ignore" for all schemas, which will silently drop unknown nested properties as well as top-level ones; if the intent is only to relax top-level keys, you may want to scope the ignore behavior to those cases to avoid hiding misconfigurations deeper in the structure.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `scripts/upstream-report.py`, the `GENERATED_ARTIFACTS` constant is declared but never used; either wire it into `classify_commit` or remove it to avoid dead configuration that can drift from actual policy.
- The `upstream-report` workflow unconditionally runs `git remote add upstream ...`, which will fail on subsequent runs if the remote already exists; consider guarding this with a check or appending `|| true` to make the step idempotent.
- The change to `ConfigParse.schema` uses `onExcessProperty: "ignore"` for all schemas, which will silently drop unknown nested properties as well as top-level ones; if the intent is only to relax top-level keys, you may want to scope the ignore behavior to those cases to avoid hiding misconfigurations deeper in the structure.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Sync upstream #41: cherry-pick fixes + upstream report tooling

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Cherry-picks 3 upstream fixes: directory picker fallback search, ignore unknown opencode config
 keys, stats full-sync fallback to incremental.
• Adds scripts/upstream-report.py with 10 unittest cases to classify and report ahead/behind
 upstream commits, excluding generated/workflow/dependency commits by policy.
• Adds a weekly upstream-report.yml GitHub Actions workflow that publishes the report as an
 issue/comment (report-only, no auto-merge).
• Adds docs/UPSTREAM_SYNC.md describing the sync procedure and a mandatory 4-category review
 checklist.
• Increases Athena polling attempts (300→900) to tolerate slower stats queries.
Diagram

graph TD
  A["Upstream sst/opencode"] --> B["scripts/upstream-report.py"] --> C["GitHub Issue/Comment"]
  D["upstream-report.yml cron"] --> B
  E["Cherry-picked fixes"] --> F["Directory Picker Search"]
  E --> G["Config Parser"]
  E --> H["Stats Sync Daemon"]
  H --> I[("Athena Query")]
  subgraph Legend
    direction LR
    _svc(["Service/Script"]) ~~~ _db[("Database/Query")] ~~~ _ext["External System"]
  end
Loading
High-Level Assessment

The report-only script + manual cherry-pick workflow with a mandatory checklist is an appropriate low-risk approach for a rebranded fork that must avoid reintroducing upstream branding, workflows, or unreviewed dependency bumps. An automated merge/rebase bot was implicitly considered and rejected given the explicit 'never merge automatically' policy documented in UPSTREAM_SYNC.md, which is the right tradeoff for this project's branding and workflow isolation constraints.

Files changed (10) +480 / -38

Enhancement (1) +1 / -1
athena.tsIncrease Athena max poll attempts from 300 to 900 +1/-1

Increase Athena max poll attempts from 300 to 900

• Raises ATHENA_MAX_POLL_ATTEMPTS to tolerate slower Athena query completion before timing out.

packages/stats/core/src/athena.ts

Bug fix (3) +26 / -27
directory-picker-domain.tsFall back to directory listing when find search returns no results +8/-1

Fall back to directory listing when find search returns no results

• createDirectorySearch now falls back to matching or listing the base directory when the server's find API returns empty results, fixing project picker population from home for servers with limited search support.

packages/app/src/components/directory-picker-domain.ts

parse.tsIgnore unknown top-level config keys instead of rejecting them +5/-23

Ignore unknown top-level config keys instead of rejecting them

• Removes the custom topLevelExtraKeys check that threw on unrecognized top-level config keys, replacing it with Effect Schema's built-in onExcessProperty: 'ignore' option so unknown fields are silently dropped while invalid values are still rejected.

packages/opencode/src/config/parse.ts

stat-sync.tsFall back to incremental sync when full stats sync fails +13/-3

Fall back to incremental sync when full stats sync fails

• The daily full sync pass now catches failures and falls back to an incremental sync instead of skipping the run entirely, logging a warning on fallback.

packages/stats/server/src/stat-sync.ts

Tests (3) +152 / -10
directory-picker-domain.test.tsAdd tests for directory picker fallback search behaviors +65/-0

Add tests for directory picker fallback search behaviors

• Adds tests covering servers that support/don't support empty search and typed search, verifying fallback to default directory listing/matching when the find API returns no results.

packages/app/src/components/directory-picker-domain.test.ts

config.test.tsUpdate config tests for ignoring unknown top-level keys +5/-10

Update config tests for ignoring unknown top-level keys

• Renames and adjusts tests to reflect that unknown top-level config keys (e.g. plugins) are now ignored rather than rejected, while invalid field values still fail validation; permission key order preservation is still verified.

packages/opencode/test/config/config.test.ts

test_upstream_report.pyAdd unit tests for upstream-report script +82/-0

Add unit tests for upstream-report script

• New unittest suite (10 tests) covering rev-list count parsing, commit log parsing, commit classification rules, and report rendering for the upstream-report script.

scripts/tests/test_upstream_report.py

Documentation (1) +76 / -0
UPSTREAM_SYNC.mdDocument safe upstream sync procedure and review checklist +76/-0

Document safe upstream sync procedure and review checklist

• New documentation describing the fork's upstream sync strategy: reporting cadence, cherry-pick-only integration policy, mandatory 4-category manual review checklist (workflows, generated contracts, visible branding strings, dependencies), and troubleshooting tips.

docs/UPSTREAM_SYNC.md

Other (2) +225 / -0
upstream-report.ymlAdd weekly upstream-report GitHub Actions workflow +51/-0

Add weekly upstream-report GitHub Actions workflow

• New workflow that runs weekly (or via manual dispatch), generates the upstream report via the Python script, and publishes it as a new GitHub issue or comments on the existing one. It never merges or modifies code.

.github/workflows/upstream-report.yml

upstream-report.pyAdd upstream sync report generator script +174/-0

Add upstream sync report generator script

• New Python script that computes ahead/behind commit counts against upstream/dev, classifies each pending upstream commit as excludable (generate commits, workflow file changes, dependency bumps) or a candidate, and renders a markdown report for publishing.

scripts/upstream-report.py

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Workflow uses sst/opencode URL 📘 Rule violation § Compliance
Description
The new GitHub Actions workflow references https://github.com/sst/opencode.git, which is
explicitly disallowed in CI workflow files. This can reintroduce deprecated upstream repo references
in CI configuration.
Code

.github/workflows/upstream-report.yml[R30-32]

+      - name: Añadir remote upstream
+        run: git remote add upstream https://github.com/sst/opencode.git
+
Evidence
PR Compliance ID 2623786 forbids any sst/opencode references in CI workflows. The workflow step
git remote add upstream https://github.com/sst/opencode.git contains the banned substring.

Rule 2623786: Disallow deprecated opencode repo references in CI workflows
.github/workflows/upstream-report.yml[30-32]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The workflow file contains a deprecated opencode repo reference (`sst/opencode`), which is disallowed by the compliance checklist.

## Issue Context
This reference appears in the `git remote add upstream ...` step. Per the rule, CI workflow files must not include `sst/opencode` (or `anomalyco/opencode`) anywhere in their content.

## Fix Focus Areas
- .github/workflows/upstream-report.yml[30-32]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. ISSUE null en workflow 🐞 Bug ☼ Reliability
Description
El workflow puede asignar a ISSUE el literal null cuando no hay ningún issue abierto que matchee
el search, y entonces intenta gh issue comment "null", fallando en vez de crear el issue del
informe. Esto rompe el flujo create-or-comment en la primera ejecución o si el issue se
cierra/renombra.
Code

.github/workflows/upstream-report.yml[R43-45]

+          ISSUE=$(gh issue list --search "in:title \"Informe upstream (semanal)\"" --state open \
+            --json number --jq '.[0].number' 2>/dev/null || true)
+          if [ -z "$ISSUE" ]; then
Evidence
El workflow lee el número del primer issue con jq y solo comprueba si la variable está vacía; si jq
devuelve null, entra por la rama de comentar y falla. Las líneas citadas muestran exactamente esa
asignación y el branching posterior.

.github/workflows/upstream-report.yml[42-50]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The workflow assigns `ISSUE` using `--jq '.[0].number'`. When the list is empty, jq can output `null`, which is non-empty, so the script goes to the comment path and runs `gh issue comment "null"`, failing instead of creating the report issue.

### Issue Context
This breaks the scheduled/manual report publishing flow whenever there is no open issue matching the title search.

### Fix Focus Areas
- .github/workflows/upstream-report.yml[42-50]

### Implementation notes
- Change jq to emit an empty string when missing, e.g.:
 - `--jq '.[0].number // empty'`
- Or explicitly treat `null` as empty:
 - `if [ -z "$ISSUE" ] || [ "$ISSUE" = "null" ]; then ...`
- (Optional) tighten the search (e.g., also filter by label) to reduce the chance of matching the wrong issue.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Typos de config silenciados 🐞 Bug ☼ Reliability
Description
ConfigParse.schema ahora decodifica con onExcessProperty: "ignore", lo que descarta
silenciosamente campos desconocidos en toda la estructura (incluyendo objetos anidados), pudiendo
ocultar typos como server.portt y haciendo que la config no se aplique sin error. Esto reduce la
detectabilidad de configuraciones mal escritas y puede causar comportamiento inesperado por
defaults.
Code

packages/opencode/src/config/parse.ts[R40-44]

+  const decoded = EffectSchema.decodeUnknownExit(schema)(data, {
+    errors: "all",
+    onExcessProperty: "ignore",
+    propertyOrder: "original",
+  })
Evidence
La PR introduce explícitamente onExcessProperty: "ignore" en el decode del config. Además, hay
sub-esquemas anidados como ConfigServerV1.Server definidos como Schema.Struct (sin rest), por lo
que cualquier key extra dentro de server pasa a descartarse silenciosamente bajo este modo.

packages/opencode/src/config/parse.ts[35-45]
packages/opencode/src/config/config.ts[218-228]
packages/core/src/v1/config/server.ts[6-18]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Config parsing now uses `onExcessProperty: "ignore"`, which can ignore unknown properties recursively, not just at the root. This can silently drop typos in nested config sections.

### Issue Context
The PR intent (per tests/docs) mentions ignoring unknown **top-level** keys for forward compatibility, but the current implementation can also ignore nested unknown keys in strict sub-schemas.

### Fix Focus Areas
- packages/opencode/src/config/parse.ts[35-60]

### Implementation notes
Pick one policy and enforce it explicitly:
- **If only top-level should be tolerant**: strip/ignore unknown keys at the root only, then decode with strict excess-property behavior for nested objects.
 - Example approach: detect root extra keys, remove them from `data` before decoding, and do not set `onExcessProperty: "ignore"`.
- **If all levels should be tolerant** (intended): add/adjust tests to cover a nested typo (e.g., `server: { portt: 3000 }`) and document the behavior clearly, since it’s a significant validation change.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 37 rules

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +30 to +32
- name: Añadir remote upstream
run: git remote add upstream https://github.com/sst/opencode.git

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Workflow uses sst/opencode url 📘 Rule violation § Compliance

The new GitHub Actions workflow references https://github.com/sst/opencode.git, which is
explicitly disallowed in CI workflow files. This can reintroduce deprecated upstream repo references
in CI configuration.
Agent Prompt
## Issue description
The workflow file contains a deprecated opencode repo reference (`sst/opencode`), which is disallowed by the compliance checklist.

## Issue Context
This reference appears in the `git remote add upstream ...` step. Per the rule, CI workflow files must not include `sst/opencode` (or `anomalyco/opencode`) anywhere in their content.

## Fix Focus Areas
- .github/workflows/upstream-report.yml[30-32]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +43 to +45
ISSUE=$(gh issue list --search "in:title \"Informe upstream (semanal)\"" --state open \
--json number --jq '.[0].number' 2>/dev/null || true)
if [ -z "$ISSUE" ]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Issue null en workflow 🐞 Bug ☼ Reliability

El workflow puede asignar a ISSUE el literal null cuando no hay ningún issue abierto que matchee
el search, y entonces intenta gh issue comment "null", fallando en vez de crear el issue del
informe. Esto rompe el flujo create-or-comment en la primera ejecución o si el issue se
cierra/renombra.
Agent Prompt
### Issue description
The workflow assigns `ISSUE` using `--jq '.[0].number'`. When the list is empty, jq can output `null`, which is non-empty, so the script goes to the comment path and runs `gh issue comment "null"`, failing instead of creating the report issue.

### Issue Context
This breaks the scheduled/manual report publishing flow whenever there is no open issue matching the title search.

### Fix Focus Areas
- .github/workflows/upstream-report.yml[42-50]

### Implementation notes
- Change jq to emit an empty string when missing, e.g.:
  - `--jq '.[0].number // empty'`
- Or explicitly treat `null` as empty:
  - `if [ -z "$ISSUE" ] || [ "$ISSUE" = "null" ]; then ...`
- (Optional) tighten the search (e.g., also filter by label) to reduce the chance of matching the wrong issue.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +40 to +44
const decoded = EffectSchema.decodeUnknownExit(schema)(data, {
errors: "all",
onExcessProperty: "ignore",
propertyOrder: "original",
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

3. Typos de config silenciados 🐞 Bug ☼ Reliability

ConfigParse.schema ahora decodifica con onExcessProperty: "ignore", lo que descarta
silenciosamente campos desconocidos en toda la estructura (incluyendo objetos anidados), pudiendo
ocultar typos como server.portt y haciendo que la config no se aplique sin error. Esto reduce la
detectabilidad de configuraciones mal escritas y puede causar comportamiento inesperado por
defaults.
Agent Prompt
### Issue description
Config parsing now uses `onExcessProperty: "ignore"`, which can ignore unknown properties recursively, not just at the root. This can silently drop typos in nested config sections.

### Issue Context
The PR intent (per tests/docs) mentions ignoring unknown **top-level** keys for forward compatibility, but the current implementation can also ignore nested unknown keys in strict sub-schemas.

### Fix Focus Areas
- packages/opencode/src/config/parse.ts[35-60]

### Implementation notes
Pick one policy and enforce it explicitly:
- **If only top-level should be tolerant**: strip/ignore unknown keys at the root only, then decode with strict excess-property behavior for nested objects.
  - Example approach: detect root extra keys, remove them from `data` before decoding, and do not set `onExcessProperty: "ignore"`.
- **If all levels should be tolerant** (intended): add/adjust tests to cover a nested typo (e.g., `server: { portt: 3000 }`) and document the behavior clearly, since it’s a significant validation change.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

jaminsmoke added a commit that referenced this pull request Aug 11, 2026
El informe enumeraba commits pendientes por SHA, incluyendo 3 ya
cherry-picked en PR #42 (mismo patch, SHA diferente): behind inflado
12→9, candidatos falsos en issue #52.

Fix: reemplaza git log/rev-list por --cherry-pick --left-only que usa
patch-id para excluir commits incorporados. Validado con --no-fetch:
behind=9, candidates=7/9 (2 excluidos por política), 0 cherry-picked,
exit=0.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.

2 participants