Skip to content

Add optional CLI activity metrics and fix the dependency audit blocker - #54

Merged
Perdikis10 merged 3 commits into
mainfrom
publish/cli-activity-metrics
Nov 17, 2026
Merged

Perdikis10 merged 3 commits into
mainfrom
publish/cli-activity-metrics

Conversation

@Perdikis10

@Perdikis10 Perdikis10 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Adds off-by-default CLI active-day measurement separately from desktop-hosted engines. ALYSIS_USAGE_METRICS=1 opts in; DO_NOT_TRACK=1 disables it. Stable random installation IDs and server-side UTC uniqueness deduplicate retries/restarts. No account, prompts, chats, paths, hostname or credentials are sent. Submitted tasks do not wait for measurement requests. Bounded HTTPS discovery keeps deployment keys out of the CLI.

Fixes the picomatch parser vulnerability that blocked the existing image/extension audits. Applies the focused source change from upstream PR micromatch/picomatch#254 (c63a5bf4e61dbdb81bc41e97dc2616c30acce337) to integrity-pinned npm 4.0.7, retaining its MIT license and runtime files. The reproducible local archive is explicitly versioned 4.0.8-alysis.1, an Alysis rebuild rather than an official npm release. SHA-256: 8c61f1661413ac40be9e4cdff256dd836f8af1fe31aa66c3822d17d46262d0c8. Audit thresholds and advisory gates are unchanged.

The builder verifies archive integrity, frozen dependency origins, installed parser fingerprints, matching/capture cases and hostile-input child-process deadlines. Extension CI runs the same regression before its audit. The sandbox npm rebuild is labeled 11.20.0-alysis.3. Docker's restricted build context now explicitly includes the shared regression, with a contract guarding this allowlist.

Validation: 1,983 upstream matcher tests, 3 installed security regressions, 17 Python builder/image contracts, 3 measurement tests, extension compile/lint, public hygiene (3,408 files) and Gitleaks (all three outgoing commits and archive) pass. The original hostile-input reproducer exceeded its two-second deadline; the patched parser completed in 94ms. All six Linux amd64/arm64 container builds, scans and smoke tests pass in run https://github.com/AlysisAi/AlysisCode/actions/runs/44158417400, including full rebuild/cache archival validation. Extension activation budgets pass in run https://github.com/AlysisAi/AlysisCode/actions/runs/44158417238. Full platform/Python CI: https://github.com/AlysisAi/AlysisCode/actions/runs/44158417283 (all platform, Python matrix and package-smoke checks passed; macOS extension passed on a targeted retry after a startup-profile fixture race).

Live CLI discovery/collector smoke recorded one active day across retries; synthetic data was removed. Three clean commits descend only from public main e2d5d4d; no private history. This publishes source, not a tagged Python-package release.

Post-merge verification on main 209a73e also passes: https://github.com/AlysisAi/AlysisCode/actions/runs/44168117887 . Windows source/safety/build-wheel/installed-fault qualification passed on a targeted retry after an existing 0.4-second cleanup fixture exhausted its startup budget; no assertions or source code were changed. All four Python versions, platform/extension checks and final clean-install package smoke are green.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-17T19:22:04.545441Z d57dc41 Draft marked ready
ℹ️ 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.

@Perdikis10
Perdikis10 marked this pull request as draft November 17, 2026 18:51
@Perdikis10 Perdikis10 changed the title Add optional CLI active-day counts separately from desktop use Add optional CLI activity metrics and fix the dependency audit blocker Nov 17, 2026
@Perdikis10
Perdikis10 marked this pull request as ready for review November 17, 2026 19:19

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

ℹ️ 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".

Comment on lines +4038 to +4041
if execution_instruction.strip():
from ...product_measurement import record_cli_activity

record_cli_activity()

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 Record activity for the default TUI chat path

With ALYSIS_USAGE_METRICS=1, users submitting tasks through the default interactive TUI never record an active day. This hook is only reached by the classic prompt loop: the TUI runs through _run_tui() earlier in this function and returns without entering this loop, and its worker calls session.run_turn() directly in src/alysis_code/cli_impl/tui/app.py:4009. The other new hook only covers the run command. Add measurement to the TUI task-submission path as well so the dashboard does not exclude installations using the default chat interface.

Useful? React with 👍 / 👎.

@Perdikis10
Perdikis10 merged commit 209a73e into main Nov 17, 2026
45 of 46 checks passed
@Perdikis10
Perdikis10 deleted the publish/cli-activity-metrics branch November 17, 2026 20:30
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