Skip to content

Add evidence-based Chart Recover plugin - #18

Open
glebedel wants to merge 10 commits into
mainfrom
feature/engineering/chart-recover
Open

glebedel wants to merge 10 commits into
mainfrom
feature/engineering/chart-recover

Conversation

@glebedel

@glebedel glebedel commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Add Chart Recover as an engineering plugin for recovering chart coordinates and values from explicit numerical evidence. It includes a local browser workbench, evidence/CSV/overlay exports, conditional hypotheses and abstentions, optional public-source collection, and synthetic evaluations. Three fabricated examples are bundled; the original public tweet archive and research snapshots are excluded.

Plugins touched

Plugin Old version New version
chart-recover New 0.1.0

Review outcomes

Reviewed all 167 Cubic comments available before this update and the five Copilot findings. Fixed evidence/identity/date/currency conflicts, numeric overflow and unsupported monetary claims, invalid calibration inputs, incomplete geometry, OCR resource limits, stale outputs, batch failure isolation, source provenance, and browser import/export state. Regression coverage also checks aggregate bounds against the reported affine model.

Evaluation protocols now disclose supplied evidence, distinguish abstention from failed recovery, reject reused output directories, check hidden-value leakage and visible-label coverage, archive transitive source modules, and preserve separate control/stress outcomes. The paired step study runs readers and helpers from an isolated frozen package with private truth removed during inference. It is a trusted-code comparison, not an OS sandbox.

The 19 declined policy/duplication suggestions are recorded in the local review ledger: optional public X/TrustMRR/directory adapters remain useful without an employer account; user-invoked CLI exports may target caller-selected directories; fabricated provider-shaped fixtures are not private company data; two API tests exercise different boundaries. No hooks, automatic installs, or telemetry were added. Fixed-path file-output warnings were checked against the browser's isolated request folders and CLI caller boundaries. Frozen-study integrity checks now raise explicit errors even under optimized Python.

Aikido requested patched NumPy/SciPy releases. Python 3.12+ is required, with dependency floors NumPy 2.5.3 and SciPy 1.18.1. The standard TOML key "requires-python" is quoted because the pinned scanner incorrectly parses bare metadata keys as requirements and otherwise reports an unrelated malicious package named requires-python. Wheel metadata verification confirms the Python requirement still applies. No vulnerability rule was allowlisted and the scanner was not disabled.

Verification

  • Chart Recover: all 509 tests pass with Python 3.12.11, NumPy 2.5.3 and SciPy 1.18.1; installed versions match the final hashed lock
  • Marketplace: 261 tests, two skipped; Ruff and mypy pass
  • Generator drift, Codex package/version checks, strict Claude manifest validation
  • Wheel retains Python/dependency constraints, includes all three examples and workbench assets, excludes private truth
  • Both pinned clients install/discover the marketplace in isolated configurations
  • Browser source-URL, MIME, import invalidation and dynamic benchmark-counter checks
  • Real paired frozen-source recovery smoke; truth restored and scorer runs
  • Local SkillSpector scan passes with exact reviewed behavior rules
  • Final dependency audit and latest GitHub checks

Checklist

  • Synthetic examples and documented public network behavior
  • Plugin version set in source manifest and marketplace catalog
  • README inventories all 15 CLI commands and 13 standalone evaluation modules
  • Windows setup and PowerShell evaluation instructions included
  • Review fixes remain on the feature branch; no merge performed

Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:49
calendar=json.loads(calendar_path.read_text(encoding="utf-8")) if current_calendar and calendar_path.exists() else None
if not strict_only and calendar and calendar.get('image_sha256')==workflow['image_sha256']:
proposal=propose_calendar(calendar)
(out/'hypotheses.json').write_text(json.dumps(proposal,indent=2,allow_nan=False), encoding="utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - medium severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

record=dict(reader=name,status='failed',reason=str(error),next_actions=['Inspect this reader failure; other attempts remain independent.'])
attempts.append(record)
summary['status']='has_calibrated_candidates' if summary['calibrated_candidates'] else 'needs_evidence_or_review'
(out/'workflow.json').write_text(json.dumps(summary,indent=2), encoding="utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - medium severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

sample_x=r['sample_x'],sample_window=r['sample_window'],sampling_convention=r['sampling_convention'],
conditional_value=v,lower=lo,upper=hi,status='conditional_calibration',date_assignment='proposed_unverified')
for r,v,lo,hi in zip(samples,daily['values'],daily['lower'],daily['upper'])]
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - medium severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

result=propose_first_customer(geometry,tokens,config.get('post_text',''),config.get('source') or config.get('post_url'),disagreements)
result.update(image=str(image),image_sha256=hashlib.sha256(Path(image).read_bytes()).hexdigest(),
curve_candidates=candidates,ocr=scans,consensus_tokens=tokens,ocr_disagreements=disagreements)
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");overlay(image,geometry,out/'overlay.png')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - medium severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

