Skip to content

feat: keep component names when the analysis runs in full - #173

Open
Svilen-Stefanov wants to merge 3 commits into
feat/reuse-static-cachefrom
feat/full-rerun-name-carry-over
Open

Svilen-Stefanov wants to merge 3 commits into
feat/reuse-static-cachefrom
feat/full-rerun-name-carry-over

Conversation

@Svilen-Stefanov

@Svilen-Stefanov Svilen-Stefanov commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Stacked on #172 (static-analysis reuse). Pairs with CodeBoarding/CodeBoarding#692, which has Core continue a previous analysis's component ids and names on a full run whenever analysis.json is in the output directory. The Action threw that file away in two places:

  • analyze_repository.py deleted it before every full run.
  • After a release, the configuration hash changes. Every seed lookup (artifact, baseline branch, committed .codeboarding, ancestor artifact) then missed, and the run started with no names to carry over.

How

  • Full run keeps analysis.json. Keep static_analysis.pkl across runs; add fresh_analysis input #172 already keeps the static-analysis cache, so analyze_repository.py now keeps analysis.json, static_analysis.pkl and static_analysis.sha (KEPT_BY_FULL_RUN). --fresh still keeps nothing.
  • One lookup under any configuration. Keep static_analysis.pkl across runs; add fresh_analysis input #172's reuse_static_analysis becomes reuse_other_configuration. When nothing matches the current configuration, it takes the nearest base saved under any configuration and lends the new state two things from it:
  • The baseline branch is a source too, ahead of artifacts. restore_codeboarding_baseline is split out of from_codeboarding_baseline and accepts CFG_HASH='*'. The raw entry stays inspectable, so the ignore check compares the saved rules, not the checkout's.
  • find-ancestor-base.sh: STATIC_ONLY is renamed ANY_CONFIG. A found base always needs analysis.json; the static pair is checked when it is copied.
  • README and the fresh_analysis description mention the names.

With an engine older than #692 the kept analysis.json is harmless: Core overwrites it as before.

Tests

  • Release tests for review and sync over a baseline-branch entry made under another configuration: Core gets analysis.json plus the static pair, runs in full, and seeds the old components.
  • Keep static_analysis.pkl across runs; add fresh_analysis input #172's other-configuration and full-run tests now expect analysis.json alongside the static cache. A bundle without the static pair still lends its names.
  • test_analyze_repository.py: the engine sees exactly analysis.json and the static pair on a full run, and nothing on a fresh one.
  • Locally: 360 tests OK, 7 skipped; shellcheck clean.

Not covered

  • A failure to read the baseline branch during the any-configuration lookup fails the job (baseline_fail), as the existing lookups do.
  • The full-run check that analysis.json was produced can pass on the kept old file if Core exits 0 without writing it.
  • If Keep static_analysis.pkl across runs; add fresh_analysis input #172 is squash-merged, this PR needs gh pr edit --base main and a rebase onto main.

🤖 Generated with Claude Code

@codeboarding-review

codeboarding-review Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

CodeBoarding review

Status: 1 changed component

See the full change in CodeBoarding.

graph LR
    n_Action_Analysis_and_Authentication_Tools["Action Analysis and Authentication Tools"]
    n_Remote_Review_and_Briefing_Sync["Remote Review and Briefing Sync"]
    classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
    classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
    classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
    class n_Action_Analysis_and_Authentication_Tools modified;
Loading

download artifacts · run 43628977406

@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: c1b9651361

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/analyze_repository.py Outdated
Comment on lines +156 to +157
if entry.name == "analysis.json":
continue

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 Verify the full run replaces the preserved analysis

When a full engine invocation exits successfully without writing analysis.json—the condition the subsequent guard is intended to detect—this continue leaves the seed file in place, so is_file() succeeds and the action reports and may publish the stale ancestor or old-configuration analysis as the new result. Preserve the file for Core, but remove/rename it afterward or otherwise verify that the full run replaced it before accepting the result.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T18:55:39.149722Z 26c93f0 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Svilen-Stefanov
Svilen-Stefanov force-pushed the feat/full-rerun-name-carry-over branch from c1b9651 to a86b13a Compare November 11, 2026 19:25
A full run deleted analysis.json before Core started, and after a release
nothing saved matched the new configuration, so every full run named the
components from scratch, losing names someone had fixed.

A full run now keeps the previous analysis.json beside the static-analysis
cache, and Core carries ids and names over to the components it continues.
With no seed under the current configuration, the nearest base saved under
any configuration, on the baseline branch or as an artifact, lends both its
analysis.json and its static analysis in one lookup (reuse_other_configuration,
replacing reuse_static_analysis). SEED_NAMES_ONLY then sends analyze.sh
straight to a full run. fresh_analysis still keeps nothing.

restore_codeboarding_baseline splits the branch read out of
from_codeboarding_baseline, so the raw entry's .codeboardingignore can be
compared before its static analysis is reused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Svilen-Stefanov
Svilen-Stefanov force-pushed the feat/full-rerun-name-carry-over branch from a86b13a to 7512022 Compare November 11, 2026 19:27
@Svilen-Stefanov
Svilen-Stefanov changed the base branch from main to feat/reuse-static-cache November 11, 2026 19:28

Copy link
Copy Markdown
Member

/codeboarding

@codeboarding-review

codeboarding-review Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

CodeBoarding review

Status: 1 changed component

See the full change in CodeBoarding.

graph LR
    n_Action_Analysis_and_Authentication_Tools["Action Analysis and Authentication Tools"]
    n_Remote_Review_and_Briefing_Sync["Remote Review and Briefing Sync"]
    classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
    classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
    classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
    class n_Action_Analysis_and_Authentication_Tools modified;
Loading

download artifacts · run 43241492903

@ivanmilevtues
ivanmilevtues self-requested a review November 13, 2026 01:10

@ivanmilevtues ivanmilevtues left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this change is quite minimal seems good.

Svilen-Stefanov and others added 2 commits November 14, 2026 19:49
…nt ones

Core reads the previous analysis from where it writes the new one, so the file
being there after a full run proved nothing: a run that wrote nothing would
publish the lent analysis, possibly another configuration's, as its own. The
check now compares the file before and after; every analysis Core writes
carries its own generated_at.

The any-configuration lookup on the baseline branch is best effort, but a
failed read there ran baseline_fail and failed the run. With CFG_HASH='*' a
read failure now warns and the lookup falls through, as the artifact lookup
does; a lookup for this configuration still fails loudly.

Carries #172's ignore-rule and fetch-directory fixes unchanged, so the rebase
onto it drops them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #172's review fix; #173 already carries the same ignore check in
reuse_other_configuration, so its side of seed-sources.sh stands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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: 26c93f0cf8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

ENGINE_STUB = '''#!/usr/bin/env python3
"""Minimal CodeBoarding CLI stand-in recording which tree it was given."""
import json, os, subprocess, sys
import datetime, json, os, subprocess, sys

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Revert the edit to the protected merge-base test

This commit modifies tests/test_merge_base_contract.py, which is explicitly marked as protected, without explicit human consent in this conversation. Revert all changes to this file and address the production behavior without altering the protected test, or stop and request a human decision if the test is believed to be wrong.

AGENTS.md reference: AGENTS.md:L38-L41

Useful? React with 👍 / 👎.

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