Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .impeccable/review/alpha3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Alpha 3 initial desktop captures

These two fixture-data screenshots were captured during the initial alpha 3
review on 2026-09-16 and retained through Fable's follow-up implementation.
They are included with the user's 2026-09-22 request to commit all task changes.

- `home-desktop.png`: populated research overview.
- `queue-desktop.png`: populated decision queue.

These are historical first-pass captures, not final design approval or screenshots
of the 2026-09-22 failed-run fix. See the implementation ledger and verification
checkpoint in `docs/audits/2026-09-16-alpha3/` for scope and limitations.
Binary file added .impeccable/review/alpha3/home-desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .impeccable/review/alpha3/queue-desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
121 changes: 118 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,126 @@ All notable public-facing changes to TaskSignal are recorded here.

## Unreleased

### Fixed

- Project run history now distinguishes failed and unfinished scan responses
from completed runs, including failures returned with HTTP 200. Failed runs
display the connector error and retain their scan-detail link and ledger refresh.
- Allow the documented Fluid compute duration limit (`maxDuration: 300`) for
Vercel API preview deployments.

### Security

- Refreshed locked web and API dependencies (including Next.js 15.5.29) so the
production web audit (`npm audit --omit=dev`) and the base and MCP Python
audits report no known vulnerabilities.

## 1.0.0a3 - 2026-09-16

### Added

- Shareable decision-queue views that retain text search, sort order, project,
source, readiness, age, and decision filters in the URL.
- A filtered return link and continuous “Next in this queue” review path that
retains the next item when a saved decision removes the current item from the
filter. Unsaved reviews disable Next, warn before following other page links
or reloading, and survive background data refreshes.
- Project search and run-status filters, plus focused project creation in an
accessible disclosure below the saved projects.
- Project run history can rerun the project, open its scoped decision queue, and
jump to each run's scan record; project cards link to their scoped queue once
a run exists.
- Thread pages link the current and historical snapshots to their evidence
pages, confirm saved thread decisions, and warn before unsaved edits are lost.

### Changed

- Replaced the populated home introduction with current research totals,
prioritized review work, saved views, and recent projects. Onboarding appears
only in an empty workspace.
- Replaced the wide opportunity table with responsive evidence-rich rows,
visible sensitive-risk warnings, and expandable evidence gaps and score details.
- Put source evidence and human review ahead of scoring and export tools on
opportunity detail pages; preserved the existing teal visual system.

### Fixed

- Failed thread/project/source requests no longer masquerade as empty data;
recovery actions stay available beside the error.
- Failed scan-history, run-history, agent-session, source-registry,
stored-packet, integration, readiness, and workspace-profile loads now show
the API's error detail with a Retry action instead of raw JSON, a silent gap,
or an empty-state claim; the workspace form stays read-only until the stored
profile has loaded.
- Discourse forums keep their own names on the Sources page instead of sharing
one connector label.
- The opportunity score card stacks at narrow widths instead of squeezing its
description into a one-word column.
- Review saves refresh thread, snapshot, evaluation, and readiness views.
Project runs also refresh project history and comparison data.
- Background updates preserve in-progress review notes and labels.

### Development status

- Prepared and verified locally. This entry does not imply a public release,
deployment, or independently measured improvement in review speed.

### Security