result=dict(image=str(image),config=config,geometry=geometry,ocr=ocr,evidence_leads=leads,evidence_binding=binding,recovery=results,trace=trace,
status='calibrated' if results and all(r['status']=='calibrated' for r in results) and not geometry.get('quality_issues') else 'needs_evidence_or_review')
if visual:result['visual_evidence']=dict(layout=visual['layout'],binding=visual['binding'])
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");overlay(image,geometry,out/'overlay.png')

@aikido-pr-checks aikido-pr-checks Bot Oct 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - medium severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Suggested change
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");overlay(image,geometry,out/'overlay.png')
if '..' in output:
raise Exception('Invalid file path')
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");overlay(image,geometry,out/'overlay.png')

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

amount='REDACTED' if i in hidden or control=='no_amounts' else f'${v:,.2f}'
docs.append(f'| 2026-09-{i+1:02d} | {amount} |')
docs+=['## Metric Snapshots','- Current MRR: $9,000,000']
(out/'profile.md').write_text('\n'.join(docs)+'\n', encoding="utf-8")

@aikido-pr-checks aikido-pr-checks Bot Oct 7, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Suggested change
(out/'profile.md').write_text('\n'.join(docs)+'\n', encoding="utf-8")
if '..' in folder:
raise Exception('Invalid file path')
(out/'profile.md').write_text('\n'.join(docs)+'\n', encoding="utf-8")

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

final=dict(status=result['status'] if retrieval_evaluated else 'needs_evidence_or_review',rounds=history,
retrieval_evaluated=retrieval_evaluated,
final_result=f"round-{history[-1]['round'] if history[-1].get('status') else history[-2]['round']}/result.json")
(out/'investigation.json').write_text(json.dumps(final,indent=2), encoding="utf-8");return final

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

status='calibrated' if recovery[0]['status']=='calibrated' else 'needs_evidence_or_review',geometry=geometry,recovery=recovery,
correspondence=dict(status='matched' if not reasons else 'needs_review',reasons=reasons),binding=binding,curve_candidates=candidates,
ocr=dict(passes=scans,tokens=tokens,rejected=disagreements),trace=[dict(step='read_y_ticks',axes=len(binding['axes']),next_actions=reasons)])
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");overlay(image,geometry,out/'overlay.png')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

except (ValueError,OSError,RuntimeError,requests.RequestException) as e:
summary['steps'].append(dict(action='external_public_profile',status='unavailable',source_candidate=candidate_source,reason=str(e)))
summary['steps'].append(dict(action='stop',reason='All available automatic readers and enabled correspondence hypotheses evaluated; no absolute value is invented from shape alone.'))
(out/'agent.json').write_text(json.dumps(summary,indent=2,allow_nan=False), encoding="utf-8");return summary

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

except (requests.RequestException,ValueError,OSError) as e:
post.setdefault('errors',[]).append(type(e).__name__+': media download failed')
existing[post['id']]=post;count+=1
manifest.write_text(''.join(json.dumps(p)+'\n' for p in existing.values()), encoding="utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

result.update(status='needs_evidence_or_review',recovery=[])
result['reasons'].append('A monetary token failed OCR consensus.')
result.update(image=str(image),image_sha256=digest,curve_candidates=candidates,ocr=scans,ocr_disagreements=disagreements)
(out/'result.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");overlay(image,result['geometry'],out/'overlay.png')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

result.update(status='discovery_unavailable',reason=str(e))
if len(candidates)>3:
result.update(status='too_many_candidates',reason='More than three supported sources match; no subset selected and no profile fetched.')
(out/'discovery.json').write_text(json.dumps(result,indent=2,allow_nan=False), encoding="utf-8");return result

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential file inclusion attack via reading file - low severity
If an attacker can control the input leading into the open function, they might be able to read sensitive files and launch further attacks with that information.

Show fix

Remediation: Ignore this issue only after you've verified or sanitized the input going into this function.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel

Copy link
Copy Markdown
Contributor Author

s2d2 fix pass (requested by guillaume@stackone.com in Slack): merged origin/main (conflicts in README.md and .agents/plugins/generated-files.json resolved by keeping chart-recover alongside the new forge/spark entries, 6981a9a). Not fixed here, needs a human decision: 37 open threads. About 14 are Aikido 'file inclusion' findings on local CLI path reads (they keep the Aikido check red), about 15 are cubic 'company-agnostic' findings (TrustMRR and X hard-coded as providers in README, SKILL.md, cli.py, benchmarks, web UI; AGENTS.md forbids third-party/customer-specific content), and the rest are real logic bugs (log-scale handling in synthetic.py, bind_ticks merging separate panels, non-finite amounts, unconstrained generate --kind).

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.

4 participants