---
name: feishu-project-issue-data
description: Use when working in the yolo26-3d repository and the user wants to read Feishu Project issue views, export a view to structured JSON, classify issue data addresses, download issue data, repair affected standard-path downloads, validate case completeness, or run batch inference on downloaded issue data. Covers fp CLI plus tools/feishu_project/export_feishu_view_issues.py, download_issue_data.py/sh, and run_issue_data_inference.py/sh, including the 董颖-G1Q3 workflow.
---

# Feishu Project Issue Data

Use the repo dev env for Python commands:

```bash
/root/.codex/skills/use-dongying-dev-env/scripts/with-dev-env.sh python ...
```

or:

```bash
/deeplearning_team/ydong/dongying/miniconda/envs/dev/bin/python ...
```

Current repo defaults are documented in [../../feishu_project.md](../../feishu_project.md).

## When to use

- Read or verify a Feishu Project issue view with `fp`
- Export a view such as `董颖-G1Q3` to structured JSON
- Work with `问题数据地址` / `问题数据地址_PDCL`
- Download issue data into the local workspace
- Repair historical bad copies that only copied `sigmastar.1`
- Check whether downloaded cases are inference-ready
- Batch-run exported-model inference on downloaded issue data

## Core workflow

### 1. Verify Feishu access and view contents

Use `fp` directly when the user wants current data.

```bash
fp view list -p <project_key> -u <user_key> -t issue --name "<view_name>"
fp workitem list -o json -p <project_key> -u <user_key> --view "<view_name>" --all
fp workitem get <issue_id> -o json -p <project_key> -u <user_key> -t issue
```

### 2. Export structured issue JSON

Use [../../export_feishu_view_issues.py](../../export_feishu_view_issues.py).

```bash
python ../../export_feishu_view_issues.py \
  --project-key <project_key> \
  --user-key <user_key> \
  --view-name "<view_name>" \
  --output ../../dongying_g1q3_issue_list.json
```

The export should include:

- `缺陷标签池`
- `问题数据地址`
- `问题数据地址_PDCL`
- `问题发生frameid`

### 3. Interpret data-address fields

Treat these as the same download class:

- pure `ADAS_...::...` clip references
- `mdi raw -r ...` commands

Use this rule:

- `ADAS_xxx::yyy` is equivalent to `mdi raw -r ADAS_xxx::yyy -s .`

Standard paths use these normalization rules:

- rewrite `hfs/project-G1M3` or `project-G1M3` to `G1M3` when needed
- if the path ends with `sigmastar.1`, copy the parent case dir
- if the path ends with `sigmastar.1/camera4.bin`, copy the case dir above it
- if the copied case has no local `test_data/calibs/camera4.json`, sync a shared parent `test_data` directory when present

### 4. Download or repair issue data

Use [../../download_issue_data.sh](../../download_issue_data.sh) or [../../download_issue_data.py](../../download_issue_data.py).

Common modes:

```bash
DRY_RUN=1 bash ../../download_issue_data.sh
```

```bash
ONLY_REDOWNLOAD_AFFECTED_CASES=1 bash ../../download_issue_data.sh
```

```bash
SKIP_MDI=1 bash ../../download_issue_data.sh --issue-id <id>
```

Defaults:

- download root: `/data1/dongying/Mono3d/G1Q3/feishu_project/downloaded_issue_data`
- manifest: `<download_root>/download_manifest.json`

Use `ONLY_REDOWNLOAD_AFFECTED_CASES=1` to repair old standard-path copies that previously kept only `sigmastar.1`.

### 5. Validate inference readiness

Use the same case-resolution rules as [../../../model_inference/adapters/video_dir_inference_utils.py](../../../model_inference/adapters/video_dir_inference_utils.py).

A valid case must resolve:

- `*/sigmastar.1/camera4.bin`
- a reachable `camera4.json` from one of:
  - `case_dir/test_data/calibs/camera4.json`
  - `case_dir.parent/test_data/calibs/camera4.json`
  - `case_dir/sigmastar.1/calibs/camera4.json`
  - `case_dir/calibs/camera4.json`

Prefer validating with the actual inference path-resolution logic instead of ad hoc file checks.

### 6. Run batch inference on downloaded issue data

Use [../../run_issue_data_inference.sh](../../run_issue_data_inference.sh) or [../../run_issue_data_inference.py](../../run_issue_data_inference.py).

```bash
DRY_RUN=1 bash ../../run_issue_data_inference.sh
```

```bash
bash ../../run_issue_data_inference.sh
```

Behavior:

- recursively scans the download root for `*/sigmastar.1/camera4.bin`
- calls [../../../model_inference/core/run_two_roi_exported_onnx_infer.py](../../../model_inference/core/run_two_roi_exported_onnx_infer.py) with `--video-case-dir`
- mirrors the download-tree relative layout into the inference output root

Defaults:

- inference root: `/data1/dongying/Mono3d/G1Q3/feishu_project/inference_issue_data`
- manifest: `<inference_root>/inference_manifest.json`

Useful flags:

- `SKIP_EXISTING=1`
- `ENABLE_ATTR=1`
- `SAVE_AGGREGATE_PREDICTIONS=1`
- `VIDEO_STRIDE=<n>`
- `MAX_IMAGES=<n>`

## Current repo artifacts

These files are useful outputs, but they are not the source of truth for latest Feishu data:

- [../../dongying_g1q3_issue_list.json](../../dongying_g1q3_issue_list.json)
- [../../dongying_g1q3_data_address_summary.md](../../dongying_g1q3_data_address_summary.md)
- [../../dongying_g1q3_data_address_catalog.md](../../dongying_g1q3_data_address_catalog.md)

If the user asks for latest status, re-query Feishu with `fp` and regenerate outputs instead of trusting stale local exports.