- Updated Vitest and its mocker to 4.1.11 to resolve the development-tooling
advisory [GHSA-82fw-gwwq-j7x9](https://github.com/advisories/GHSA-82fw-gwwq-j7x9).
Production web dependencies are unchanged.

## 1.0.0a2 - 2026-09-08

### Added

- A live workspace home with real research totals, the next unreviewed
opportunity, recent projects, and a direct credential-free demo action.
- Keyboard-accessible quick navigation with Cmd/Ctrl+K, page filtering, and
direct evidence-search handoff.
- Queue text search and score, readiness, and recency sorting, alongside the
existing server-side research and decision filters.
- Shareable evidence-search URLs with browser history, stale-response protection,
preserved results during refresh, and copy-link support.
- Branded missing-page and recoverable page-error views.

### Changed

- Refreshed navigation, contextual page headers, visual hierarchy, loading
feedback, focus treatment, and the home layout for desktop and mobile.
- Opportunity review takes priority over setup and scan controls; advanced
settings remain available through progressive disclosure.

### Development status

- Prepared as a local alpha update. No public release, deployment, or GA claim
is implied by this version entry.

### Fixed

- Fixed/manual scheduling clears stale custom intervals across the API and
agent tools, so changing cadence no longer preserves an unintended schedule.
- Generation requested through a historical opportunity now uses the thread's
current snapshot.
- Detaching a snapshot referenced by an immutable build packet returns a clear
conflict response while preserving the packet's evidence.
- Dashboard onboarding now reports the immutable build-packet handoff complete
only after a packet exists and opens the current thread's Build Studio instead
of the legacy task-pack exporter.
- Repository test commands allocate an isolated temporary SQLite database per
run, preventing overlapping local verification processes from dropping one
another's test tables.

### Security

- Refreshed locked web and API dependencies so the production web audit and
the base and MCP Python audits report no known vulnerabilities. The only
remaining web advisory is the unpatched `picomatch` ReDoS in dev tooling.
- Updated compatible web dependencies, including Next.js 15.5.25 and PostCSS
8.5.28, and refreshed the lockfile to clear the web dependency audit.
- Updated the transitive Python cryptography dependency to 50.0.1; the hashed
production and MCP dependency audit reports no known vulnerabilities.
- Directly guarded API routes now reject malformed non-ASCII operator and demo
reset tokens with a constant-time byte comparison and a stable `403` response
instead of raising an internal error.

## 1.0.0a1 - 2026-07-11

Expand Down
29 changes: 28 additions & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Layout:

- Left navigation on desktop.
- Single-column mobile flow.
- Data tables for ranked opportunities.
- Responsive rows for ranked opportunities, with secondary scoring details in
a native disclosure; one readable column on mobile.
- Cards only for bounded summaries, repeated evidence items, and focused panels.
- No nested cards.

Expand All @@ -33,6 +34,32 @@ Interaction:
- Loading states must be visible for async processing.
- Focus states must remain visible.

## Next-version workbench

The alpha.3 interface retains the existing teal palette and system font. A
slightly tinted navigation rail, a context bar, stronger page hierarchy, and a
compact research overview distinguish navigation, orientation, and task content.
Home totals always come from the API; loading and failed data are never shown as
invented results. Current opportunities refer to latest snapshots, not lifetime
snapshot counts.

The decision queue precedes collection/setup tools in both visual and document
order. Advanced scope filters and setup details use native disclosure controls.
Quick navigation uses a native modal dialog, Cmd/Ctrl+K, visible focus, and Escape
support. Motion respects the operating system's reduced-motion preference.

Populated home screens lead with current work. Empty-workspace onboarding is
conditional on successful, empty data. Projects lead with the saved list, search,
and run status; creation stays in a native disclosure below it. Failed requests
use explicit recovery states instead of claiming the workspace is empty.

Queue filters and ordering are represented in the URL. Detail pages preserve
that queue context and show evidence before decisions and export tools. The
next-item link follows the original order and is disabled while review drafts
are unsaved. Internal page links and reloads warn about unsaved drafts; native
browser Back/Forward is not intercepted. Review drafts survive background
response updates while the page remains mounted.

## Exports

Generated from the locked TaskSignal system on 2026-07-10. The root
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ smoke:
$(API_PYTHON) -u scripts/first_run_smoke.py

test:
$(API_PYTHON) -m pytest apps/api/tests
@test_db_dir="$$(mktemp -d /tmp/tasksignal-tests.XXXXXX)"; \
trap 'rm -rf "$$test_db_dir"' EXIT; \
DATABASE_URL="sqlite:///$$test_db_dir/tasksignal.db" \
$(API_PYTHON) -m pytest apps/api/tests
cd apps/web && PATH="$(WEB_PATH)" npm test

lint:
Expand Down
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,38 @@ It remembers what each run observed, explains what changed, keeps related
opportunities in persistent threads, and generates deterministic build documents
whose provenance can be verified before implementation starts.

![TaskSignal current opportunity queue after processing demo data](docs/images/dashboard-browser-verified.jpg)
![TaskSignal alpha 1 opportunity queue after processing demo data](docs/images/dashboard-browser-verified.jpg)

## Next version: 1.0.0 alpha 3

The decision queue keeps its text search, sort order, and project, source,
readiness, age, and decision filters in the URL, so a view can be copied or
reopened later. Opening an idea from the queue preserves that view: **Back to
filtered queue** returns to it and **Next in this queue** continues in the same
order. Unsaved reviews disable Next and warn before another page link or a reload
would discard them.

The home page shows current research totals, unreviewed ideas, saved views, and
recent projects; onboarding appears only in an empty workspace. Projects list
saved work first with local search, run-status filters, and a focused **New
project** disclosure. Run history can rerun a project, open its scoped queue, and
jump to each run's scan record. Threads link every snapshot to its evidence page,
confirm saved decisions, and guard unsaved edits. Failed loads on every page keep
a **Retry** action and never masquerade as empty data.

Press **Cmd+K** on macOS or **Ctrl+K** elsewhere to jump between views or search
for evidence. Submitted evidence searches have a reusable `?q=` address, with
browser back/forward support and a copy-link action.

This is a local alpha update; see the changelog for its verification and release
boundaries.

## Project Status

TaskSignal is an early-stage, local-first application for one operator. The
latest public release is the [`v0.2.0` rollback baseline](https://github.com/Yurii201811/tasksignal/releases/tag/v0.2.0).
The current source tree is the pre-GA v1 alpha (`1.0.0a1` for Python and
`1.0.0-alpha.1` for the web app).
The current source tree is the pre-GA v1 alpha (`1.0.0a3` for Python and
`1.0.0-alpha.3` for the web app).

The repository has a passing Linux/macOS Python 3.11–3.14 wheel matrix in this
[`main` CI run](https://github.com/Yurii201811/tasksignal/actions/runs/29171023301).
Expand Down
43 changes: 29 additions & 14 deletions apps/api/app/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import json
import re
from datetime import UTC, datetime, timedelta
from secrets import compare_digest
from uuid import UUID, uuid4

import httpx
Expand All @@ -14,6 +13,7 @@
from sqlalchemy.orm import Session

from app.core.config import settings
from app.core.security import secret_text_matches
from app.core.version import TASKSIGNAL_VERSION
from app.db.session import get_db
from app.models.all_models import (
Expand Down Expand Up @@ -162,7 +162,10 @@
get_project_run,
list_project_runs,
)
from app.services.research_projects.service import next_run_at_from
from app.services.research_projects.service import (
next_run_at_from,
schedule_interval_for_project,
)
from app.services.scoring.service import score_opportunity
from app.services.search.service import semantic_search as search_semantically
from app.workers.demo_pipeline import ensure_sources, process_demo, stats
Expand Down Expand Up @@ -323,11 +326,7 @@ def author_hash_salt_uses_default() -> bool:


def operator_scan_authorized(token: str | None) -> bool:
return bool(
settings.operator_scan_token
and token
and compare_digest(token, settings.operator_scan_token)
)
return secret_text_matches(token, settings.operator_scan_token)


def require_operator_token(token: str | None, action: str) -> None:
Expand All @@ -339,7 +338,7 @@ def require_operator_token(token: str | None, action: str) -> None:
"and sent as X-Operator-Scan-Token."
),
)
if not token or not compare_digest(token, settings.operator_scan_token):
if not secret_text_matches(token, settings.operator_scan_token):
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail=f"{action} requires a valid X-Operator-Scan-Token.",
Expand Down Expand Up @@ -706,14 +705,17 @@ def readiness_payload(db: Session) -> ReadinessOut:
local_workspace = get_or_create_local_workspace(db)
project_count = len(db.scalars(select(ResearchProject.id)).all())
opportunity_count = len(db.scalars(select(Opportunity.id)).all())
build_packet_count = len(db.scalars(select(BuildPacket.id)).all())
due_count = len(db.scalars(due_project_query(datetime.now(UTC))).all())
blockers: list[str] = []
warnings: list[str] = []

if project_count == 0:
warnings.append("Create at least one saved research project.")
if opportunity_count == 0:
warnings.append("Run a project or process fixtures before exporting task packs.")
warnings.append("Run a project or process fixtures before creating a build packet.")
elif build_packet_count == 0:
warnings.append("Review a thread and create an immutable build packet.")
if not local_workspace.configured:
warnings.append("Set the local workspace owner or goal for this machine.")
if warning := public_scan_config_warning():
Expand All @@ -734,6 +736,7 @@ def readiness_payload(db: Session) -> ReadinessOut:
checks = {
"projects": project_count,
"opportunities": opportunity_count,
"build_packets": build_packet_count,
"due_projects": due_count,
"local_workspace_configured": local_workspace.configured,
"ready_sources": ready_sources,
Expand Down Expand Up @@ -1708,19 +1711,24 @@ def create_research_project(
)

labels = [label.strip() for label in payload.labels if label.strip()]
cadence = payload.cadence.strip() or "manual"
schedule_interval_hours = schedule_interval_for_project(
cadence,
payload.schedule_interval_hours,
)
project = ResearchProject(
name=payload.name.strip(),
description=payload.description.strip() if payload.description else None,
source_type=source_type,
source_id=payload.source_id,
query=payload.query.strip(),
limit=payload.limit,
cadence=payload.cadence.strip() or "manual",
schedule_interval_hours=payload.schedule_interval_hours,
cadence=cadence,
schedule_interval_hours=schedule_interval_hours,
next_run_at=next_run_at_from(
datetime.now(UTC),
payload.cadence.strip() or "manual",
payload.schedule_interval_hours,
cadence,
schedule_interval_hours,
),
labels_json=labels[:12],
enabled=payload.enabled,
Expand Down Expand Up @@ -1831,6 +1839,11 @@ def update_research_project(
project.cadence = cadence
if "schedule_interval_hours" in supplied:
project.schedule_interval_hours = payload.schedule_interval_hours
if supplied & {"cadence", "schedule_interval_hours"}:
project.schedule_interval_hours = schedule_interval_for_project(
project.cadence,
project.schedule_interval_hours,
)
if "labels" in supplied:
labels = [label.strip() for label in (payload.labels or []) if label.strip()]
project.labels_json = list(dict.fromkeys(labels))[:12]
Expand Down Expand Up @@ -2049,7 +2062,7 @@ def run_demo(
if reset and (
not settings.demo_reset_token
or x_demo_reset_token is None
or not compare_digest(x_demo_reset_token, settings.demo_reset_token)
or not secret_text_matches(x_demo_reset_token, settings.demo_reset_token)
):
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
Expand Down Expand Up @@ -2943,6 +2956,7 @@ def regenerate_opportunity(opportunity_id: UUID, db: Session = Depends(get_db))
opportunity = db.get(Opportunity, opportunity_id)
if opportunity is None:
raise HTTPException(status_code=404, detail="Opportunity not found")
opportunity = current_thread_snapshot(db, opportunity)

rows = cluster_signal_rows(db, opportunity.cluster_id)
if not rows:
Expand Down Expand Up @@ -2994,6 +3008,7 @@ def enhance_opportunity_prompt(
opportunity = db.get(Opportunity, opportunity_id)
if opportunity is None:
raise HTTPException(status_code=404, detail="Opportunity not found")
opportunity = current_thread_snapshot(db, opportunity)

try:
provider, model, enhanced_prompt = enhance_prompt(opportunity.generated_prompt)
Expand Down
8 changes: 8 additions & 0 deletions apps/api/app/core/security.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from secrets import compare_digest


def secret_text_matches(supplied: str | None, configured: str | None) -> bool:
"""Compare text secrets without raising on non-ASCII header values."""
if not supplied or not configured:
return False
return compare_digest(supplied.encode("utf-8"), configured.encode("utf-8"))
Loading
Loading