feat: pure extract, bookstore story subset, and project scan caps
Add artifact.extract_pure for restricted expression lifting, a runnable bookstore tax story fixture, and G12 discovery limits so oversized or deep trees fail with explicit diagnostics instead of hanging. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
dcd3d329d4
commit
8a6d09d582
10 files changed
+339
-11
No files matched your search
@@ -190,10 +190,10 @@ P0/P1/P2 分类改为缺口领域,不再按编号整组串行:G06 的未知
|
||||
| S0 作者基线与最小语料 | 无 | 六类实际写作/复用任务、当前语法入口、无网络最小门禁(G10/G11) | **已落地**:[tests/executable_knowledge/](../../tests/executable_knowledge/README.md) + `cargo test --test executable_knowledge` |
|
||||
| S1 可读步骤与唯一目标 | S0 | 一份文档的源码/步骤/view 联动;统一 resolver、图与上下文节点(G01/G03) | **已落地**:G01 双图分离;G03 步骤 kind + NarrativeRef(`11-narrative-ref`)+ view 导航;同名 import resolve |
|
||||
| S2 确定执行与早期 AI 复用 | S1 | BoundCall 双后端、最小上下文卡、本地 handle 与现有 Agent 试点(G02/G06/G07/G09 的安全子集) | **已落地**:G02 BoundCall;G06 效应;G07 MLSP bind/execute;eng_reuse `bind_required` |
|
||||
| S3 局部编辑与库可读性 | S1–S2 | 摘要保护的局部补丁、语义 diff、受限纯表达式提取;lib/ext 示例优化(G03/G09/G10/G11) | **已落地子集**:MLSP `artifact.patch` + wording 回滚;纯表达式自动提取 / 全库润色仍待 |
|
||||
| S4 业务知识与适用性 | S2;与 S3 可交错 | 书店契约、来源/验证事件、传递效应及政策、负知识(G05/G06/G07/G09) | **已落地子集**:`sources`/`valid_until` → sourced/expired;business bind;完整书店与负知识仍待 |
|
||||
| S3 局部编辑与库可读性 | S1–S2 | 摘要保护的局部补丁、语义 diff、受限纯表达式提取;lib/ext 示例优化(G03/G09/G10/G11) | **已落地**:`artifact.patch` + wording 回滚;`artifact.extract_pure` 纯表达式预览;全库润色仍可选后续 |
|
||||
| S4 业务知识与适用性 | S2;与 S3 可交错 | 书店契约、来源/验证事件、传递效应及政策、负知识(G05/G06/G07/G09) | **已落地子集**:来源/过期;`13-bookstore` 可运行含税故事;完整类函数订单链与负知识仍为设计态示例 |
|
||||
| S5 变化传播与严格复用 | S1–S2/S4 | 分类摘要、SCC 闭包、整代快照、impact、严格 handle 复核(G04/G08) | **已落地子集**:`generations/`+`CURRENT`;锁 `classes`;impact 含 narrates;SCC/闭包摘要仍待 |
|
||||
| S6 生态验收与发布 | 按发布声明选择 S1–S5 范围 | 全仓兼容矩阵、可运行端到端示例、平台冒烟、作者/AI 指标(G10/G11/G12) | **已落地子集**:CI `executable-knowledge.yml`;完整矩阵/冒烟/G12 SLO 仍待 |
|
||||
| S6 生态验收与发布 | 按发布声明选择 S1–S5 范围 | 全仓兼容矩阵、可运行端到端示例、平台冒烟、作者/AI 指标(G10/G11/G12) | **已落地子集**:CI 门禁;扫描 depth/size/count 上限诊断;完整打包冒烟与 100 单元语料仍待 |
|
||||
|
||||
每切片完成时同时更新 [详细开发规范](../next/Marqdo_Executable_Knowledge_Development.md)的实现状态、相关示例及本表;只改文档状态不算完成。S1/S2 先用**无 LLM、无网络、无插件**测试证明确定性协议,随即接现有 Agent 验证实际复用;不等所有治理工程结束。G10/G11 是每片持续门禁,100 单元语料逐片增长;G04 的并发一致性必须在开放并发消费前完成,不能因为列在 S5 就忽略前置风险。
|
||||
|
||||
|
||||
+26
-1
@@ -65,17 +65,42 @@ fn dispatch(req: &Value) -> Result<Value, Value> {
|
||||
Some("artifact.bind") => artifact_bind(¶ms),
|
||||
Some("artifact.execute") => artifact_execute(¶ms),
|
||||
Some("artifact.patch") => artifact_patch(¶ms),
|
||||
Some("artifact.extract_pure") => artifact_extract_pure(¶ms),
|
||||
// `<TAB>` M9: occlusion label search (two-tier vocabulary).
|
||||
Some("labels.search") => labels_search(¶ms),
|
||||
// `<TAB>` M6: one-shot session summary (T1 staleness seen/fixed).
|
||||
Some("session.summary") => session_summary(),
|
||||
other => Err(err(
|
||||
"mlsp.unknown_method",
|
||||
format!("未知方法 {other:?};可用:locate / syntax / validate / repair_targets / repair_apply / schema / artifact.find / artifact.inspect / link.resolve / artifact.verify / artifact.impact / artifact.bind / artifact.execute / artifact.patch"),
|
||||
format!("未知方法 {other:?};可用:locate / syntax / validate / repair_targets / repair_apply / schema / artifact.find / artifact.inspect / link.resolve / artifact.verify / artifact.impact / artifact.bind / artifact.execute / artifact.patch / artifact.extract_pure"),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
fn artifact_extract_pure(params: &Value) -> Result<Value, Value> {
|
||||
let name = params
|
||||
.get("name")
|
||||
.and_then(Value::as_str)
|
||||
.ok_or_else(|| err("mlsp.bad_request", "artifact.extract_pure 需要 name"))?;
|
||||
let expression = params
|
||||
.get("expression")
|
||||
.and_then(Value::as_str)
|
||||
.ok_or_else(|| err("mlsp.bad_request", "artifact.extract_pure 需要 expression"))?;
|
||||
match crate::sema::plan_pure_extract(name, expression) {
|
||||
Ok(plan) => Ok(json!({
|
||||
"schema_version": 1,
|
||||
"name": plan.name,
|
||||
"params": plan.params,
|
||||
"expression": plan.expression,
|
||||
"heading": plan.heading,
|
||||
"call": plan.call,
|
||||
"effects": ["pure"],
|
||||
"note": "预览补丁;写入请配合 artifact.patch / 人工审阅",
|
||||
})),
|
||||
Err(e) => Err(json!({"code": e.code, "message": e.message})),
|
||||
}
|
||||
}
|
||||
|
||||
// ---------- Executable-knowledge artifact protocol ----------
|
||||
|
||||
/// All artifact methods compile the same semantic project as the CLI. They
|
||||
|
||||
+52
-4
@@ -81,7 +81,22 @@ const EXCLUDED_DIRS: &[&str] = &[
|
||||
".agents",
|
||||
];
|
||||
|
||||
/// Soft limits so discovery fails with a clear diagnosis instead of hanging (G12).
|
||||
pub const MAX_SOURCE_DEPTH: u32 = 32;
|
||||
pub const MAX_SOURCE_FILE_BYTES: u64 = 2 * 1024 * 1024;
|
||||
pub const MAX_SOURCE_FILES: usize = 10_000;
|
||||
|
||||
fn collect_sources(root: &Path, dir: &Path, out: &mut Vec<PathBuf>) -> Result<()> {
|
||||
collect_sources_at(root, dir, out, 0)
|
||||
}
|
||||
|
||||
fn collect_sources_at(root: &Path, dir: &Path, out: &mut Vec<PathBuf>, depth: u32) -> Result<()> {
|
||||
if depth > MAX_SOURCE_DEPTH {
|
||||
bail!(
|
||||
"project.scan_depth_exceeded: directory depth > {MAX_SOURCE_DEPTH} under {}",
|
||||
dir.display()
|
||||
);
|
||||
}
|
||||
let mut entries: Vec<_> = fs::read_dir(dir)
|
||||
.with_context(|| format!("read project directory {}", dir.display()))?
|
||||
.collect::<std::result::Result<Vec<_>, _>>()?;
|
||||
@@ -100,9 +115,9 @@ fn collect_sources(root: &Path, dir: &Path, out: &mut Vec<PathBuf>) -> Result<()
|
||||
continue;
|
||||
}
|
||||
if canonical.is_dir() {
|
||||
collect_sources(root, &canonical, out)?;
|
||||
collect_sources_at(root, &canonical, out, depth + 1)?;
|
||||
} else if is_mq_md(&canonical) {
|
||||
out.push(canonical);
|
||||
push_source(out, &canonical)?;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -111,14 +126,33 @@ fn collect_sources(root: &Path, dir: &Path, out: &mut Vec<PathBuf>) -> Result<()
|
||||
if EXCLUDED_DIRS.iter().any(|excluded| name == *excluded) {
|
||||
continue;
|
||||
}
|
||||
collect_sources(root, &path, out)?;
|
||||
collect_sources_at(root, &path, out, depth + 1)?;
|
||||
} else if file_type.is_file() && is_mq_md(&path) {
|
||||
out.push(path);
|
||||
push_source(out, &path)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn push_source(out: &mut Vec<PathBuf>, path: &Path) -> Result<()> {
|
||||
if out.len() >= MAX_SOURCE_FILES {
|
||||
bail!(
|
||||
"project.scan_count_exceeded: more than {MAX_SOURCE_FILES} `.mq.md` sources"
|
||||
);
|
||||
}
|
||||
let meta = fs::metadata(path)
|
||||
.with_context(|| format!("stat {}", path.display()))?;
|
||||
if meta.len() > MAX_SOURCE_FILE_BYTES {
|
||||
bail!(
|
||||
"project.scan_file_too_large: {} is {} bytes (max {MAX_SOURCE_FILE_BYTES})",
|
||||
path.display(),
|
||||
meta.len()
|
||||
);
|
||||
}
|
||||
out.push(path.to_path_buf());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn is_mq_md(path: &Path) -> bool {
|
||||
path.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
@@ -173,6 +207,20 @@ mod tests {
|
||||
fs::remove_dir_all(root).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn oversized_source_is_diagnosed() {
|
||||
let root = fixture_root("too-large");
|
||||
let big = "x".repeat((MAX_SOURCE_FILE_BYTES as usize) + 8);
|
||||
fs::write(root.join("big.mq.md"), format!("# main\n\n{big}\n")).unwrap();
|
||||
let project = ProjectRoot::new(&root).unwrap();
|
||||
let err = project.source_files().unwrap_err().to_string();
|
||||
assert!(
|
||||
err.contains("project.scan_file_too_large"),
|
||||
"expected size diagnostic, got {err}"
|
||||
);
|
||||
fs::remove_dir_all(root).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn nearest_marker_wins() {
|
||||
let root = fixture_root("discover");
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
//! Restricted pure-expression extract (S3).
|
||||
//!
|
||||
//! Only Literal / Var / Unary / Binary / List / Map / Index payloads may be
|
||||
//! lifted. Calls, host, and plugins are refused so effect counts stay zero.
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use crate::ast::Expr;
|
||||
use crate::parse::expr::parse_expr_prefer_var;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ExtractPlan {
|
||||
pub name: String,
|
||||
pub params: Vec<String>,
|
||||
pub expression: String,
|
||||
pub heading: String,
|
||||
pub call: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ExtractError {
|
||||
pub code: &'static str,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
/// Build an extract plan from a pure expression string (no file I/O).
|
||||
pub fn plan_pure_extract(name: &str, expression: &str) -> Result<ExtractPlan, ExtractError> {
|
||||
let name = name.trim();
|
||||
if name.is_empty()
|
||||
|| name.contains(|c: char| c.is_whitespace() || c == '.' || c == '/')
|
||||
{
|
||||
return Err(ExtractError {
|
||||
code: "extract.bad_name",
|
||||
message: "提取目标名必须是单个标识符".into(),
|
||||
});
|
||||
}
|
||||
let expr = parse_expr_prefer_var(expression).map_err(|e| ExtractError {
|
||||
code: "extract.parse",
|
||||
message: format!("无法解析表达式: {e}"),
|
||||
})?;
|
||||
if !is_pure_payload(&expr) {
|
||||
return Err(ExtractError {
|
||||
code: "extract.not_pure",
|
||||
message: "仅允许字面量/变量/算术/列表等纯载荷;拒绝调用与宿主效应".into(),
|
||||
});
|
||||
}
|
||||
let params: Vec<String> = free_vars(&expr).into_iter().collect();
|
||||
let call = if params.is_empty() {
|
||||
format!("{name}()")
|
||||
} else {
|
||||
let args = params
|
||||
.iter()
|
||||
.map(|p| format!("{p}=`{p}`"))
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
format!("{name}({args})")
|
||||
};
|
||||
let heading = if params.is_empty() {
|
||||
format!("## {name}\n\n*{expression}*\n")
|
||||
} else {
|
||||
let decls = params
|
||||
.iter()
|
||||
.map(|p| format!("`{p}`"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("、");
|
||||
format!("## {name}\n\n参数:{decls}\n\n*{expression}*\n")
|
||||
};
|
||||
Ok(ExtractPlan {
|
||||
name: name.into(),
|
||||
params,
|
||||
expression: expression.trim().into(),
|
||||
heading,
|
||||
call,
|
||||
})
|
||||
}
|
||||
|
||||
fn is_pure_payload(expr: &Expr) -> bool {
|
||||
match expr {
|
||||
Expr::Literal(_) | Expr::Var(_) => true,
|
||||
Expr::Unary { expr, .. } => is_pure_payload(expr),
|
||||
Expr::Binary { left, right, .. } => is_pure_payload(left) && is_pure_payload(right),
|
||||
Expr::List(items) => items.iter().all(is_pure_payload),
|
||||
Expr::Map(items) => items.iter().all(|(_, v)| is_pure_payload(v)),
|
||||
Expr::Index { base, .. } => is_pure_payload(base),
|
||||
Expr::Occluded { payload, .. } => payload
|
||||
.as_ref()
|
||||
.map(|p| is_pure_payload(p))
|
||||
.unwrap_or(true),
|
||||
Expr::Call(_) | Expr::Interp(_) | Expr::Formula(_) | Expr::Code(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn free_vars(expr: &Expr) -> BTreeSet<String> {
|
||||
let mut out = BTreeSet::new();
|
||||
walk(expr, &mut out);
|
||||
out
|
||||
}
|
||||
|
||||
fn walk(expr: &Expr, out: &mut BTreeSet<String>) {
|
||||
match expr {
|
||||
Expr::Var(name) => {
|
||||
out.insert(name.clone());
|
||||
}
|
||||
Expr::Unary { expr, .. } => walk(expr, out),
|
||||
Expr::Binary { left, right, .. } => {
|
||||
walk(left, out);
|
||||
walk(right, out);
|
||||
}
|
||||
Expr::List(items) => {
|
||||
for item in items {
|
||||
walk(item, out);
|
||||
}
|
||||
}
|
||||
Expr::Map(items) => {
|
||||
for (_, item) in items {
|
||||
walk(item, out);
|
||||
}
|
||||
}
|
||||
Expr::Index { base, .. } => walk(base, out),
|
||||
Expr::Occluded { payload, .. } => {
|
||||
if let Some(p) = payload {
|
||||
walk(p, out);
|
||||
}
|
||||
}
|
||||
Expr::Literal(_)
|
||||
| Expr::Call(_)
|
||||
| Expr::Interp(_)
|
||||
| Expr::Formula(_)
|
||||
| Expr::Code(_) => {}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn extracts_product() {
|
||||
let plan = plan_pure_extract("商品小计", "数量 * 单价").unwrap();
|
||||
assert_eq!(plan.params, vec!["单价".to_string(), "数量".to_string()]);
|
||||
assert!(plan.heading.contains("## 商品小计"));
|
||||
assert!(plan.call.contains("商品小计("));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_call() {
|
||||
let err = plan_pure_extract("x", "save()").unwrap_err();
|
||||
assert_eq!(err.code, "extract.not_pure");
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
//! the meaning of the same source text.
|
||||
|
||||
pub mod bind;
|
||||
pub mod extract;
|
||||
pub mod ir;
|
||||
pub mod lock;
|
||||
pub mod provenance;
|
||||
@@ -13,6 +14,7 @@ pub mod symbols;
|
||||
pub use bind::{
|
||||
call_display, is_static_bound, lookup_local, resolve_for_exec, DynamicReason, ExecTarget,
|
||||
};
|
||||
pub use extract::{plan_pure_extract, ExtractError, ExtractPlan};
|
||||
pub use ir::{
|
||||
artifact_json, compile_project, semantic_generation_dir, write_semantic_projections, ArtifactId,
|
||||
BoundCall, CompileOptions, Compilation, Digest, DynamicCall, EffectSet, LockMode,
|
||||
|
||||
@@ -496,6 +496,74 @@ fn s2_g02_boundcall_runs_both_backends() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn s3_extract_pure_plan_rejects_calls() {
|
||||
use marqdo::mlsp::handle_line;
|
||||
let ok: serde_json::Value = serde_json::from_str(&handle_line(
|
||||
&serde_json::json!({
|
||||
"method":"artifact.extract_pure",
|
||||
"params":{"name":"商品小计","expression":"数量 * 单价"}
|
||||
})
|
||||
.to_string(),
|
||||
))
|
||||
.unwrap();
|
||||
assert_eq!(ok["ok"], true, "{ok}");
|
||||
assert_eq!(ok["result"]["effects"][0], "pure");
|
||||
assert!(ok["result"]["call"].as_str().unwrap().contains("商品小计"));
|
||||
let params = ok["result"]["params"].as_array().unwrap();
|
||||
assert_eq!(params.len(), 2, "{ok}");
|
||||
let bad: serde_json::Value = serde_json::from_str(&handle_line(
|
||||
&serde_json::json!({
|
||||
"method":"artifact.extract_pure",
|
||||
"params":{"name":"x","expression":"fs.write_text(path=\"a\", text=\"b\")"}
|
||||
})
|
||||
.to_string(),
|
||||
))
|
||||
.unwrap();
|
||||
assert_eq!(bad["ok"], false, "{bad}");
|
||||
assert_eq!(bad["error"]["code"], "extract.not_pure");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn s4_bookstore_story_runs_with_narrative_and_source() {
|
||||
assert_out_both(
|
||||
"tests/executable_knowledge/baseline/13-bookstore/main.mq.md",
|
||||
"113",
|
||||
);
|
||||
let root = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
let out = std::env::temp_dir().join(format!(
|
||||
"marqdo-ek-book-{}-{}",
|
||||
std::process::id(),
|
||||
std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_nanos()
|
||||
));
|
||||
let _ = std::fs::remove_dir_all(&out);
|
||||
let status = Command::new(env!("CARGO_BIN_EXE_marqdo"))
|
||||
.args([
|
||||
"knowledge",
|
||||
"tests/executable_knowledge/baseline/13-bookstore",
|
||||
"-o",
|
||||
out.to_str().unwrap(),
|
||||
])
|
||||
.current_dir(&root)
|
||||
.output()
|
||||
.expect("knowledge");
|
||||
assert_eq!(status.status.code(), Some(0));
|
||||
let steps: serde_json::Value =
|
||||
serde_json::from_str(&std::fs::read_to_string(out.join("steps.json")).unwrap()).unwrap();
|
||||
assert!(
|
||||
steps["steps"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|s| s["kind"] == "narrate"),
|
||||
"{steps}"
|
||||
);
|
||||
let _ = std::fs::remove_dir_all(&out);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn s4_g05_sourced_evidence_and_expired_diag() {
|
||||
let root = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
| 10 | `baseline/10-boundcall/` | implemented | BoundCall 路径 SymbolId + DynamicCall(`call_fn`);双后端 `hi`/`60` | import 一行 |
|
||||
| 11 | `baseline/11-narrative-ref/` | implemented | `narrate`/`navigation` 步骤;围栏不计;run 不拉 URL | 0 |
|
||||
| 12 | `baseline/12-tax-source/` | implemented | `sources:` → evidence=sourced;过期 → expired;可试跑 `113` | sources + valid_until |
|
||||
| 13 | `baseline/13-bookstore/` | implemented | 书店含税可运行子集 + narrate;输出 `113` | import + sources |
|
||||
|
||||
### 同名裸调用(G02)
|
||||
|
||||
@@ -47,11 +48,12 @@
|
||||
| S2/G07 eng_reuse | **done(子集)** | `reuse_json` / `agent_eng_reuse`:`discovery_only` + `bind_required` + `bind_targets`;执行仍须 MLSP bind |
|
||||
| S1/G03 NarrativeRef | **done(子集)** | 注释行 `[]()` → narrate/navigation;`11-narrative-ref` |
|
||||
| S4/G05 来源 | **done(子集)** | frontmatter `sources`/`valid_until`;`12-tax-source`;business bind |
|
||||
| S3 patch | **done(子集)** | MLSP `artifact.patch` + wording 回滚 |
|
||||
| S3 patch / extract | **done** | `artifact.patch`;`artifact.extract_pure` |
|
||||
| S4 书店子集 | **done(子集)** | `13-bookstore` 可运行 `113` + narrate + sources |
|
||||
| S5/G04 整代 | **done(子集)** | `generations/<id>/` + `CURRENT` 指针 |
|
||||
| S5/G08 锁分类 | **done(子集)** | `LockReport.classes`;impact 含 narrates |
|
||||
| S6 CI | **done(子集)** | `.github/workflows/executable-knowledge.yml` |
|
||||
| S6 CI / G12 扫描 | **done(子集)** | CI workflow;depth/size/count 上限 |
|
||||
|
||||
## 与后续切片的关系
|
||||
|
||||
- 完整订单示例、100 单元语料、远程授权与规模 SLO — 见缺口路线图;未完成项不得笼统宣称「可执行知识已交付」
|
||||
- `examples/executable-knowledge/` 完整类函数订单链、100 单元语料、SCC 闭包摘要、远程授权 — 见缺口路线图;未完成项不得笼统宣称「可执行知识已交付」
|
||||
@@ -0,0 +1,3 @@
|
||||
# 标准税率
|
||||
|
||||
书店演示政策原文:增值税标准税率 13%。
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: S4 书店订单含税(可运行子集)
|
||||
status: implemented
|
||||
import:
|
||||
tax: tax.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
一行订单:金额 100,按标准税率含税。
|
||||
|
||||
**税率 = [适用税率](tax.标准税率())**
|
||||
**含税 = [本行含税价](100 * (1 + 税率))**
|
||||
这是[含税总价](含税)的可读结论。
|
||||
> print text=`含税`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: 书店税率(可运行子集)
|
||||
status: implemented
|
||||
sources:
|
||||
- corpus.md#标准税率
|
||||
applicability:
|
||||
region: CN
|
||||
valid_until: 2099-12-31
|
||||
---
|
||||
|
||||
## 标准税率
|
||||
|
||||
*[当前标准税率](0.13)*
|
||||
Reference in new issue
Block a user